GNU bug report logs -
#646
emacsclient with no args to behave like -a
Previous Next
Full log
Message #45 received at 646 <at> debbugs.gnu.org (full text, mbox):
On 8/26/2021 8:31 PM, Lars Ingebrigtsen wrote:
> "J. Pablo "Fernández\"" <pupeno <at> pupeno.com> writes:
>
>> It would be nice if emacsclient, when called with no arguments, would
>> just run the alternate editor. I've configured emacs as my alternate
>> editor so emacsclient for me is basically a "open this in an existing
>> emacs or run one otherwise", the only problem for that to work
>> completely is having it working with no arguments.
>
> (I'm going through old bug reports that unfortunately weren't
> resolved at the time.)
>
> It seems like this has been fixed in the 13 years since it was reported.
>
> I did:
>
> larsi <at> elva:~/src/emacs/trunk$ export ALTERNATE_EDITOR=nano
> larsi <at> elva:~/src/emacs/trunk$ ./lib-src/emacsclient /tmp/foo
>
> and that opened nano.
It sounds to me like the "args" in question would be "/tmp/foo" in this
case. On Emacs 27.2 and 28.0.50, I see:
$ export ALTERNATE_EDITOR=nano
$ lib-src/emacsclient
lib-src/emacsclient: file name or argument required
Try 'lib-src/emacsclient --help' for more information
From my reading, this is the original reporter's preferred behavior:
1) If Emacs is not currently running
a) `emacsclient file.txt' starts Emacs and opens file.txt
b) `emacsclient' starts Emacs (as though running `emacs')
2) If Emacs is currently running
a) `emacsclient file.txt' opens file.txt in the existing Emacs session
b) `emacsclient' brings some frame in the existing Emacs session
to the foreground
This bug report was last modified 3 years and 326 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.