all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* unable to kill-emacs due to failure to save buffers (in connection with tramp)
@ 2022-08-14  9:19 Martin Steffen
  2022-08-14 10:14 ` Michael Albinus
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Steffen @ 2022-08-14  9:19 UTC (permalink / raw)
  To: help-gnu-emacs



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)







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

end of thread, other threads:[~2022-08-17  2:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-14  9:19 unable to kill-emacs due to failure to save buffers (in connection with tramp) Martin Steffen
2022-08-14 10:14 ` Michael Albinus
2022-08-14 12:24   ` Martin Steffen
2022-08-14 13:09     ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-08-14 13:19       ` Martin Steffen
2022-08-17  2:40         ` Martin Steffen

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.