beetbox/beets

$EDITOR is not respected, likely due to uv virtualenv

Open

#6.641 geöffnet am 15. Mai 2026

Auf GitHub ansehen
 (1 Kommentar) (1 Reaktion) (0 zugewiesene Personen)Python (1.837 Forks)batch import
good first issue

Repository-Metriken

Stars
 (12.133 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 26T 4h) (51 gemergte PRs in 30 T)

Beschreibung

(I'm deviating from the template, because this feels like a bug, but afaik it's not really beets' fault, and the solution is more like a feature request).

Problem

My Installation does not respect $EDITOR: (I modified beets to print out the environment variables)

$ echo $EDITOR
micro

$ beet edit test
$EDITOR: None
$VISUAL: None
No changes; aborting

$ EDITOR=nano beet edit test
$EDITOR: nano
$VISUAL: None
No changes; aborting.

Because of this, it defaults to xdg-open, which doesn't wait (#4026). I can fix it by passing EDITOR= explicitly, but i don't want to do that every time.

I believe this is due to pipx's uv backend, which seems to isolate virtualenvs from the shell's environment. I don't see an obvious/user-friendly way to get my $EDITOR into beet's virtualenv.

Setup

  • OS: Arch Linux (WSL)
  • Python version: 3.14
  • beets version: 2.11.0
  • Turning off plugins made problem go away (yes/no): well... i guess so, yes 😅

My configuration (output of beet config) is: hopefully irrelevant?

Proposed solution

Defaulting to $EDITOR et al is nice, but I would love the ability to override that behavior - permanently, not in every invocation. Absent a convenient pipx command, that means adding it to the config.

Either in the edit plugin:

edit:
  editor: nano

Or, seeing how the editor is chosen in beet's utility functions, perhaps a global setting?

editor: nano

Contributor Guide