Bazaar Explorer problem

Ian Clatworthy ian.clatworthy at canonical.com
Fri Oct 23 23:01:33 BST 2009


John Arbash Meinel wrote:

>> 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(self.name(), "vi")
> 
> _DEFAULT_EDITORS = {
>     "gnome":    "gedit",
>     "kde":      "kate",
>     "windows":  "wordpad.exe",
> 
>     "osx":      "open -t",
>     "other":    "vi",
>     }
> 

> And then in another code path I see:
> 
> self._editor = self._user_config.get_editor() or \
>         self.desktop_env.default_editor()

Hi Russel,

As John points out, Explorer uses your configured editor in bazaar.conf.
Failing that, it checks VISUAL and EDITOR before failing back to a
default suitable to your environment.

I'm happy to tweak this by also checking BZR_EDITOR say. Just raise a
bug please when you work out why things were failing for you.

Ian C.



More information about the bazaar mailing list