bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#46374: 28.0.50; Ask me to save buffers only if they are under caller


From: Juri Linkov
Subject: bug#46374: 28.0.50; Ask me to save buffers only if they are under callers dir
Date: Sun, 07 Mar 2021 23:08:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> Sorry for the late response: many meetings with investors.
> Then I went on a vacation to my castle in Seychelles.

Oh, I thought you were busy running for President.

>> Why not simply add a new option to the existing variable
>> save-some-buffers-default-predicate?  For example:
>>
>> (defcustom save-some-buffers-default-predicate nil
>>   "Default predicate for `save-some-buffers'."
>>   :group 'auto-save
>>   ;; FIXME nil should not be a valid option, let alone the default,
>>   ;; eg so that add-function can be used.
>>   :type '(choice (const :tag "Default" nil)
>>                  (const :tag "Subdirs of default directory" 
>> default-directory)
>>                  (const :tag "Project root" project-root)
>>                  function)
>
> Indeed, this was my initial implemention.
> Then I moved to the one I shared here; I found my second version
> superior for the following reason:
>
> 1. Users can restrict the buffer default directory AND still pass a
>    predicate to filter by any other thing they wish;
>    i.e. you don't need to chose either one of the other.
>
> 2. I find it cleaner having it in a separated option.

I'm not sure if there is a need for adding
another dimension with another option.

But if yes, then still shouldn't a new option
provide a wider choice of restricting predicates
like above?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]