From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Martin Steffen Newsgroups: gmane.emacs.help Subject: unable to kill-emacs due to failure to save buffers (in connection with tramp) Date: Sun, 14 Aug 2022 11:19:03 +0200 Organization: IFI UiO Norway Message-ID: <86lerrp4hk.fsf@login.ifi.uio.no> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24559"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 14 09:22:22 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oN7x0-0006IS-4O for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 14 Aug 2022 09:22:22 +0200 Original-Received: from localhost ([::1]:53582 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oN7wy-0004pK-IW for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 14 Aug 2022 03:22:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oN7vr-0004pB-Ua for help-gnu-emacs@gnu.org; Sun, 14 Aug 2022 03:21:12 -0400 Original-Received: from mail-out01.uio.no ([2001:700:100:10::50]:39077) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oN7vp-0000SH-FY for help-gnu-emacs@gnu.org; Sun, 14 Aug 2022 03:21:11 -0400 Original-Received: from mail-mx11.uio.no ([129.240.10.83]) by mail-out01.uio.no with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oN7vg-005MPk-Rh for help-gnu-emacs@gnu.org; Sun, 14 Aug 2022 09:21:00 +0200 Original-Received: from [103.142.254.1] (helo=fedora.shmi.ifi.uio.no) by mail-mx11.uio.no with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) user msteffen (Exim 4.95) (envelope-from ) id 1oN7vf-0008iI-FP; Sun, 14 Aug 2022 09:21:00 +0200 X-UiO-SPF-Received: Received-SPF: neutral (mail-mx11.uio.no: 103.142.254.1 is neither permitted nor denied by domain of ifi.uio.no) client-ip=103.142.254.1; envelope-from=msteffen@ifi.uio.no; helo=fedora.shmi.ifi.uio.no; X-UiO-Spam-info: not spam, SpamAssassin (score=-5.0, required=5.0, autolearn=disabled, T_SCC_BODY_TEXT_LINE=-0.01, UIO_MAIL_IS_INTERNAL=-5) X-UiO-Scanned: 90046A35516CF4C688F70836BE894B18C2878E7A X-UiOonly: 11B3D6D61C111E961B4C50352E4D4354B7A237A0 Received-SPF: pass client-ip=2001:700:100:10::50; envelope-from=msteffen@ifi.uio.no; helo=mail-out01.uio.no X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138856 Archived-At: 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 @192.168.x.x using scp... Tramp: Sending command =E2=80=98exec ssh -l -e none 192.168.x.x=E2= =80=99 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" "" 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)