nicolas vigier wrote:
> On Sat, 02 Mar 2013, David Walser wrote:
> 
>> nicolas vigier wrote:
>> > Please push desktop-common-data.
>> > 
>> > In this new version /usr/bin/editor has been changed to try to use
>> > $VISUAL and $EDITOR instead of only $TEXTEDITOR :
>> > http://svnweb.mageia.org/soft/desktop-common-data/trunk/bin/editor?view=log
>> 
>> This was a bad change.  It was working fine :o(
>> 
>> http://svnweb.mageia.org/soft/desktop-common-data/trunk/bin/editor?r1=7450&r2=7451
> 
> It was not working. You can try with a script like this to check that it
> doesn't work :
>   #!/bin/sh
>   TEXTEDITOR="xvt -e vim"
>   $TEXTEDITOR $@
> 
> It opens a new terminal with vim inside, but does not open the file.
> 
> Also opening a new terminal when you are already in a terminal is not
> very nice.

It was working fine, I tested it when I wrote it.  Do you even know what this 
script is for?

It's for launcher buttons in desktop environments (and other things that needs 
launch an editor in a DE), for example one of the default 
toolbar buttons in IceWM.

Those normally wouldn't be passing a filename to it, but even if you want to 
use it that way (which is totally reasonable), you can just add 
the "$@" to it, rather than wholesale ripping out its support of emacs-nox and 
vim!

Also, it needs to open a new terminal most of the time, since it's not actually 
meant to be called from one.  Again though, that's not an 
unreasonable usage, but you could just add code to detect that case, rather 
than again ripping out the main functionality that it's designed 
for.

Reply via email to