From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: Non file buffers and default-directory Date: Wed, 19 Apr 2023 17:17:34 +0200 Message-ID: <87v8hr6gvl.fsf@gmx.de> References: <87edohf3ip.fsf@ledu-giraud.fr> <87zg745p85.fsf@gmx.de> <87y1moe1aa.fsf@ledu-giraud.fr> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28753"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Manuel Giraud via Users list for the GNU Emacs text editor To: Manuel Giraud Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 19 17:18:43 2023 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 1pp9Zx-0007Ey-CW for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 19 Apr 2023 17:18:41 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pp9Z0-0002Nm-3T; Wed, 19 Apr 2023 11:17:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pp9Yy-0002N4-GD for help-gnu-emacs@gnu.org; Wed, 19 Apr 2023 11:17:40 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pp9Yw-0002d7-DV for help-gnu-emacs@gnu.org; Wed, 19 Apr 2023 11:17:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1681917455; i=michael.albinus@gmx.de; bh=3Qp0GQ73r0TQhRgPylGBdcoxsiFYymEh1cCyV36OFdk=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=B/wx+E3w7hiUxTDFogLZ3IvrTz7nG6zcawNHtl2DKNV8PO8Jxr5s3U3PwKsGhP2qJ hfOoaREDg+K/plTz55qTRCHAc8XrrE+aXYYj6jMn1gae0VRfiiVk1PV7TbinwKgTr0 oHtCGrypRTfUSggiTHvLUqckBHpuMGki2+s0XILXEsSzFWVF9LS102jiE2dHrweIIu ZMNH3166qbvrIeRyDR3XN9fAdPsI5J4Dw/ba9Zha4hTQIGs7ZajFRrWe7c3HBHC3ko 2CCGiX4ZYz2eUqzNqewMCF4eH6NGqtm/HUDaTT81wnIi6PwXhZ2yskBmyfn2KfOYZs E7WbCnLRvFqOA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.0]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MfYPi-1qV79b08d6-00fzUB; Wed, 19 Apr 2023 17:17:35 +0200 In-Reply-To: <87y1moe1aa.fsf@ledu-giraud.fr> (Manuel Giraud's message of "Wed, 19 Apr 2023 10:14:53 +0200") X-Provags-ID: V03:K1:Hrl5Dg/TqQF3PlONZF+FnAtigBvpMIlmaxVSaNJhhRQDHudcrBZ WZd5AWa5zFFFvO2uiwskE75q1plF6IcQqRfHkxeOZlz/2+Pc9zrxG+YLWBTQJYsEphwCX1F bzjF28IzfHVp2enwfHbc++Etb4nzC00q1H/4uB2BFHuajBiZAYqtZrxYzwvDF8YDiNDOXi4 3JPw2cuveGfC1Lrg0KTQA== UI-OutboundReport: notjunk:1;M01:P0:EK5XMyw6dVI=;Sq3DZAO4INcU6R97DvE0Ybny3MT QYoQO7WEYBV2sl/i98ElpwJ+lkIkVNske/FaKCj3qX1oG6duSmTtq4MEEzgVXGMq3hiozvqK2 ZnuenzwA7YR4Gj+mgC/OLw9RS+2XkSDJBZjDpWHMcRR2RBYKvZ/WxWxxwSlVD3r84/PS2z/Ov iqFRP/C4cV8I+vBtFqnwMwgw6D0QLE+5izTyZbkDN3Cs7DaCETzF0ba3qFf0GrbTKi+toyegv D6b5n00RTHwo6/Py4ZAdhS4Q4e/gJVBchEhqNgsfRgoVc8MmzZRD5uOR4ycMGrG15DedTvHh+ Ywhs+Wztdssv8QSvRFJRRfqf7xu/kiKD4F9pf92uu+Ao3wHvEbAqWc8impZkgW6huWbvOvKgA HWfoA64RDRnPKlZL7xUMPhFOKsul7aSkFFdqTPits5hLIgz4Kdu7PyWklY2FfiZ4x93fj0kfo xx4db7oZoyl28KVd49JTFjNbmKBbiM1y7KohFrBbu+bj65nvy3NeR/dB0unUadf0cBv6cZgPa 58Tdsh7xtKCiKXGfFeNnQE9XGCeiT7FrUJhSSOKPb12AObRuHMEEjHCZQU0655iQAsU1ZSyHu VOl2zNkJIZT/5SGb9Z+CdDG1KL1GsgbcHrR0WFxGjG099KD/s891QTUrfj6X0Bv+Dn/vkzIkh gDORTiXsT53gsNSsUN9z95+Z8DpXUpVWSGreKaLuZjb6l51CRawK5l4KkPio1BI6fZtB0fQ/8 Bbm2fQqAfKrfddyj7kLyImUIvw8XeJznwrB4US5SIV2uyDzeLuurhrwePULRsVNIoaS97ugE Received-SPF: pass client-ip=212.227.15.15; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143311 Archived-At: Manuel Giraud writes: > Hi Michael, Hi Manual, >> Perhaps tramp-cleanup-all-connections should close only buffers which >> have a remote process or a remote buffer-file-name? Since I don't know >> of unexpected side effects, this behavior could be controlled by a user >> option? > > Yes but then won't TRAMP keep trying to connect to the remote server or > ask for a password for those buffers that don't have a remote process or > file? If so, maybe a better approach is that those kind of buffers > should get a "special" default-directory at startup... but there might > be cases where it is a bad idea. I don't know. That's why I asked this > question: I find it annoying but people might have ways to avoid it. Usually, tramp-cleanup-all-connections is sufficient. tramp-cleanup-all-buffers let the remote buffers disappear in order to not let you reconnect via a mistake, like openening a file in dired. We could improve my proposal by adding a hook, which tells you which buffers to remove. This hook could contain predicates for checking a remote buffer-file-name, a remote process, or a romete dired buffer. And this might be a new command in parallel to tramp-cleanup-all-{buffers,connections}. Whether this is sufficient we'll see, but this mechanism could be tuned after first experiences. > Best regards, Best regards, Michael.