unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: James Nguyen <jamesn@fastmail.com>
Cc: npostavs@users.sourceforge.net, 27511@debbugs.gnu.org
Subject: bug#27511: 26.0.50; emacsclient requires file argument
Date: Thu, 29 Jun 2017 14:11:40 -0400	[thread overview]
Message-ID: <44a882d6-c201-a05c-26c0-f1b015af0102@cornell.edu> (raw)
In-Reply-To: <2DC16056-CE99-48EA-BBCE-046F349A4483@fastmail.com>

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





  reply	other threads:[~2017-06-29 18:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28  2:03 bug#27511: 26.0.50; emacsclient requires file argument James Nguyen
2017-06-28 14:45 ` Noam Postavsky
2017-06-28 15:00   ` James Nguyen
2017-06-28 17:03     ` Ken Brown
2017-06-28 17:22       ` James Nguyen
2017-06-28 17:35         ` Noam Postavsky
2017-06-28 23:49           ` James Nguyen
2017-06-29  1:13             ` npostavs
2017-06-29  3:35               ` James Nguyen
2017-06-29 12:32                 ` npostavs
2017-06-29 14:11                   ` Ken Brown
2017-06-29 16:48                     ` James Nguyen
2017-06-29 18:11                       ` Ken Brown [this message]
2017-06-30  1:06                         ` James Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44a882d6-c201-a05c-26c0-f1b015af0102@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=27511@debbugs.gnu.org \
    --cc=jamesn@fastmail.com \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).