help-gnu-emacs
[Top][All Lists]
Advanced

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

unable to kill-emacs due to failure to save buffers (in connection with


From: Martin Steffen
Subject: unable to kill-emacs due to failure to save buffers (in connection with tramp)
Date: Sun, 14 Aug 2022 11:19:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)


Hi,

I have a problem that from time to time pops up, which therefore does
not sounds too critical. But when it pops up, I have not figured out a
way to deal with it, and the only solution I have is to ``shoot emacs
down'' from outside (doing a "kill -9" to make sure it goes down....)

I have not figured out what factors in. Typically it occurs when some
emacs-client starts temporarily, for instance as I have set-up emacs as
default editor for some other programs, to type in a log message or a
commit etc.

After typing in the commit message, let's say, one surely wants to quite
that client, doing

      C-x C-c (save-buffers-kill-terminal)

In that situations, not much buffers are to be saved (those of
emacs-client, not of the overall emacs). Actually if I do

      C-x s

for saving buffers myself, the message is

    No buffers need saving

.  Still, when trying the above-mentioned save-buffers-kill-terminal,
emacs (client) engages in some attempt to save stuff. That seems to be
on initiative of tramp. Messages show activities like


Opening connection for <login>@192.168.x.x using scp...
Tramp: Sending command ‘exec ssh -l <login> -e none 192.168.x.x’
Tramp: Waiting for prompts from remote shell...failed Tramp: Opening

That's some address in my home network for some external memory
(NAS). Sometimes I login there using SCP to browse the
filesystem. However, I am not always at home, and the address this not
alway accessible. That's why sometimes the attempt to login there simply
won't work. When I cut-off the wait, typing C-g (keybord quote), it
stops the attempt. However, emacs (client), having failed to do its
save-the-buffers-properly-job propery, does not quit.

If I instead of save-buffers-kill-terminal do

  kill-terminal

the same happens, the tramp kicks trying to login the non-existant
address and so again I cannot quit.

Why does emacs (client) want to login to 192.168.x.x anyway? Note, the
location (resp. files at that location are not buffers in neither the
running emacs nor the emacs-client I like just to get rid of.

I assume has to do with the content of some tramp-cashing in the file
~/.emacs.d/tramp which contains a like like

;; -*- emacs-lisp -*- <22/08/14 11:00:37 /home/msteffen/.emacs.d/tramp>
;; Tramp connection history.  Don't change this file.
;; Run `M-x tramp-cleanup-all-connections' instead.

(((tramp-file-name "scp" "<login>" nil "192.168.x.x" nil nil nil)  (****)
  nil))


The recommendation in the comment sounds promising, but doing
M-x tramp-cleanup-all-connections which I tried did not help.

I executed that commend both in the mother-emacs and the client, which
cleared up some memory. For some reason, the line above (****) remained
(even if I don't have a connection to that address open since some
time).

Not even deleting the line (****) manually from the tramp-file helps. If
I do that, it reappears.

--

So that's as much as I was able to figure out, and I have not found a
better way to kill emacs via the OS. Basically, it makes emacs(-cliean)
as editor for commit-messages or similar really painful (after I visited
some site via SCP like my NAS).

Any ideas how I can teach emacs to really forget tramp history (which
seems would solve the problem) or any other idea?

best, Martin

I use

GNU Emacs 27.2 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.30,
cairo version 1.17.4) of 2021-08-07

tramp-version "2.4.5.27.2" (the version that ships with my emacs offered
by the OS)







reply via email to

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