[Top][All Lists]

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

Re: make pred customable in auto-save-visited-mode

From: Eli Zaretskii
Subject: Re: make pred customable in auto-save-visited-mode
Date: Sat, 31 Mar 2018 13:42:25 +0300

> From: Philipp Stephani <address@hidden>
> Date: Sat, 31 Mar 2018 10:23:13 +0000
> Cc: 纪秀峰 <address@hidden>, address@hidden
> Eli Zaretskii <address@hidden> schrieb am Sa., 31. März 2018 um 10:44 Uhr:
>  > From: 纪秀峰 <address@hidden>
>  > Date: Sat, 31 Mar 2018 00:59:19 +0800
>  > Feedback-ID: esmtp:qq.com:bgforeign:bgforeign1
>  >
>  > When I enable  auto-save-visited-mode and start an ediff merge session
>  > It always prompt me save "*ediff-merge*” to a file.
>  Why is that a problem?  *ediff-merge* is a buffer where you prepare
>  the merge, and that merge will eventually be saved to some file,
>  right?  So it doesn't sound wrong to offer to save it.
> However, auto-saving should probably not prompt for filenames. That's at 
> least the intention of the :noprompt
> argument here.

I think you misinterpret the question with which Emacs prompts, see

> The issue might be in `save-some-buffers': Its docstring says "If PRED is t, 
> then certain non-file buffers will
> also be considered.", but later it only checks whether PRED is non-nil:

The question with which Emacs prompts is not the one controlled by
PRED, it's a question about the file name in which to save, I think.
It comes from basic-save-buffer, and that happens because
*ediff-merge* doesn't have a buffer-file-name.

So if we make the change you suggest, then Emacs will not offer to
save *ediff-merge* at all when this minor mode is turned on.  Is that
what we want?

Also, I don't think there's a problem with t and non-t non-nil values:
the doc string doesn't document such values that are not functions.
So there's no problem with checking that PRED is non-nil.

reply via email to

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