From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#46374: 28.0.50; Ask me to save buffers only if they are under callers dir Date: Mon, 08 Feb 2021 17:07:09 +0200 Message-ID: <83lfbylhsy.fsf@gnu.org> References: <878s7z4ihk.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16613"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46374@debbugs.gnu.org, monnier@iro.umontreal.ca, uyennhi.qm@gmail.com To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 08 22:10:05 2021 Return-path: Envelope-to: geb-bug-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 1l9DnJ-0004DM-Dh for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Feb 2021 22:10:05 +0100 Original-Received: from localhost ([::1]:58068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9DnI-0005FY-DR for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Feb 2021 16:10:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l988w-000324-Ba for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2021 10:08:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40123) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l988w-00052g-4I for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2021 10:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l988v-0001dq-VB for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2021 10:08:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Feb 2021 15:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46374 X-GNU-PR-Package: emacs Original-Received: via spool by 46374-submit@debbugs.gnu.org id=B46374.16127968326255 (code B ref 46374); Mon, 08 Feb 2021 15:08:01 +0000 Original-Received: (at 46374) by debbugs.gnu.org; 8 Feb 2021 15:07:12 +0000 Original-Received: from localhost ([127.0.0.1]:51669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9887-0001cp-W6 for submit@debbugs.gnu.org; Mon, 08 Feb 2021 10:07:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9886-0001cd-Iy for 46374@debbugs.gnu.org; Mon, 08 Feb 2021 10:07:10 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51543) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l987z-0004gC-LM; Mon, 08 Feb 2021 10:07:05 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4480 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l987q-000372-CI; Mon, 08 Feb 2021 10:06:58 -0500 In-Reply-To: <878s7z4ihk.fsf@gmail.com> (message from Tino Calancha on Sun, 07 Feb 2021 23:32:07 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199617 Archived-At: > From: Tino Calancha > Date: Sun, 07 Feb 2021 23:32:07 +0100 > Cc: stefan monnier , uyennhi.qm@gmail.com > > > I wish, by default, to only been prompted for buffers whose default-directory > is under the caller dir (except when closing Emacs). > > ## Description > Everyday I connect via Tramp with machines at each of my properties (Hawaii, > Maldives, Palawan, and a very large etc.) > Then, in the same Emacs session, I connect to a host in Wall Street to see > how my stock grows, making me richer. > Often, a compilation buffer at New York city prompts me to save a buffer > at Waikiki beach. Quite distracting! Cannot focus on my money! > > I found some people with related issues: > https://emacs.stackexchange.com/questions/7268/package-el-asks-whether-i-want-to-save-modified-files-before-package-installatio > https://emacs.stackexchange.com/questions/40593/automatically-dont-save-buffers-before-compiling > > ## How to reproduce > Sure, I understand not all of you can possibly reproduce the above conditions. > Maybe you can try the following poor man's recipe: > > emacs -Q ~/foo.txt > ;; write something and do not save > foo > ;; now visit another, for instance, the Emacs source dir > C-x d EMACS-SRC-DIR RET > ;; call rgrep with whatever string > M-x rgrep money RET *.el RET RET > ;; You will be prompted to save ~/foo.txt You are assuming that when save-some-buffers runs, the default directory is the same as when you issued whatever command triggered the call to save-some-buffers? Is that assumption really accurate?