Bazaar Explorer problem

John Arbash Meinel john at
Fri Oct 23 15:22:54 BST 2009

Hash: SHA1

Russel Winder wrote:
> John,
> On Fri, 2009-10-23 at 09:06 -0500, John Arbash Meinel wrote:
> [ . . . ]
>> I don't know what explorer uses. But bzr itself tries
>> 'editor' in bazaar.conf
>> # windows
>>   wordpad.exe
>>   notepad.exe
>> # linux
>>   /usr/bin/editor
>>   vi
>>   pico
>>   nano
>>   joe
> I have a script called doEdit which handles working with Emacs as a
> server, starting it as needed.
> /usr/bin/editor eventually (via four symbolic links round the
> alternatives houses) points at /usr/bin/emacs22-gtk which is definitely
> executable.
> BZR_EDITOR and VISUAL are empty for me, but EDITOR is doEdit and doEdit
> is on the path:
>         |> which doEdit
>         /home/users/russel/bin/doEdit
>         |>
> The weird thing is that putting doEdit in the editor field gets things
> working so Explorer appears to be using the users PATH.
>> My best guess is that one of these is actually in your path but without
>> permissions. My second guess is that Explorer isn't using the bzr search
>> path.
> I think we need Ian's input :-)

I see this code in bzr-explorer:

def default_editor(self):
    for varname in 'VISUAL', 'EDITOR':
        if varname in os.environ:
            return os.environ[varname]
    return _DEFAULT_EDITORS.get(, "vi")

    "gnome":    "gedit",
    "kde":      "kate",
    "windows":  "wordpad.exe",

    "osx":      "open -t",
    "other":    "vi",

And some more code to guess the current environment.

So it looks like it ignores /usr/bin/editor, though it claims to want to
grab both "VISUAL" and "EDITOR", which you say is set.

And then in another code path I see:

self._editor = self._user_config.get_editor() or \

I wonder if 'get_editory()' is doing something silly like returning ' '
(a single blank space) which certainly wouldn't be a valid editor, but
isn't an empty string, and thus doesn't evaluate to False...

Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla -


More information about the bazaar mailing list