GNU bug report logs - #50380
Hard to understand NEWS entry about 'save-some-buffers-default-predicate'

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Sat, 4 Sep 2021 18:52:01 UTC

Severity: wishlist

Tags: fixed

Merged with 46374

Fixed in version 28.0.60

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #18 received at control <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: 46374 <at> debbugs.gnu.org, Hauke Rehfeld <hauke <at> haukerehfeld.de>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: 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
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.




This bug report was last modified 3 years and 191 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.