From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#46374: 28.0.50; Ask me to save buffers only if they are under callers dir Date: Sun, 10 Oct 2021 20:38:56 +0300 Message-ID: <87sfx8aifj.fsf@mail.linkov.net> References: <878s7z4ihk.fsf@gmail.com> <87r1ecilqn.fsf@haukerehfeld.de> <87a6l0cjyj.fsf@mail.linkov.net> <87bl5f1lbn.fsf@mail.linkov.net> <87ilzfuyeh.fsf_-_@gmail.com> <87h7ezw6up.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11218"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 46374@debbugs.gnu.org, Hauke Rehfeld , Stefan Monnier To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 10 19:44:59 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 1mZcsc-0002nf-J2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Oct 2021 19:44:58 +0200 Original-Received: from localhost ([::1]:56228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZcsb-0000oN-E6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Oct 2021 13:44:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZcoo-000777-NI for bug-gnu-emacs@gnu.org; Sun, 10 Oct 2021 13:41:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44250) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mZcoo-0001Mm-Ev for bug-gnu-emacs@gnu.org; Sun, 10 Oct 2021 13:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mZcoo-000226-5R for bug-gnu-emacs@gnu.org; Sun, 10 Oct 2021 13:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Oct 2021 17:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46374 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 46374-submit@debbugs.gnu.org id=B46374.16338876057718 (code B ref 46374); Sun, 10 Oct 2021 17:41:02 +0000 Original-Received: (at 46374) by debbugs.gnu.org; 10 Oct 2021 17:40:05 +0000 Original-Received: from localhost ([127.0.0.1]:55791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZcnq-00020K-Hq for submit@debbugs.gnu.org; Sun, 10 Oct 2021 13:40:05 -0400 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:56185) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZcnk-0001za-4s; Sun, 10 Oct 2021 13:40:00 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 2082CE0009; Sun, 10 Oct 2021 17:39:47 +0000 (UTC) In-Reply-To: <87h7ezw6up.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 05 Sep 2021 19:21:34 +0300") 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:216820 Archived-At: close 46374 28.0.60 thanks >> Being able to set `save-some-buffers-root' as the value of >> `save-some-buffers-default-predicate' is easy for users. >> >> The problem I see is that it hides the real nature of `save-some-buffers-root': >> - it's not a predicate (as the docstring of `save-some-buffers-default-predicate' suggests). >> - it's a function generating the default predicate. >> >> We can make the distinction (default predicate <-> func generating a default predicate) >> more clear if we put the generating functions in a list. >> >> Then, we can restrict the allowed pred-fun to the elements inside such a list. >> >> I have played today with this quick-and-dirty patch: >> How do you think? > > Nice idea, and it's better than what I proposed. > The only change that I suggest is instead of a list, > to put a special symbol on the symbol property, > for example: > > (put 'save-some-buffers-root 'higher-order-function t) > or simply > (put 'save-some-buffers-root 'hof t) > > A better name is appreciated. I can't invent a better name than 'save-some-buffers-function'. So now pushed with this property name.