all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Making emacsclient more friendly toward multiple terminal tabs
@ 2012-04-02 22:35 Aaron Meurer
  2012-04-03  9:31 ` Gregor Zattler
  0 siblings, 1 reply; 3+ messages in thread
From: Aaron Meurer @ 2012-04-02 22:35 UTC (permalink / raw)
  To: help-gnu-emacs

Hi.

I've been using emacsclient in the terminal as my editor for some
time, and it works pretty well.  There are a few issues, though, where
one emacsclient will interact with another in annoying ways.  My setup
is that I have several terminal tabs open, and I run emacsclient in
each one whenever I want to edit a file.  I start emacsclient with
emacsclient -a "" -nw (via a bash alias).  Here are some issues that I
encounter:

- If one emacsclient has a question in the minibuffer, then the others
are all locked out until I answer the question.  For example, if I
modify a file without saving and do C-x C-c, it asks me if I want to
save.  All other emacsclients are locked out completely until I answer
yes or no.  Even C-g or ESC ESC ESC have no effect (nor do y or n).

- Very often, when I close an emacsclient (with C-x C-s C-x C-c), it
bugs me about saving buffers in other emacsclients.

- If I open a file, make a change, then close it without saving, and
reopen it, the change is still there.  I understand why this happens,
because the buffer remains open in the daemon, but this is not really
what I want.

- If I do C-x C-f, the directory that it gives me is very often not
the directory I am cd'd into for that particular emacsclient, but one
from another emacsclient.

If anyone can offer suggestions to fix any of these issues, it would
be greatly appreciated, as they are all quite annoying (especially the
second one). I get why these things happen, because emacsclient shares
all buffers with the one daemon, but I'd rather it act as if it
didn't.  My main motivation for using emacsclient over vanilla emacs
is the enormous speed benefit when starting it.

If anyone cares, my .emacs is at
https://github.com/asmeurer/dotfiles/blob/master/.emacs.

Aaron Meurer



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Making emacsclient more friendly toward multiple terminal tabs
  2012-04-02 22:35 Making emacsclient more friendly toward multiple terminal tabs Aaron Meurer
@ 2012-04-03  9:31 ` Gregor Zattler
  2012-04-03 16:14   ` Aaron Meurer
  0 siblings, 1 reply; 3+ messages in thread
From: Gregor Zattler @ 2012-04-03  9:31 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Aaron,
* Aaron Meurer <asmeurer@gmail.com> [02. Apr. 2012]:
> - Very often, when I close an emacsclient (with C-x C-s C-x C-c), it
> bugs me about saving buffers in other emacsclients.

The way to close editing documents opend with one emacsclient is
server-edit per default bound to 'C-x #'.

 
> - If I open a file, make a change, then close it without saving, and
> reopen it, the change is still there.  I understand why this happens,
> because the buffer remains open in the daemon, but this is not really
> what I want.

Also, if you use server-edit to close a buffer, you are then
asked if you want to save the buffer.  If not it's unchanged when
you open the file next time with emacsclient.  This brings up
your other problemn about stopping Emacs with open prompts.


Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Making emacsclient more friendly toward multiple terminal tabs
  2012-04-03  9:31 ` Gregor Zattler
@ 2012-04-03 16:14   ` Aaron Meurer
  0 siblings, 0 replies; 3+ messages in thread
From: Aaron Meurer @ 2012-04-03 16:14 UTC (permalink / raw)
  To: help-gnu-emacs

On Tue, Apr 3, 2012 at 3:31 AM, Gregor Zattler <telegraph@gmx.net> wrote:
> Hi Aaron,
> * Aaron Meurer <asmeurer@gmail.com> [02. Apr. 2012]:
>> - Very often, when I close an emacsclient (with C-x C-s C-x C-c), it
>> bugs me about saving buffers in other emacsclients.
>
> The way to close editing documents opend with one emacsclient is
> server-edit per default bound to 'C-x #'.

OK, I guessed this might solve at least some of the problems.  How do
I rebind C-x C-c to server-edit when I'm in emacsclient mode, but
still use save-buffers-kill-terminal in regular emacs (which I do
occasionally use)?

Aaron Meurer

>
>
>> - If I open a file, make a change, then close it without saving, and
>> reopen it, the change is still there.  I understand why this happens,
>> because the buffer remains open in the daemon, but this is not really
>> what I want.
>
> Also, if you use server-edit to close a buffer, you are then
> asked if you want to save the buffer.  If not it's unchanged when
> you open the file next time with emacsclient.  This brings up
> your other problemn about stopping Emacs with open prompts.
>
>
> Ciao, Gregor
> --
>  -... --- .-. . -.. ..--.. ...-.-
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-03 16:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-02 22:35 Making emacsclient more friendly toward multiple terminal tabs Aaron Meurer
2012-04-03  9:31 ` Gregor Zattler
2012-04-03 16:14   ` Aaron Meurer

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.