From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: make pred customable in auto-save-visited-mode Date: Sat, 31 Mar 2018 13:42:25 +0300 Message-ID: <837eps8r1q.fsf@gnu.org> References: <83a7uo8wk5.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1522492834 21257 195.159.176.226 (31 Mar 2018 10:40:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 31 Mar 2018 10:40:34 +0000 (UTC) Cc: jixiuf@qq.com, emacs-devel@gnu.org To: Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 31 12:40:29 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f2Dvx-0005RB-PY for ged-emacs-devel@m.gmane.org; Sat, 31 Mar 2018 12:40:29 +0200 Original-Received: from localhost ([::1]:37499 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f2Dy1-0002F9-H3 for ged-emacs-devel@m.gmane.org; Sat, 31 Mar 2018 06:42:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f2Dxu-0002EP-LP for emacs-devel@gnu.org; Sat, 31 Mar 2018 06:42:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f2Dxq-0004m7-NU for emacs-devel@gnu.org; Sat, 31 Mar 2018 06:42:30 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f2Dxq-0004ls-Jj; Sat, 31 Mar 2018 06:42:26 -0400 Original-Received: from [176.228.60.248] (port=2411 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1f2Dxp-0001LB-OW; Sat, 31 Mar 2018 06:42:26 -0400 In-reply-to: (message from Philipp Stephani on Sat, 31 Mar 2018 10:23:13 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:224201 Archived-At: > From: Philipp Stephani > Date: Sat, 31 Mar 2018 10:23:13 +0000 > Cc: 纪秀峰 , emacs-devel@gnu.org > > Eli Zaretskii schrieb am Sa., 31. März 2018 um 10:44 Uhr: > > > From: 纪秀峰 > > 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 below. > 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.