From: Junio C Hamano Date: Wed, 01 Aug 2007 17:12:13 GMT Subject: Re: Interpreting EDITOR/VISUAL environment variables. Message-ID: <7vd4y75gcy.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <86abtbnzpr.fsf@lola.quinscape.zz> David Kastrup writes: > Actually, splicing $EDITOR into a system command is a nuisance because > it means having to shell-quote its arguments. So the current > interpretation is likely easier to maintain. > > Is it the correct one? I've been torn on this one. From the point of view of "specified behaviour in the documentation", which is "EDITOR and VISUAL name the editor of your choice", not splicing is not violating the letter (I am not talking about our documentation here, but many other programs'). Splicing and shell quoting other parameters, while it is technically not a problem at all doing that in scripts, feels "dirty". Maybe it's just me. Both cvs and svn seems to splice, I suspect they just do a straight system(3) invocation. We recently normalized the script callers not to splice at all (the scripts were hand-rolling "the VISUAL or EDITOR or vi" and slightly differently). It obviously has negative (i.e. setting EDITOR to "emacsclient --alternate-editor vi" does not work) as well as positive side (i.e. "/home/dak/My Programs/editor" would work).