GNU bug report logs - #27511
26.0.50; emacsclient requires file argument

Previous Next

Package: emacs;

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


Message #45 received at 27511 <at> debbugs.gnu.org (full text, mbox):

From: Ken Brown <kbrown <at> cornell.edu>
To: James Nguyen <jamesn <at> fastmail.com>
Cc: 27511 <at> debbugs.gnu.org, npostavs <at> users.sourceforge.net
Subject: Re: bug#27511: 26.0.50; emacsclient requires file argument
Date: Thu, 29 Jun 2017 14:11:40 -0400
On 6/29/2017 12:48 PM, James Nguyen wrote:
> @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.

What does it mean to connect to a server without asking the server to do 
something?  Does DWIM suggest an obvious guess?  One possible guess 
would be that you forgot to specify a file, in which case an error 
message (or at least a query) is precisely the right thing.  Maybe there 
are other possible guesses, but I personally wouldn't expect emacsclient 
to guess that I want the server to do something involving the scratch 
buffer.

> 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.)

vim is not a client connecting to a server.  A better analogy would be a 
mail client/server pair.  What would you expect a mail client to do if 
you ask it to connect to an outgoing mail server but you don't specify a 
message to send?  I would expect either (a) the client should do nothing 
or (b) the client should issue an error message.

> 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.

Noam suggested that you should use 'emacsclient -c' or 'emacsclient -t', 
neither of which does nothing; they each create a new frame.  AFAIU, he 
didn't suggest that emacsclient should try to guess which of these you 
want if you don't specify either.

As to "connecting to the server and doing nothing", how is this 
different from just "doing nothing"?  I think doing nothing would be 
acceptable, but I personally find the current behavior to be more 
friendly (do nothing and explain why).  In the mail example, what would 
it mean for a mail client to connect to a mail server and do nothing?

Anyway, it might be time for us to agree to disagree.

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.