GNU bug report logs -
#27511
26.0.50; emacsclient requires file argument
Previous Next
Reported by: James Nguyen <jamesn <at> fastmail.com>
Date: Wed, 28 Jun 2017 02:05:02 UTC
Severity: normal
Tags: notabug
Found in version 26.0.50
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
@Noam
I’d like it to switch to the scratch buffer if anything and to create a new one if it doesn’t exist. I should be able to jigger something up with the —eval option on emacsclient though.
Thanks.
@Ken
Why would you find it surprising? Personally, I like the DWIM style of many emacs commands. If I ever type ‘emacsclient’ and press <RET>, DWIM suggests I’m trying to connect to an instance of an Emacs server.
I don’t think I’d ever expect an error message to show up in that case. Imagine typing ‘vim’ and being forced to specify a file. (It’s not lost on my you’ve indicated they have separate purposes.)
At the very least, connecting to the server and doing nothing (similar to what Noam posted a few messages back) should be similar in spirit to what you’ve just said.
> On Jun 29, 2017, at 7:11 AM, Ken Brown <kbrown <at> cornell.edu> wrote:
>
> On 6/29/2017 8:32 AM, npostavs <at> users.sourceforge.net wrote> James Nguyen <jamesn <at> fastmail.com> writes:
>>> That snip you sent doesn’t work the way I want. It just opens the Gui
>>> Emacs up without opening a new scratch buffer.
>> Oh you want a *new* scratch buffer? As in, you end up with multiple
>> scratch buffers if you run emacsclient several times?
>>> At this point, my takeaway is that we think this is 1. not a bug and
>>> 2. unlikely to have the default change (emacsclient behaving similarly
>>> in spirit to emacs)
>>>
>>> I will just have to write a bash function that wraps emacsclient and
>>> check for the file arg (or lackof) myself.
>> Yeah, changing the defaults is tricky because you have to get a lot of
>> people to agree on what the new default should be. Although it seems to
>> me that the current default of just printing an error message is not
>> especially useful for anyone...
>
> The purpose of emacsclient is to contact an emacs server and give it some action to perform (visit a file, open a new frame, evaluate some lisp, ...). If you run emacsclient with no arguments, you're not specifying any action. I can think of two possibilities for what emacsclient should do in that case: (a) Silently do nothing. (b) Print an error message. I would find it very surprising if emacsclient were to tell the server to create a new buffer when I've specified no action.
>
> Ken
>
This bug report was last modified 8 years and 24 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.