Why does histedit not respect EDITOR variable?

Benjamin Fritz fritzophrenic at gmail.com
Fri Jan 8 16:38:24 CST 2016


On Fri, Jan 8, 2016 at 4:23 PM, Adrian Klaver <adrian.klaver at aklaver.com>
wrote:
>
> On 01/08/2016 02:19 PM, Benjamin Fritz wrote:
>>
>> I am using TortoiseHg, so maybe that contributes to my issue, but the
>> same behavior happens running directly on the command line.
>>
>> I have my EDITOR environment variable set to "gvim -f" (without the
quotes).
>>
>> When I run "hg histedit 1234" I get notepad.exe instead of gvim.
>>
>> If I set HGEDITOR to "gvim -f" then I get gvim as desired.
>>
>> https://www.mercurial-scm.org/wiki/editor indicates that EDITOR should
>> be used if HGEDITOR and a couple other variables are not set. On my
>> system, only the EDITOR variable is currently set. What's going on? Is
>> this intentional behavior on Windows for some reason?
>
>
> Well, from the above link:
>
> "On Windows, the installer places a configuration file inside
%programfiles%\Mercurial\hgrc.d\ that contains the editor settings (notepad
by default). Thus, if you want to override it, you either have to redefine
the configuration option or use an HGEDITOR environment variable (VISUAL
and EDITOR will be ignored). "
>

Oh, wow. That will show me to just skim the docs instead of reading them in
detail! Thanks for being polite about your RTFM. How embarrassing!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial/attachments/20160108/32fd5040/attachment.html>


More information about the Mercurial mailing list