[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27511: 26.0.50; emacsclient requires file argument

From: Ken Brown
Subject: bug#27511: 26.0.50; emacsclient requires file argument
Date: Thu, 29 Jun 2017 14:11:40 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 6/29/2017 12:48 PM, James Nguyen wrote:
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.



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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]