From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 10 17:52:01 2017 Received: (at submit) by debbugs.gnu.org; 10 Sep 2017 21:52:01 +0000 Received: from localhost ([127.0.0.1]:59865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drA93-0002UP-7S for submit@debbugs.gnu.org; Sun, 10 Sep 2017 17:52:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41665) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drA91-0002UA-2c for submit@debbugs.gnu.org; Sun, 10 Sep 2017 17:51:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drA8u-0007G3-Ha for submit@debbugs.gnu.org; Sun, 10 Sep 2017 17:51:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:50262) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1drA8u-0007Fb-D3 for submit@debbugs.gnu.org; Sun, 10 Sep 2017 17:51:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drA8s-0001Q4-9g for bug-gnu-emacs@gnu.org; Sun, 10 Sep 2017 17:51:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drA8n-0007AH-BJ for bug-gnu-emacs@gnu.org; Sun, 10 Sep 2017 17:51:50 -0400 Received: from mail.ericabrahamsen.net ([50.56.99.223]:42740) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1drA8n-00073a-3v for bug-gnu-emacs@gnu.org; Sun, 10 Sep 2017 17:51:45 -0400 Received: from localhost (71-35-182-76.tukw.qwest.net [71.35.182.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id C7A52BFD10 for ; Sun, 10 Sep 2017 21:51:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.ericabrahamsen.net; s=mail; t=1505080297; bh=OuLKriBYVOmotJDx8REvEnZmmDjgGiI1Vy0Don6WItY=; h=From:To:Subject:Date:From; b=E1/VcQK7DfWc78nqzR0g0rA06HbS17Bl+KCUmJ9m8Lyi74LZtC3WjrP5wOguOajq7 1/aFK5OFot4Xbytew2Ju2kjyXeINAGK7Xoff8kywaR95AciyGw+/U0VkDWYqY28byi arTGAQTttA9yzzRldXeDLAwM6d6uiPhbZc3DqL6o= From: Eric Abrahamsen To: bug-gnu-emacs@gnu.org Subject: 26.0.50; Let save-some-buffers accept write-contents-functions Date: Sun, 10 Sep 2017 14:50:15 -0700 Message-ID: <87bmmikyug.fsf@ericabrahamsen.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) --=-=-= Content-Type: text/plain This is about letting `save-some-buffers' check `write-contents-functions' before insisting on a buffer having a file to write to. There was a conversations about this on emacs.devel: https://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00653.html The patch I ended up with is attached. I'm reporting this just so the patch (and the idea) doesn't get lost. I still think it's worth doing. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-First-whack-at-write-contents-functions-for-non-file.patch >From af4f811439785113fe2be71f499006776958755b Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Thu, 25 May 2017 15:28:19 +0800 Subject: [PATCH] First whack at write-contents-functions for non-file buffers --- lisp/files.el | 106 +++++++++++++++++++++++++++++++--------------------------- 1 file changed, 56 insertions(+), 50 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 8ac1993754..c074fa7995 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4943,29 +4943,14 @@ basic-save-buffer (if (buffer-base-buffer) (set-buffer (buffer-base-buffer))) (if (or (buffer-modified-p) - ;; handle the case when no modification has been made but - ;; the file disappeared since visited + ;; Handle the case when no modification has been made but + ;; the file disappeared since visited. (and buffer-file-name (not (file-exists-p buffer-file-name)))) (let ((recent-save (recent-auto-save-p)) setmodes) - ;; If buffer has no file name, ask user for one. - (or buffer-file-name - (let ((filename - (expand-file-name - (read-file-name "File to save in: " - nil (expand-file-name (buffer-name)))))) - (if (file-exists-p filename) - (if (file-directory-p filename) - ;; Signal an error if the user specified the name of an - ;; existing directory. - (error "%s is a directory" filename) - (unless (y-or-n-p (format-message - "File `%s' exists; overwrite? " - filename)) - (error "Canceled")))) - (set-visited-file-name filename))) - (or (verify-visited-file-modtime (current-buffer)) + (or (null buffer-file-name) + (verify-visited-file-modtime (current-buffer)) (not (file-exists-p buffer-file-name)) (yes-or-no-p (format @@ -4977,6 +4962,7 @@ basic-save-buffer (save-excursion (and (> (point-max) (point-min)) (not find-file-literally) + (null buffer-read-only) (/= (char-after (1- (point-max))) ?\n) (not (and (eq selective-display t) (= (char-after (1- (point-max))) ?\r))) @@ -4989,41 +4975,60 @@ basic-save-buffer (save-excursion (goto-char (point-max)) (insert ?\n)))) - ;; Support VC version backups. - (vc-before-save) ;; Don't let errors prevent saving the buffer. (with-demoted-errors (run-hooks 'before-save-hook)) - (or (run-hook-with-args-until-success 'write-contents-functions) - (run-hook-with-args-until-success 'local-write-file-hooks) - (run-hook-with-args-until-success 'write-file-functions) - ;; If a hook returned t, file is already "written". - ;; Otherwise, write it the usual way now. - (let ((dir (file-name-directory - (expand-file-name buffer-file-name)))) - (unless (file-exists-p dir) - (if (y-or-n-p - (format-message - "Directory `%s' does not exist; create? " dir)) - (make-directory dir t) - (error "Canceled"))) - (setq setmodes (basic-save-buffer-1)))) + ;; Give `write-contents-functions' a chance to + ;; short-circuit the whole process. + (unless (run-hook-with-args-until-success 'write-contents-functions) + ;; If buffer has no file name, ask user for one. + (or buffer-file-name + (let ((filename + (expand-file-name + (read-file-name "File to save in: " + nil (expand-file-name (buffer-name)))))) + (if (file-exists-p filename) + (if (file-directory-p filename) + ;; Signal an error if the user specified the name of an + ;; existing directory. + (error "%s is a directory" filename) + (unless (y-or-n-p (format-message + "File `%s' exists; overwrite? " + filename)) + (error "Canceled")))) + (set-visited-file-name filename))) + ;; Support VC version backups. + (vc-before-save) + (or (run-hook-with-args-until-success 'local-write-file-hooks) + (run-hook-with-args-until-success 'write-file-functions) + ;; If a hook returned t, file is already "written". + ;; Otherwise, write it the usual way now. + (let ((dir (file-name-directory + (expand-file-name buffer-file-name)))) + (unless (file-exists-p dir) + (if (y-or-n-p + (format-message + "Directory `%s' does not exist; create? " dir)) + (make-directory dir t) + (error "Canceled"))) + (setq setmodes (basic-save-buffer-1))))) ;; Now we have saved the current buffer. Let's make sure ;; that buffer-file-coding-system is fixed to what ;; actually used for saving by binding it locally. - (if save-buffer-coding-system - (setq save-buffer-coding-system last-coding-system-used) - (setq buffer-file-coding-system last-coding-system-used)) - (setq buffer-file-number - (nthcdr 10 (file-attributes buffer-file-name))) - (if setmodes - (condition-case () - (progn - (unless - (with-demoted-errors - (set-file-modes buffer-file-name (car setmodes))) - (set-file-extended-attributes buffer-file-name - (nth 1 setmodes)))) - (error nil)))) + (when buffer-file-name + (if save-buffer-coding-system + (setq save-buffer-coding-system last-coding-system-used) + (setq buffer-file-coding-system last-coding-system-used)) + (setq buffer-file-number + (nthcdr 10 (file-attributes buffer-file-name))) + (if setmodes + (condition-case () + (progn + (unless + (with-demoted-errors + (set-file-modes buffer-file-name (car setmodes))) + (set-file-extended-attributes buffer-file-name + (nth 1 setmodes)))) + (error nil))))) ;; If the auto-save file was recent before this command, ;; delete it now. (delete-auto-save-file-if-necessary recent-save) @@ -5255,7 +5260,8 @@ save-some-buffers (and pred (progn (set-buffer buffer) - (and buffer-offer-save (> (buffer-size) 0))))) + (and buffer-offer-save (> (buffer-size) 0)))) + write-contents-functions) (or (not (functionp pred)) (with-current-buffer buffer (funcall pred))) (if arg -- 2.13.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 10 18:03:01 2017 Received: (at 28412) by debbugs.gnu.org; 10 Sep 2017 22:03:01 +0000 Received: from localhost ([127.0.0.1]:59879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drAJg-0002mt-Sa for submit@debbugs.gnu.org; Sun, 10 Sep 2017 18:03:01 -0400 Received: from mail.ericabrahamsen.net ([50.56.99.223]:38304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drAJd-0002mi-D7 for 28412@debbugs.gnu.org; Sun, 10 Sep 2017 18:02:57 -0400 Received: from localhost (71-35-182-76.tukw.qwest.net [71.35.182.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 4F01BBFD10 for <28412@debbugs.gnu.org>; Sun, 10 Sep 2017 22:02:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.ericabrahamsen.net; s=mail; t=1505080976; bh=gkEuhLNY2epxaGR1yxCn3fVkI7idQ55+hLsev4ibl00=; h=From:To:Subject:In-Reply-To:References:Date:From; b=IItN6a8Mo764PZGdhFPzEsCSVrU85/vM3b6iuQwhNz3KpwAq/xwIsKnn0LFzc6gC3 7yx8C9Riqtw/hZGN1SsbnLfS3oISfFPs3gsmRlmzyl0LYFyG2FrNte2ezMIHX7The0 /rW9ap9zvAd4bDBxrrLSXKKFg9UU69rAIG1nq3mo= From: Eric Abrahamsen To: 28412@debbugs.gnu.org Subject: Re: bug#28412: Acknowledgement (26.0.50; Let save-some-buffers accept write-contents-functions) In-Reply-To: (GNU bug Tracking System's message of "Sun, 10 Sep 2017 21:52:02 +0000") References: <87bmmikyug.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Date: Sun, 10 Sep 2017 15:01:34 -0700 Message-ID: <87mv62jjr5.fsf@ericabrahamsen.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 28412 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Damn, I think that was the wrong patch. Here's the latest one. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Allow-write-contents-functions-to-short-circuit-buff.patch >From 7b5f18648e3d4b2aa9a5af536a624d6518d8fdd7 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Thu, 25 May 2017 15:28:19 +0800 Subject: [PATCH] Allow write-contents-functions to short-circuit buffer saving * lisp/files.el (basic-save-buffer): If write-contents-functions is non-nil, give the functions in that hook a chance to save buffer contents before checking if buffer is visiting a file. (save-some-buffers): If write-contents-functions is non nil, consider the buffer eligible for a save prompt. * doc/lispref/files.texi (Saving Buffers): Mention new behavior, note that special-mode buffers can use this to "save" themselves. --- doc/lispref/files.texi | 18 +++++-- lisp/files.el | 136 +++++++++++++++++++++++++++---------------------- 2 files changed, 87 insertions(+), 67 deletions(-) diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 2b692dbf68..a6ee0cc69c 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -457,15 +457,23 @@ Saving Buffers @defvar write-contents-functions This works just like @code{write-file-functions}, but it is intended for hooks that pertain to the buffer's contents, not to the particular -visited file or its location. Such hooks are usually set up by major -modes, as buffer-local bindings for this variable. This variable -automatically becomes buffer-local whenever it is set; switching to a -new major mode always resets this variable, but calling -@code{set-visited-file-name} does not. +visited file or its location, and can be used to create arbitrary save +processes for buffers that aren't visiting files at all. Such hooks +are usually set up by major modes, as buffer-local bindings for this +variable. This variable automatically becomes buffer-local whenever +it is set; switching to a new major mode always resets this variable, +but calling @code{set-visited-file-name} does not. If any of the functions in this hook returns non-@code{nil}, the file is considered already written and the rest are not called and neither are the functions in @code{write-file-functions}. + +When using this hook to save buffers that are not visiting files (for +instance, special-mode buffers), keep in mind that, if the function +fails to save correctly and returns a @code{nil} value, +@code{save-buffer} will go on to prompt the user for a file to save +the buffer in. If this is undesirable, consider having the function +fail by raising an error. @end defvar @defopt before-save-hook diff --git a/lisp/files.el b/lisp/files.el index 8ac1993754..1f88f86b76 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -514,10 +514,12 @@ 'write-contents-hooks 'write-contents-functions "22.1") (defvar write-contents-functions nil "List of functions to be called before writing out a buffer to a file. -Only used by `save-buffer'. -If one of them returns non-nil, the file is considered already written -and the rest are not called and neither are the functions in -`write-file-functions'. + +Only used by `save-buffer'. If one of them returns non-nil, the +file is considered already written and the rest are not called +and neither are the functions in `write-file-functions'. This +hook can thus be used to create save behavior for buffers that +are not visiting a file at all. This variable is meant to be used for hooks that pertain to the buffer's contents, not to the particular visited file; thus, @@ -4932,9 +4934,12 @@ save-buffer-coding-system (defun basic-save-buffer (&optional called-interactively) "Save the current buffer in its visited file, if it has been modified. -The hooks `write-contents-functions' and `write-file-functions' get a chance -to do the job of saving; if they do not, then the buffer is saved in -the visited file in the usual way. + +The hooks `write-contents-functions', `local-write-file-hooks' +and `write-file-functions' get a chance to do the job of saving; +if they do not, then the buffer is saved in the visited file in +the usual way. + Before and after saving the buffer, this function runs `before-save-hook' and `after-save-hook', respectively." (interactive '(called-interactively)) @@ -4943,29 +4948,14 @@ basic-save-buffer (if (buffer-base-buffer) (set-buffer (buffer-base-buffer))) (if (or (buffer-modified-p) - ;; handle the case when no modification has been made but - ;; the file disappeared since visited + ;; Handle the case when no modification has been made but + ;; the file disappeared since visited. (and buffer-file-name (not (file-exists-p buffer-file-name)))) (let ((recent-save (recent-auto-save-p)) setmodes) - ;; If buffer has no file name, ask user for one. - (or buffer-file-name - (let ((filename - (expand-file-name - (read-file-name "File to save in: " - nil (expand-file-name (buffer-name)))))) - (if (file-exists-p filename) - (if (file-directory-p filename) - ;; Signal an error if the user specified the name of an - ;; existing directory. - (error "%s is a directory" filename) - (unless (y-or-n-p (format-message - "File `%s' exists; overwrite? " - filename)) - (error "Canceled")))) - (set-visited-file-name filename))) - (or (verify-visited-file-modtime (current-buffer)) + (or (null buffer-file-name) + (verify-visited-file-modtime (current-buffer)) (not (file-exists-p buffer-file-name)) (yes-or-no-p (format @@ -4977,6 +4967,7 @@ basic-save-buffer (save-excursion (and (> (point-max) (point-min)) (not find-file-literally) + (null buffer-read-only) (/= (char-after (1- (point-max))) ?\n) (not (and (eq selective-display t) (= (char-after (1- (point-max))) ?\r))) @@ -4989,46 +4980,65 @@ basic-save-buffer (save-excursion (goto-char (point-max)) (insert ?\n)))) - ;; Support VC version backups. - (vc-before-save) ;; Don't let errors prevent saving the buffer. (with-demoted-errors (run-hooks 'before-save-hook)) - (or (run-hook-with-args-until-success 'write-contents-functions) - (run-hook-with-args-until-success 'local-write-file-hooks) - (run-hook-with-args-until-success 'write-file-functions) - ;; If a hook returned t, file is already "written". - ;; Otherwise, write it the usual way now. - (let ((dir (file-name-directory - (expand-file-name buffer-file-name)))) - (unless (file-exists-p dir) - (if (y-or-n-p - (format-message - "Directory `%s' does not exist; create? " dir)) - (make-directory dir t) - (error "Canceled"))) - (setq setmodes (basic-save-buffer-1)))) + ;; Give `write-contents-functions' a chance to + ;; short-circuit the whole process. + (unless (run-hook-with-args-until-success 'write-contents-functions) + ;; If buffer has no file name, ask user for one. + (or buffer-file-name + (let ((filename + (expand-file-name + (read-file-name "File to save in: " + nil (expand-file-name (buffer-name)))))) + (if (file-exists-p filename) + (if (file-directory-p filename) + ;; Signal an error if the user specified the name of an + ;; existing directory. + (error "%s is a directory" filename) + (unless (y-or-n-p (format-message + "File `%s' exists; overwrite? " + filename)) + (error "Canceled")))) + (set-visited-file-name filename))) + ;; Support VC version backups. + (vc-before-save) + (or (run-hook-with-args-until-success 'local-write-file-hooks) + (run-hook-with-args-until-success 'write-file-functions) + ;; If a hook returned t, file is already "written". + ;; Otherwise, write it the usual way now. + (let ((dir (file-name-directory + (expand-file-name buffer-file-name)))) + (unless (file-exists-p dir) + (if (y-or-n-p + (format-message + "Directory `%s' does not exist; create? " dir)) + (make-directory dir t) + (error "Canceled"))) + (setq setmodes (basic-save-buffer-1))))) ;; Now we have saved the current buffer. Let's make sure ;; that buffer-file-coding-system is fixed to what ;; actually used for saving by binding it locally. - (if save-buffer-coding-system - (setq save-buffer-coding-system last-coding-system-used) - (setq buffer-file-coding-system last-coding-system-used)) - (setq buffer-file-number - (nthcdr 10 (file-attributes buffer-file-name))) - (if setmodes - (condition-case () - (progn - (unless - (with-demoted-errors - (set-file-modes buffer-file-name (car setmodes))) - (set-file-extended-attributes buffer-file-name - (nth 1 setmodes)))) - (error nil)))) - ;; If the auto-save file was recent before this command, - ;; delete it now. - (delete-auto-save-file-if-necessary recent-save) - ;; Support VC `implicit' locking. - (vc-after-save) + (when buffer-file-name + (if save-buffer-coding-system + (setq save-buffer-coding-system last-coding-system-used) + (setq buffer-file-coding-system last-coding-system-used)) + (setq buffer-file-number + (nthcdr 10 (file-attributes buffer-file-name))) + (if setmodes + (condition-case () + (progn + (unless + (with-demoted-errors + (set-file-modes buffer-file-name (car setmodes))) + (set-file-extended-attributes buffer-file-name + (nth 1 setmodes)))) + (error nil))) + ;; Support VC `implicit' locking. + (vc-after-save)) + ;; If the auto-save file was recent before this command, + ;; delete it now. + (delete-auto-save-file-if-necessary recent-save)) (run-hooks 'after-save-hook)) (or noninteractive (not called-interactively) @@ -5255,7 +5265,9 @@ save-some-buffers (and pred (progn (set-buffer buffer) - (and buffer-offer-save (> (buffer-size) 0))))) + (and buffer-offer-save (> (buffer-size) 0)))) + (buffer-local-value + 'write-contents-functions buffer)) (or (not (functionp pred)) (with-current-buffer buffer (funcall pred))) (if arg -- 2.13.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 11 11:03:51 2017 Received: (at 28412) by debbugs.gnu.org; 11 Sep 2017 15:03:51 +0000 Received: from localhost ([127.0.0.1]:33643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drQFa-0005fQ-M1 for submit@debbugs.gnu.org; Mon, 11 Sep 2017 11:03:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47649) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drQFZ-0005fA-Ee for 28412@debbugs.gnu.org; Mon, 11 Sep 2017 11:03:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drQFO-0006na-U1 for 28412@debbugs.gnu.org; Mon, 11 Sep 2017 11:03:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60780) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drQFO-0006nE-R5; Mon, 11 Sep 2017 11:03:38 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4327 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1drQFM-0002k7-Fh; Mon, 11 Sep 2017 11:03:38 -0400 Date: Mon, 11 Sep 2017 18:03:25 +0300 Message-Id: <83zia1s2f6.fsf@gnu.org> From: Eli Zaretskii To: Eric Abrahamsen In-reply-to: <87mv62jjr5.fsf@ericabrahamsen.net> (message from Eric Abrahamsen on Sun, 10 Sep 2017 15:01:34 -0700) Subject: Re: bug#28412: Acknowledgement (26.0.50; Let save-some-buffers accept write-contents-functions) References: <87bmmikyug.fsf@ericabrahamsen.net> <87mv62jjr5.fsf@ericabrahamsen.net> 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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28412 Cc: 28412@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Resent-Sender: help-debbugs@gnu.org > From: Eric Abrahamsen > Date: Sun, 10 Sep 2017 15:01:34 -0700 > > Here's the latest one. Thanks. Can we have some simple tests for this, both with and without visiting a file? This also needs a NEWS entry. And please mention the bug number in the log message. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 11 17:42:33 2017 Received: (at 28412) by debbugs.gnu.org; 11 Sep 2017 21:42:33 +0000 Received: from localhost ([127.0.0.1]:34220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drWTR-0000JD-3h for submit@debbugs.gnu.org; Mon, 11 Sep 2017 17:42:33 -0400 Received: from mail.ericabrahamsen.net ([50.56.99.223]:56253) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drWTP-0000J6-KR for 28412@debbugs.gnu.org; Mon, 11 Sep 2017 17:42:31 -0400 Received: from localhost (71-35-182-76.tukw.qwest.net [71.35.182.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id ED376C02AF; Mon, 11 Sep 2017 21:42:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.ericabrahamsen.net; s=mail; t=1505166150; bh=epwtvGQ1ExQy7iYrr44qvroqWNkj02Zfw98dgDQZOzQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=o3/nc3GXbaCr83pb5R60WO9wz0AKIB+pZQ9XTLHGHpzjV1hSIMtxPnJ/QAHcXQ9T0 nG/6VKaTynEH0PcB8gOTZjGvQyS6QDNbkxWc+p0bRsuKzQun55Ll2PQt6+GBFqlBuE 1Bu9swvp3DRlS7n2IbkIVxUjA0g2tbuRvHVHUdgc= From: Eric Abrahamsen To: Eli Zaretskii Subject: Re: bug#28412: Acknowledgement (26.0.50; Let save-some-buffers accept write-contents-functions) References: <87bmmikyug.fsf@ericabrahamsen.net> <87mv62jjr5.fsf@ericabrahamsen.net> <83zia1s2f6.fsf@gnu.org> Date: Mon, 11 Sep 2017 14:41:08 -0700 In-Reply-To: <83zia1s2f6.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 11 Sep 2017 18:03:25 +0300") Message-ID: <87poawhq17.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 28412 Cc: 28412@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > Thanks. Can we have some simple tests for this, both with and without > visiting a file? Is this sufficient, do you think? (ert-deftest files-test-no-file-write-contents () "Test that `write-contents-functions' permits saving a file. Usually `basic-save-buffer' will prompt for a file name if the current buffer has none. It should first call the functions in `write-contents-functions', and if one of them returns non-nil, consider the buffer saved, without prompting for a file name (Bug#28412)." (let ((read-file-name-function (lambda (&rest _ignore) (error "Prompting for file name")))) ;; With contents function, and no file. (with-temp-buffer (setq write-contents-functions (list (lambda () t))) (set-buffer-modified-p t) (should (null (save-buffer)))) ;; With no contents function and no file. This should reach the ;; `read-file-name' prompt. (with-temp-buffer (set-buffer-modified-p t) (should-error (save-buffer) :type 'error)) ;; Then a buffer visiting a file: should save normally. (files-tests--with-temp-file temp-file-name (with-current-buffer (find-file-noselect temp-file-name) (setq write-contents-functions nil) (insert "p") (should (null (save-buffer))) (should (eq (buffer-size) 1)))))) From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 12 10:41:44 2017 Received: (at 28412) by debbugs.gnu.org; 12 Sep 2017 14:41:44 +0000 Received: from localhost ([127.0.0.1]:35970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drmNk-0002H8-5I for submit@debbugs.gnu.org; Tue, 12 Sep 2017 10:41:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drmNh-0002Gs-Kb for 28412@debbugs.gnu.org; Tue, 12 Sep 2017 10:41:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drmNX-0007mp-Vo for 28412@debbugs.gnu.org; Tue, 12 Sep 2017 10:41:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35562) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drmNX-0007md-SN; Tue, 12 Sep 2017 10:41:31 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1977 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1drmNX-00048A-9h; Tue, 12 Sep 2017 10:41:31 -0400 Date: Tue, 12 Sep 2017 17:41:31 +0300 Message-Id: <83lglkq8ro.fsf@gnu.org> From: Eli Zaretskii To: Eric Abrahamsen In-reply-to: <87poawhq17.fsf@ericabrahamsen.net> (message from Eric Abrahamsen on Mon, 11 Sep 2017 14:41:08 -0700) Subject: Re: bug#28412: Acknowledgement (26.0.50; Let save-some-buffers accept write-contents-functions) References: <87bmmikyug.fsf@ericabrahamsen.net> <87mv62jjr5.fsf@ericabrahamsen.net> <83zia1s2f6.fsf@gnu.org> <87poawhq17.fsf@ericabrahamsen.net> 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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28412 Cc: 28412@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Eric Abrahamsen > Cc: 28412@debbugs.gnu.org > Date: Mon, 11 Sep 2017 14:41:08 -0700 > > > Thanks. Can we have some simple tests for this, both with and without > > visiting a file? > > Is this sufficient, do you think? Yes, I think so. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 12 19:20:37 2017 Received: (at submit) by debbugs.gnu.org; 12 Sep 2017 23:20:37 +0000 Received: from localhost ([127.0.0.1]:36595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1druTt-0006Gj-2X for submit@debbugs.gnu.org; Tue, 12 Sep 2017 19:20:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1druTq-0006GX-Ju for submit@debbugs.gnu.org; Tue, 12 Sep 2017 19:20:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1druTk-0001of-Ga for submit@debbugs.gnu.org; Tue, 12 Sep 2017 19:20:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41600) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1druTk-0001oR-Dr for submit@debbugs.gnu.org; Tue, 12 Sep 2017 19:20:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1druTi-0001IE-L6 for bug-gnu-emacs@gnu.org; Tue, 12 Sep 2017 19:20:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1druTf-0001m0-Gi for bug-gnu-emacs@gnu.org; Tue, 12 Sep 2017 19:20:26 -0400 Received: from [195.159.176.226] (port=39065 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1druTf-0001kk-9Y for bug-gnu-emacs@gnu.org; Tue, 12 Sep 2017 19:20:23 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1druTD-0002Qn-4o for bug-gnu-emacs@gnu.org; Wed, 13 Sep 2017 01:19:55 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Eric Abrahamsen Subject: Re: bug#28412: Acknowledgement (26.0.50; Let save-some-buffers accept write-contents-functions) Date: Tue, 12 Sep 2017 16:18:00 -0700 Lines: 14 Message-ID: <87a81zpkuv.fsf@ericabrahamsen.net> References: <87bmmikyug.fsf@ericabrahamsen.net> <87mv62jjr5.fsf@ericabrahamsen.net> <83zia1s2f6.fsf@gnu.org> <87poawhq17.fsf@ericabrahamsen.net> <83lglkq8ro.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@blaine.gmane.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cancel-Lock: sha1:R5qu+eD1aMwdlbSZVdjh5Oigl04= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Eli Zaretskii writes: >> From: Eric Abrahamsen >> Cc: 28412@debbugs.gnu.org >> Date: Mon, 11 Sep 2017 14:41:08 -0700 >> >> > Thanks. Can we have some simple tests for this, both with and without >> > visiting a file? >> >> Is this sufficient, do you think? > > Yes, I think so. Thanks. Okay, thank you. Pushed as 9b980e2691. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 18 12:16:26 2017 Received: (at 28412) by debbugs.gnu.org; 18 Sep 2017 16:16:26 +0000 Received: from localhost ([127.0.0.1]:46671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dtyif-0007NH-Nh for submit@debbugs.gnu.org; Mon, 18 Sep 2017 12:16:25 -0400 Received: from mail-yw0-f177.google.com ([209.85.161.177]:43183) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dtyid-0007N2-3s for 28412@debbugs.gnu.org; Mon, 18 Sep 2017 12:16:23 -0400 Received: by mail-yw0-f177.google.com with SMTP id s62so706828ywg.0 for <28412@debbugs.gnu.org>; Mon, 18 Sep 2017 09:16:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=9AtSDToEb3Mc6OtwKwDpo0a5egvChOBZOH84VbOJRtA=; b=RYfXMaRSkKVW3Q2SClGUl5sk7w5NbXVo2NolJNvZQmO/Q+UOzNrizOHGpauwnOkeKu MXhe2xCppYQVPltyPjYYLflrJ11kCqpvjYLgoAzrzI5DydGtlRMzN3Hnopf07QR/JwPQ FvhNdDS9/iqNEkhA+/m8jPdmUM7hy7S21qh0+QGrFYd11R0OaXaFRxS12+Qywx8y5lpw 8ZF8vlupmh60Kq2kYTS7hb5LImmsg+WOS1n8J8LaLcqXhx2jAJDBbhJvNMd5CdQWKVUz yod1NctdF9g9YUKMD+RwQaWgmprpI8oyNdvsA3v2dAb5tMj/ITPIr5AeTianUaz2bC0y kJ8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=9AtSDToEb3Mc6OtwKwDpo0a5egvChOBZOH84VbOJRtA=; b=mJQc/By+0A4xBxnmIo6CShAJB6i5CgyFylmwjG+koYzD+2HlQ8R34MLqSZRPEGHvnn 1wbLuHKWzKmzHECPH/kjjB3DbuLkcq1VG+NkRm7+YgyXOYPGqpiBl/kN8ncP0k93EQT7 jL1wKf2qMlJD7N1kVpqrGCTk+rR5HvrDKSfnLZ5P3ajXk2/QU4+JZ7kxvt5JEAjl++dT Lz5nn2wKtsM6EAY2AneEiKdyDCkBAxHXeo4VylghPRJkeOHvZASSyKGhwrhT/R3f+1mg dB/ngALDTLO1wp856vX1QQS+oyMLpuszU331bDuCRRphA00TlWIgMRBalAA/Fi7WaRBG gPhw== X-Gm-Message-State: AHPjjUhDMbtEh5BQvoGZMImTzE74cvC8pr7SCHe7S/TPOWqesQkveCl9 OnHAOYs8G3BNVAFegc19TMOlCgPJKTnrvGzyoJY= X-Google-Smtp-Source: AOwi7QAF+PwY2MBauC+9o/8g9YqGbu6hLmoK/Nqdlfat8sqyjAeLObEXtW8/FJ8dCH8dUdjsqaSfVnQF3Pb11dXTvxE= X-Received: by 10.37.135.9 with SMTP id a9mr26278792ybl.316.1505751377089; Mon, 18 Sep 2017 09:16:17 -0700 (PDT) MIME-Version: 1.0 From: Kaushal Modi Date: Mon, 18 Sep 2017 16:16:05 +0000 Message-ID: Subject: 26.0.50; Let save-some-buffers accept write-contents-functions To: 28412@debbugs.gnu.org Content-Type: multipart/alternative; boundary="089e0828d2c0f39b3d0559790f2f" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28412 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --089e0828d2c0f39b3d0559790f2f Content-Type: text/plain; charset="UTF-8" Hello Eric, Eli: I became a victim of this change because of these overlapping use-cases: - I use ggtags.el that creates a hidden (is that the right term for that?) buffer (starting with space) to fontify code snippets using the file's major mode. - The major mode I use (verilog-mode) sets write-file-functions to a non-nil value. So each time I quit emacs, I get a prompt to save that hidden buffer " *Code-Fontify*" (which it didn't earlier, as intended). Details: https://github.com/leoliu/ggtags/issues/157 I suggested calling (set-buffer-modified-p nil) in that special buffer. But is that the best way to fix this? Or should save-some-buffers never try to save buffers whose names begin with space? PS: Please CC me on the replies, else I won't get those. -- Kaushal Modi --089e0828d2c0f39b3d0559790f2f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Eric, Eli:=C2=A0

I became a victi= m of this change because of these overlapping use-cases:

- I use ggtags.el that creates a hidden (is that the right term for = that?) buffer (starting with space) to fontify code snippets using the file= 's major mode.
- The major mode I use (verilog-mode) sets wri= te-file-functions to a non-nil value.

So each time= I quit emacs, I get a prompt to save that hidden buffer " *Code-Fonti= fy*" (which it didn't earlier, as intended).

<= div>Details:=C2=A0https://github.com/leoliu/ggtags/issues/157
=
I suggested calling (set-buffer-modified-p nil) in that spec= ial buffer.=C2=A0

But is that the best way to fix = this? Or should save-some-buffers never try to save buffers whose names beg= in with space?

PS: Please CC me on the replies, el= se I won't get those.

--

Kaushal Modi

--089e0828d2c0f39b3d0559790f2f-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 18 14:05:15 2017 Received: (at 28412) by debbugs.gnu.org; 18 Sep 2017 18:05:15 +0000 Received: from localhost ([127.0.0.1]:46777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du0Pz-0005M9-0Z for submit@debbugs.gnu.org; Mon, 18 Sep 2017 14:05:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du0Px-0005Lx-BD for 28412@debbugs.gnu.org; Mon, 18 Sep 2017 14:05:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1du0Pm-0004Il-Ce for 28412@debbugs.gnu.org; Mon, 18 Sep 2017 14:05:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1du0Pm-0004Ih-91; Mon, 18 Sep 2017 14:05:02 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4819 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1du0Pi-0003OF-Fd; Mon, 18 Sep 2017 14:05:02 -0400 Date: Mon, 18 Sep 2017 21:04:22 +0300 Message-Id: <838thbj32x.fsf@gnu.org> From: Eli Zaretskii To: Kaushal Modi , Eric Abrahamsen In-reply-to: (message from Kaushal Modi on Mon, 18 Sep 2017 16:16:05 +0000) Subject: Re: bug#28412: 26.0.50; Let save-some-buffers accept write-contents-functions References: <87bmmikyug.fsf@ericabrahamsen.net> 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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28412 Cc: 28412@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Kaushal Modi > Date: Mon, 18 Sep 2017 16:16:05 +0000 > > - I use ggtags.el that creates a hidden (is that the right term for that?) buffer (starting with space) to fontify > code snippets using the file's major mode. > - The major mode I use (verilog-mode) sets write-file-functions to a non-nil value. > > So each time I quit emacs, I get a prompt to save that hidden buffer " *Code-Fontify*" (which it didn't earlier, as > intended). > > Details: https://github.com/leoliu/ggtags/issues/157 > > I suggested calling (set-buffer-modified-p nil) in that special buffer. > > But is that the best way to fix this? Or should save-some-buffers never try to save buffers whose names begin > with space? Exempting buffers whose name starts with a space sounds reasonable. Eric? From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 18 14:14:39 2017 Received: (at 28412) by debbugs.gnu.org; 18 Sep 2017 18:14:39 +0000 Received: from localhost ([127.0.0.1]:46787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du0Z4-0005ZH-Tn for submit@debbugs.gnu.org; Mon, 18 Sep 2017 14:14:39 -0400 Received: from mail.ericabrahamsen.net ([50.56.99.223]:40740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du0Z3-0005ZA-EM for 28412@debbugs.gnu.org; Mon, 18 Sep 2017 14:14:38 -0400 Received: from localhost (71-35-182-76.tukw.qwest.net [71.35.182.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 97B81C0391; Mon, 18 Sep 2017 18:14:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.ericabrahamsen.net; s=mail; t=1505758476; bh=x/kMqQJYRUmDfxPoHVUhSdNs0JkxZQlok7TbyjQ3aok=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=N19DLVMz+mGcslIo8SasX3GQ20sP1ZByGfP3Q2MiG/ePNaIgUZ+TPGwGdZOoVgQgn m7065SrbQDGXeKwQNaXwue+JrnltKI2AXwDgtLWPiLiQkFy4h4FC7Z7MxLmsbsBbvq L8e/Hq0ho4TuGmmErPloujoy+1ljaS7NM9c2e11A= From: Eric Abrahamsen To: Eli Zaretskii Subject: Re: bug#28412: 26.0.50; Let save-some-buffers accept write-contents-functions References: <87bmmikyug.fsf@ericabrahamsen.net> <838thbj32x.fsf@gnu.org> Date: Mon, 18 Sep 2017 11:14:35 -0700 In-Reply-To: <838thbj32x.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 18 Sep 2017 21:04:22 +0300") Message-ID: <871sn3lvqs.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 28412 Cc: 28412@debbugs.gnu.org, Kaushal Modi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: >> From: Kaushal Modi >> Date: Mon, 18 Sep 2017 16:16:05 +0000 >> >> - I use ggtags.el that creates a hidden (is that the right term for that?) buffer (starting with space) to fontify >> code snippets using the file's major mode. >> - The major mode I use (verilog-mode) sets write-file-functions to a non-nil value. >> >> So each time I quit emacs, I get a prompt to save that hidden buffer " *Code-Fontify*" (which it didn't earlier, as >> intended). >> >> Details: https://github.com/leoliu/ggtags/issues/157 >> >> I suggested calling (set-buffer-modified-p nil) in that special buffer. >> >> But is that the best way to fix this? Or should save-some-buffers never try to save buffers whose names begin >> with space? > > Exempting buffers whose name starts with a space sounds reasonable. > Eric? Sounds fine to me. I'm trying to think if there's some more general interactive-vs-non-interactive case that should be protected against, but I can't really come up with anything. The whole point of `save-some-buffers' is the user prompt, and this seems like a fine way to create an exception to the prompt. I can fix it up -- the patch should go to emacs-26, right? Eric From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 18 15:12:05 2017 Received: (at 28412) by debbugs.gnu.org; 18 Sep 2017 19:12:05 +0000 Received: from localhost ([127.0.0.1]:46807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du1Sf-0006uG-3N for submit@debbugs.gnu.org; Mon, 18 Sep 2017 15:12:05 -0400 Received: from mail.ericabrahamsen.net ([50.56.99.223]:44931) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du1Sd-0006u8-CM for 28412@debbugs.gnu.org; Mon, 18 Sep 2017 15:12:03 -0400 Received: from localhost (71-35-182-76.tukw.qwest.net [71.35.182.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 0C46EC0399; Mon, 18 Sep 2017 19:12:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.ericabrahamsen.net; s=mail; t=1505761922; bh=p0iQkkABW+d8EEEq8J2ZMKoDDFQ3SVwazjHPr6IQ0pk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=g+KuI3rYx/NnXFKWZcDvj5sRSbcO+cGSA+hgwlXGXqQ8kTYE2X0/oAmKzqRaWLk5C OB9+d3t0MyeZYVbaL0iefM+FcAoysA6hW070T/Bvv/aOB240uoUexQz95yhMZPvMB8 NvQZJFAlaotUvdrwRc8e7U989hTuNbNLfYaxbdFo= From: Eric Abrahamsen To: Eli Zaretskii Subject: Re: bug#28412: 26.0.50; Let save-some-buffers accept write-contents-functions References: <87bmmikyug.fsf@ericabrahamsen.net> <838thbj32x.fsf@gnu.org> Date: Mon, 18 Sep 2017 12:12:01 -0700 In-Reply-To: <838thbj32x.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 18 Sep 2017 21:04:22 +0300") Message-ID: <87377jizy6.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 28412 Cc: 28412@debbugs.gnu.org, Kaushal Modi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: >> From: Kaushal Modi >> Date: Mon, 18 Sep 2017 16:16:05 +0000 >> >> - I use ggtags.el that creates a hidden (is that the right term for that?) buffer (starting with space) to fontify >> code snippets using the file's major mode. >> - The major mode I use (verilog-mode) sets write-file-functions to a non-nil value. >> >> So each time I quit emacs, I get a prompt to save that hidden buffer " *Code-Fontify*" (which it didn't earlier, as >> intended). >> >> Details: https://github.com/leoliu/ggtags/issues/157 >> >> I suggested calling (set-buffer-modified-p nil) in that special buffer. >> >> But is that the best way to fix this? Or should save-some-buffers never try to save buffers whose names begin >> with space? > > Exempting buffers whose name starts with a space sounds reasonable. > Eric? Also, there don't appear to be any built-in functions or regexps for dealing with "hidden" buffers, I'm assuming: (not (string-prefix-p " " (buffer-name buffer))) is okay? From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 18 15:23:30 2017 Received: (at 28412) by debbugs.gnu.org; 18 Sep 2017 19:23:30 +0000 Received: from localhost ([127.0.0.1]:46837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du1di-0007G0-0c for submit@debbugs.gnu.org; Mon, 18 Sep 2017 15:23:30 -0400 Received: from mail-yw0-f176.google.com ([209.85.161.176]:54013) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du1df-0007Fm-Cy for 28412@debbugs.gnu.org; Mon, 18 Sep 2017 15:23:27 -0400 Received: by mail-yw0-f176.google.com with SMTP id x131so1058927ywa.10 for <28412@debbugs.gnu.org>; Mon, 18 Sep 2017 12:23:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=57Ss5JLmH+LF1TGP87M4MnMHi46D9VfklYaBj2xqpGI=; b=I6NCPLpN0/x+i7csbVf5NUApg/gH3cXQBaEcp7hUoXK0xMImr+zs+5UH2JNRuZVOF1 elLrfa/QCZrI8GdxkTO4gWlB+k/Rxmq7/gSga+YlqysXW7i5PfX7xKiOcruCOS5eqTG/ ci8NwHyEsF5Wh8d5eqYqd2m3VkgY0J+eD7ELQh0LnqfVbD6HR6Xb2UlaWFepQPqGsp9N 8gYCWY/XJ5BxSajpT64NoaAlKvpeIBNb2z9s8bCPtSmNe9Qd0YCZCp1kT0uecT69ZBsy oD15alOsSM+lub63A9XxdQILKO5qitHoz0yz6+wmNmEIS7MNeUbW8kwSi03ZOF31cmOo EVRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=57Ss5JLmH+LF1TGP87M4MnMHi46D9VfklYaBj2xqpGI=; b=I2guKKyMl+1fxF8N+25gb7hrg8tKE+DxrafPae0cbCtjU1gPt8yIzWoA31GmmPzMPC BSZyCdbMdOtcbP+wBsTWqM5/ftkxxu3AvVOCYzTgRgXrDQuacKvaoH5Ct6Qup5yzqj7e FcwAOwT+/la4CAFIETHzkfwOLXED3nV0+9WO2Qkzs47mf70ohntzbNIJ1x6ztJT8zyvN jIVdYO9NcJIfR25xsoS4Y6vnRT+wox+6Eq50Zq4uqVAyieKJAqchlKhBMuUeyfjSpiej VGEoVVXjUKdvDw66m4dFvrxRHBeQPmcP/5gsVfBnFf1n1yEvewYgGSMp5jFhQT/CuuCV JCGA== X-Gm-Message-State: AHPjjUhf309Ch5i4elujJNT7X1UvdeCO9cHE477PoqPr9rEXnheN+TJM BgYo6Qsiku8RuwN4vJhWpoBgZQcKLBRjAbidpEQ= X-Google-Smtp-Source: ADKCNb68ILdxPVuEJLlg38G91COpQUNrOCH2EHCCRIpxzqssaXoS/pIhshSG6zRMsldyVHw8qJY2cMGv4apiHyBRE8s= X-Received: by 10.129.159.69 with SMTP id w66mr27493182ywg.392.1505762601761; Mon, 18 Sep 2017 12:23:21 -0700 (PDT) MIME-Version: 1.0 References: <87bmmikyug.fsf@ericabrahamsen.net> <838thbj32x.fsf@gnu.org> <87377jizy6.fsf@ericabrahamsen.net> In-Reply-To: <87377jizy6.fsf@ericabrahamsen.net> From: Kaushal Modi Date: Mon, 18 Sep 2017 19:23:10 +0000 Message-ID: Subject: Re: bug#28412: 26.0.50; Let save-some-buffers accept write-contents-functions To: Eric Abrahamsen , Eli Zaretskii Content-Type: multipart/alternative; boundary="94eb2c0bb8e2fe811d05597bacae" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28412 Cc: 28412@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --94eb2c0bb8e2fe811d05597bacae Content-Type: text/plain; charset="UTF-8" On Mon, Sep 18, 2017 at 3:12 PM Eric Abrahamsen wrote: > Also, there don't appear to be any built-in functions or regexps for > dealing with "hidden" buffers, I'm assuming: > > (not (string-prefix-p " " (buffer-name buffer))) > > is okay? > That crossed my mind too. So I had started looking for its existing implementation, and found this in buff-menu.el inside list-buffers--refresh function: (string= (substring name 0 1) " ") I was wondering if that should be wrapped into a function like buffer-internal-p (based on the many docstrings like below in buff-menu.el: "By default, the Buffer Menu lists all buffers except those whose names start with a space (which are for internal use)."). Having a function like this would be better than having that logic implemented in different ways in the emacs core. I just don't know the best place to put this function definition. Eli? -- Kaushal Modi --94eb2c0bb8e2fe811d05597bacae Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Sep 18= , 2017 at 3:12 PM Eric Abrahamsen <eric@ericabrahamsen.net> wrote:
Also, there don't appear to be any built-in functions or rege= xps for
dealing with "hidden" buffers, I'm assuming:

(not (string-prefix-p " " (buffer-name buffer)))

is okay?

That crossed my mind too. So I= had started looking for its existing implementation, and found this in buf= f-menu.el inside list-buffers--refresh function:

= =C2=A0 =C2=A0 (string=3D (substring name 0 1) " ")
=
I was wondering if that should be wrapped into a function li= ke buffer-internal-p (based on the many docstrings like below in buff-menu.= el: "By default, the Buffer Menu lists all buffers except those whose = names start with a space (which are for internal use)."). Having a fun= ction like this would be better than having that logic implemented in diffe= rent ways in the emacs core.

I just don't know= the best place to put this function definition. Eli?
--

Kaushal Modi

--94eb2c0bb8e2fe811d05597bacae-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 18 15:26:46 2017 Received: (at 28412) by debbugs.gnu.org; 18 Sep 2017 19:26:46 +0000 Received: from localhost ([127.0.0.1]:46841 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du1gs-0007L6-GR for submit@debbugs.gnu.org; Mon, 18 Sep 2017 15:26:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du1gr-0007Kr-JE for 28412@debbugs.gnu.org; Mon, 18 Sep 2017 15:26:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1du1gh-00043c-Pj for 28412@debbugs.gnu.org; Mon, 18 Sep 2017 15:26:40 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51050) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1du1gh-00043T-ML; Mon, 18 Sep 2017 15:26:35 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4910 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1du1gf-0003S4-4P; Mon, 18 Sep 2017 15:26:35 -0400 Date: Mon, 18 Sep 2017 22:25:33 +0300 Message-Id: <83377jizbm.fsf@gnu.org> From: Eli Zaretskii To: Eric Abrahamsen In-reply-to: <871sn3lvqs.fsf@ericabrahamsen.net> (message from Eric Abrahamsen on Mon, 18 Sep 2017 11:14:35 -0700) Subject: Re: bug#28412: 26.0.50; Let save-some-buffers accept write-contents-functions References: <87bmmikyug.fsf@ericabrahamsen.net> <838thbj32x.fsf@gnu.org> <871sn3lvqs.fsf@ericabrahamsen.net> 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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28412 Cc: 28412@debbugs.gnu.org, kaushal.modi@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Eric Abrahamsen > Cc: Kaushal Modi , 28412@debbugs.gnu.org > Date: Mon, 18 Sep 2017 11:14:35 -0700 > > I can fix it up -- the patch should go to emacs-26, right? Yes, thanks. Don't forget to mention the exception in the docs. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 18 15:29:21 2017 Received: (at 28412) by debbugs.gnu.org; 18 Sep 2017 19:29:21 +0000 Received: from localhost ([127.0.0.1]:46845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du1jM-0007PQ-Tc for submit@debbugs.gnu.org; Mon, 18 Sep 2017 15:29:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39837) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du1jL-0007PC-NG for 28412@debbugs.gnu.org; Mon, 18 Sep 2017 15:29:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1du1jB-00066j-Tf for 28412@debbugs.gnu.org; Mon, 18 Sep 2017 15:29:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1du1jB-00066d-Nw; Mon, 18 Sep 2017 15:29:09 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4911 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1du1j2-0006ci-Hr; Mon, 18 Sep 2017 15:29:09 -0400 Date: Mon, 18 Sep 2017 22:28:21 +0300 Message-Id: <831sn3iz6y.fsf@gnu.org> From: Eli Zaretskii To: Eric Abrahamsen In-reply-to: <87377jizy6.fsf@ericabrahamsen.net> (message from Eric Abrahamsen on Mon, 18 Sep 2017 12:12:01 -0700) Subject: Re: bug#28412: 26.0.50; Let save-some-buffers accept write-contents-functions References: <87bmmikyug.fsf@ericabrahamsen.net> <838thbj32x.fsf@gnu.org> <87377jizy6.fsf@ericabrahamsen.net> 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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28412 Cc: 28412@debbugs.gnu.org, kaushal.modi@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Eric Abrahamsen > Cc: Kaushal Modi , 28412@debbugs.gnu.org > Date: Mon, 18 Sep 2017 12:12:01 -0700 > > Also, there don't appear to be any built-in functions or regexps for > dealing with "hidden" buffers, I'm assuming: > > (not (string-prefix-p " " (buffer-name buffer))) > > is okay? Yes, but I think aref would be simpler (and probably faster). From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 18 16:30:53 2017 Received: (at 28412) by debbugs.gnu.org; 18 Sep 2017 20:30:53 +0000 Received: from localhost ([127.0.0.1]:46893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du2gv-0004C5-Mb for submit@debbugs.gnu.org; Mon, 18 Sep 2017 16:30:53 -0400 Received: from mail.ericabrahamsen.net ([50.56.99.223]:60287) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du2gu-0004Bx-5y for 28412@debbugs.gnu.org; Mon, 18 Sep 2017 16:30:52 -0400 Received: from localhost (71-35-182-76.tukw.qwest.net [71.35.182.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 562DAC034C; Mon, 18 Sep 2017 20:30:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.ericabrahamsen.net; s=mail; t=1505766651; bh=EmKZ6RcBIAUHKd7NqWjA6Zrwj6tiUysXJHkC9ElCTYg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=tu6aYOW172K8Jkhk2WXxkAxAal1kEb6KYM7prWGBbcKE7qNSip89iYpFQka+oImCh DpTpA47gwrwbu1MCVOSVuMOszXFlj/Onx+iv6K4/c7w5Zr0b6ZvSnmMsdyoEl0cJmb kce72gC8s1ni7DaFfjS9n1kRxOLAhrYld5eHVFnw= From: Eric Abrahamsen To: Eli Zaretskii Subject: Re: bug#28412: 26.0.50; Let save-some-buffers accept write-contents-functions References: <87bmmikyug.fsf@ericabrahamsen.net> <838thbj32x.fsf@gnu.org> <871sn3lvqs.fsf@ericabrahamsen.net> <83377jizbm.fsf@gnu.org> Date: Mon, 18 Sep 2017 13:30:50 -0700 In-Reply-To: <83377jizbm.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 18 Sep 2017 22:25:33 +0300") Message-ID: <8760cfhhqd.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 28412 Cc: 28412@debbugs.gnu.org, kaushal.modi@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 09/18/17 22:25 PM, Eli Zaretskii wrote: >> From: Eric Abrahamsen >> Cc: Kaushal Modi , 28412@debbugs.gnu.org >> Date: Mon, 18 Sep 2017 11:14:35 -0700 >> >> I can fix it up -- the patch should go to emacs-26, right? > > Yes, thanks. Don't forget to mention the exception in the docs. Okay, done. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 18 16:53:27 2017 Received: (at 28412) by debbugs.gnu.org; 18 Sep 2017 20:53:28 +0000 Received: from localhost ([127.0.0.1]:46912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du32l-0004i5-OW for submit@debbugs.gnu.org; Mon, 18 Sep 2017 16:53:27 -0400 Received: from mail.ericabrahamsen.net ([50.56.99.223]:41068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du32k-0004hy-9X for 28412@debbugs.gnu.org; Mon, 18 Sep 2017 16:53:26 -0400 Received: from localhost (71-35-182-76.tukw.qwest.net [71.35.182.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id D4190C039F; Mon, 18 Sep 2017 20:53:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.ericabrahamsen.net; s=mail; t=1505768005; bh=+PPfEYF/kOsWEHLYeukOlgMMbdjLqreSQjDTQp56Mc0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=QE1fV80O3ZZBqC7CEXbSWSF8qbrBbmtjTFad7yUX+pTgf7FcO+pKiiVM51W0wA0Ud GLEmQvinwTMR7FWHnLKwt5YiRHtc2NolSB5oH1AU1emNwRUhB5cvTO72JkXhdH2fmZ dGvCaOoRma9PMqJqlMpyhtpKH9FMMldqYyJxcsVs= From: Eric Abrahamsen To: Kaushal Modi Subject: Re: bug#28412: 26.0.50; Let save-some-buffers accept write-contents-functions References: <87bmmikyug.fsf@ericabrahamsen.net> <838thbj32x.fsf@gnu.org> <87377jizy6.fsf@ericabrahamsen.net> Date: Mon, 18 Sep 2017 13:53:24 -0700 In-Reply-To: (Kaushal Modi's message of "Mon, 18 Sep 2017 19:23:10 +0000") Message-ID: <87vakfenjv.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 28412 Cc: Eli Zaretskii , 28412@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Kaushal Modi writes: > On Mon, Sep 18, 2017 at 3:12 PM Eric Abrahamsen wrote: > > Also, there don't appear to be any built-in functions or regexps for > dealing with "hidden" buffers, I'm assuming: > > (not (string-prefix-p " " (buffer-name buffer))) > > is okay? > > That crossed my mind too. So I had started looking for its existing implementation, and found this in buff-menu.el inside list-buffers--refresh function: > > (string= (substring name 0 1) " ") > > I was wondering if that should be wrapped into a function like buffer-internal-p (based on the many docstrings like below in buff-menu.el: "By default, the Buffer Menu lists all buffers except those whose names start with a space > (which are for internal use)."). Having a function like this would be better than having that logic implemented in different ways in the emacs core. > > I just don't know the best place to put this function definition. Eli? It might be nice to have something like: (defsubst buffer-internal-p (buf) (eq (aref (buffer-name buf) 0) ?\s)) From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 18 17:48:34 2017 Received: (at 28412) by debbugs.gnu.org; 18 Sep 2017 21:48:34 +0000 Received: from localhost ([127.0.0.1]:46938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du3u6-0005y0-Iv for submit@debbugs.gnu.org; Mon, 18 Sep 2017 17:48:34 -0400 Received: from mail-yw0-f172.google.com ([209.85.161.172]:56139) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du3u4-0005xn-KL for 28412@debbugs.gnu.org; Mon, 18 Sep 2017 17:48:32 -0400 Received: by mail-yw0-f172.google.com with SMTP id o143so1302453ywd.12 for <28412@debbugs.gnu.org>; Mon, 18 Sep 2017 14:48:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Y/9l/XUhmUQykOfqG0eGSsZBDTEIuH/x3EtCi//fniw=; b=Rnumub3mjT2ZtvmgzmiS2Qbtbjx8zyTSTxVZwU8rvbiV2nu2CBTrGGPLIJMagPauHq FwbwDFXkz6sMp00cGNz+ultnS5VzwEQNkl3MYI5qQAN0SWmjakAE6PQk+EMDiRkzFk5m 2X8axHNFRc+OKuz6Cr+dxoxf//Q5fvgv4F9A/v8CTkY1CylniScS9pVSS/oAuvYKdVLS QxfmckyJ6XiVYMhwAlNxPQg2y/QY8MqF8eCEJ0VTQc1PuVJ10Sh2aQzErh71Ij0P9AKz hPLjIdokAMxh9L2cVfr6Phoxdx8UXiiYVxLJjF1elEUU9w4m8g7PWylUHfA0URMY1qFQ ncGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Y/9l/XUhmUQykOfqG0eGSsZBDTEIuH/x3EtCi//fniw=; b=XUbIvirF7xDyOpYpVnklwQD9gcZFV7OJepiCuZ4X3kSwE1rhIcmdTw1MCquKb2f21X qQqbyAdUMSOBa++LFj6K2JoeeQgDMM2hojIGtcnchqBl5ZDROtJSov0QWm2vAQ/loi/x 9MsfNTFwdqV7jQwHEys/7QyAWmakrHPFhd7oTEw+V4f9YhiP3EcQREmmueP0nYGtLkQL SVUCxjRVYCDawTA/2DNXPvOuKNQS5S1CpnP1qH9ckSleJz+QCGhtZEV6TGi5zVxPlNqL OrIR8se3iPfxjOgkxRNyebA+wlmPBJViXbCv/Q/ucPedOCihcyoml8T+ifKrLCYseOLt szlQ== X-Gm-Message-State: AHPjjUg5s0lmbspKruJag332ZMOV6OCEWpIbK/eI/4oVUnHMYWdbLJP1 5ZLC5qox4GB+mn2GqfQmxV0jiYpbWyeiDCpv24U= X-Google-Smtp-Source: ADKCNb4Y98ElOBdamWf6oFgXpo9Jf46D6Rpb97ajaTYBm8rWf8sTrl9jA7N1Vcniylj6jKgQd0UBRj6nhsjxBbhyNBg= X-Received: by 10.13.214.5 with SMTP id y5mr30288724ywd.287.1505771306874; Mon, 18 Sep 2017 14:48:26 -0700 (PDT) MIME-Version: 1.0 References: <87bmmikyug.fsf@ericabrahamsen.net> <838thbj32x.fsf@gnu.org> <87377jizy6.fsf@ericabrahamsen.net> <87vakfenjv.fsf@ericabrahamsen.net> In-Reply-To: <87vakfenjv.fsf@ericabrahamsen.net> From: Kaushal Modi Date: Mon, 18 Sep 2017 21:48:15 +0000 Message-ID: Subject: Re: bug#28412: 26.0.50; Let save-some-buffers accept write-contents-functions To: Eric Abrahamsen Content-Type: multipart/alternative; boundary="94eb2c0bd8dcdbfd9c05597db3a1" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28412 Cc: Eli Zaretskii , 28412@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --94eb2c0bd8dcdbfd9c05597db3a1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Sep 18, 2017 at 4:53 PM Eric Abrahamsen wrote: > > It might be nice to have something like: > > (defsubst buffer-internal-p (buf) > (eq (aref (buffer-name buf) 0) ?\s)) > Yup. I also see this in the "(emacs) Undo" Info node: Some specialized buffers do not make undo records. Buffers whose names start with spaces never do; these buffers are used internally by Emacs to hold text that users don=E2=80=99t normally look at or edit. But I cannot find the code that implements that. It would be nice to have these places to use the same defsubst. Btw I confirm the fix. Thanks! --=20 Kaushal Modi --94eb2c0bd8dcdbfd9c05597db3a1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Sep 18= , 2017 at 4:53 PM Eric Abrahamsen <eric@ericabrahamsen.net> wrote:

It might be nice to have something like:

(defsubst buffer-internal-p (buf)
=C2=A0 (eq (aref (buffer-name buf) 0) ?\s))

=
Yup. I also see this in the "(emacs) Undo" Info node:
<= div>
=C2=A0 =C2=A0Some specialized buffers do not make u= ndo records.=C2=A0 Buffers whose
names start with spaces never do= ; these buffers are used internally by
Emacs to hold text that us= ers don=E2=80=99t normally look at or edit.

= But I cannot find the code that implements that.

I= t would be nice to have these places to use the same defsubst.
Btw I confirm the fix. Thanks!
--

Kaushal Modi

--94eb2c0bd8dcdbfd9c05597db3a1-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 19 12:10:28 2017 Received: (at 28412) by debbugs.gnu.org; 19 Sep 2017 16:10:28 +0000 Received: from localhost ([127.0.0.1]:48448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duL6S-00069J-4M for submit@debbugs.gnu.org; Tue, 19 Sep 2017 12:10:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53982) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duL6N-000694-Rh for 28412@debbugs.gnu.org; Tue, 19 Sep 2017 12:10:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duL6E-00043R-9t for 28412@debbugs.gnu.org; Tue, 19 Sep 2017 12:10:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37277) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duL6E-00043K-7F; Tue, 19 Sep 2017 12:10:14 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1704 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1duL6C-0002Yj-Fz; Tue, 19 Sep 2017 12:10:14 -0400 Date: Tue, 19 Sep 2017 19:09:55 +0300 Message-Id: <83mv5qhdpo.fsf@gnu.org> From: Eli Zaretskii To: Kaushal Modi In-reply-to: (message from Kaushal Modi on Mon, 18 Sep 2017 19:23:10 +0000) Subject: Re: bug#28412: 26.0.50; Let save-some-buffers accept write-contents-functions References: <87bmmikyug.fsf@ericabrahamsen.net> <838thbj32x.fsf@gnu.org> <87377jizy6.fsf@ericabrahamsen.net> 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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28412 Cc: eric@ericabrahamsen.net, 28412@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Kaushal Modi > Date: Mon, 18 Sep 2017 19:23:10 +0000 > Cc: 28412@debbugs.gnu.org > > (string= (substring name 0 1) " ") > > I was wondering if that should be wrapped into a function like buffer-internal-p (based on the many docstrings > like below in buff-menu.el: "By default, the Buffer Menu lists all buffers except those whose names start with a > space (which are for internal use)."). Having a function like this would be better than having that logic > implemented in different ways in the emacs core. > > I just don't know the best place to put this function definition. Eli? I'm not sure such a simple test should be canonicalized. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 19 12:13:40 2017 Received: (at 28412) by debbugs.gnu.org; 19 Sep 2017 16:13:40 +0000 Received: from localhost ([127.0.0.1]:48455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duL9Y-0006Ds-0v for submit@debbugs.gnu.org; Tue, 19 Sep 2017 12:13:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duL9W-0006Dg-Kv for 28412@debbugs.gnu.org; Tue, 19 Sep 2017 12:13:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duL9N-0006ba-6W for 28412@debbugs.gnu.org; Tue, 19 Sep 2017 12:13:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37730) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duL9N-0006bV-4Y; Tue, 19 Sep 2017 12:13:29 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1707 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1duL9L-0003hH-Uh; Tue, 19 Sep 2017 12:13:28 -0400 Date: Tue, 19 Sep 2017 19:13:13 +0300 Message-Id: <83lglahdk6.fsf@gnu.org> From: Eli Zaretskii To: Kaushal Modi In-reply-to: (message from Kaushal Modi on Mon, 18 Sep 2017 21:48:15 +0000) Subject: Re: bug#28412: 26.0.50; Let save-some-buffers accept write-contents-functions References: <87bmmikyug.fsf@ericabrahamsen.net> <838thbj32x.fsf@gnu.org> <87377jizy6.fsf@ericabrahamsen.net> <87vakfenjv.fsf@ericabrahamsen.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28412 Cc: eric@ericabrahamsen.net, 28412@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Kaushal Modi > Date: Mon, 18 Sep 2017 21:48:15 +0000 > Cc: Eli Zaretskii , 28412@debbugs.gnu.org > > Yup. I also see this in the "(emacs) Undo" Info node: > > Some specialized buffers do not make undo records. Buffers whose > names start with spaces never do; these buffers are used internally by > Emacs to hold text that users don’t normally look at or edit. > > But I cannot find the code that implements that. It's in get-buffer-create: bset_undo_list (b, SREF (name, 0) != ' ' ? Qnil : Qt); From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 25 10:46:25 2017 Received: (at 28412) by debbugs.gnu.org; 25 Sep 2017 14:46:25 +0000 Received: from localhost ([127.0.0.1]:58564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwUeP-0002Qs-82 for submit@debbugs.gnu.org; Mon, 25 Sep 2017 10:46:25 -0400 Received: from mail-wr0-f174.google.com ([209.85.128.174]:46979) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwUeO-0002Lj-4w for 28412@debbugs.gnu.org; Mon, 25 Sep 2017 10:46:24 -0400 Received: by mail-wr0-f174.google.com with SMTP id o42so8210416wrb.3 for <28412@debbugs.gnu.org>; Mon, 25 Sep 2017 07:46:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ni/r55B6NbS19s8Xr05ROcrKumhGXt98EyDFKudsGPs=; b=cWbTjZODtAckOvbJPBVXomEsLipMmgH/h8zeqRsD7gnG/ou+oBDLMrxP6Qsldztz8/ CjoJrZ3eA1i37hctq57b4BHsYocpsGeS+gIqESqoVysGi6alMW6Y6r4jSNo7ckQlSgay YxLJzWVlm85vSHHrrxzyABrO2un8x9y7fn+0XduwNwyj6k4r6Vw1o8tr/aaTRdG0d0V3 ObMouwc6XyzibBRBOa4VWoaP6Gp1e4sIxlBmk4XfCC+eairmXnmkd8vyz7Hhe3Efum3q OIkp3uOUrLwMbLmtAvgifC5wjSJbFDRBtEqto64CjRpUC72Cwuw8kYtd9mh7XAeyxoz1 6yzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ni/r55B6NbS19s8Xr05ROcrKumhGXt98EyDFKudsGPs=; b=OBVyeybfyL9QTHhPxWPzD2h+pLVXObc5HFvk4r+UrEQI7WQsDE6zlRaTRdCZb9nl3s 3RopdP7V+iN+0OscPwE2CcmKKdvrwsysgTCmLIm5fi2bp/mByqio8VaIi/UbtOBlKzqQ 6GSh2Uytylg4ailcsyVEFca2pXXrOJqdxPdgprQZs4GGnK46fBo/IRJkH3igIAVlHWqI tcSJ6mVZPegHJpGV8jCdKWmLj3s4t7J7vTC7TjhbxNyTZVaFLFH9t0b6jMpRutyITTj9 xxqaDVxD+pLOtgl18F/M8B4LDOzmW7lFHCyhA98OWP4aHmJ5JzVbkDspzK2+oEb10lhi Allw== X-Gm-Message-State: AHPjjUgiSf/8L3RowBRdGq8uImEjAwFSBSCnucwaH7QaCNWT3xwPuXlw cAI3k/LLNJxt9Fe1BRL5lfAZICYV4lNlBDMElBw= X-Google-Smtp-Source: AOwi7QB41LX9sw7K+z/rVr0kjhXWJrn87/niqUJGMBFAlmpopK1NFJEm0m3YuUz4hXHkMo/YZdP7hKxLtAS459ouEfw= X-Received: by 10.25.87.74 with SMTP id l71mr1612373lfb.26.1506350777791; Mon, 25 Sep 2017 07:46:17 -0700 (PDT) MIME-Version: 1.0 References: <87bmmikyug.fsf@ericabrahamsen.net> <838thbj32x.fsf@gnu.org> <87377jizy6.fsf@ericabrahamsen.net> <87vakfenjv.fsf@ericabrahamsen.net> <83lglahdk6.fsf@gnu.org> In-Reply-To: <83lglahdk6.fsf@gnu.org> From: Kaushal Modi Date: Mon, 25 Sep 2017 14:46:05 +0000 Message-ID: Subject: Re: bug#28412: 26.0.50; Let save-some-buffers accept write-contents-functions To: 28412@debbugs.gnu.org Content-Type: multipart/alternative; boundary="001a11418dd20479d4055a049f37" X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 28412 Cc: eric@ericabrahamsen.net, Eli Zaretskii , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) --001a11418dd20479d4055a049f37 Content-Type: text/plain; charset="UTF-8" To close the loop: A better fix (I confirm this iteration of the fix too -- fix for the ggtags issue[3]) for this was later applied in commit 3d3778d8[1]. See this emacs-devel thread[2] for discussion that arrived to this conclusion. [1]: http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-26&id=3d3778d82a87139ef50a24146f5bad2a57a82094 [2]: http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00858.html [3]: https://github.com/leoliu/ggtags/issues/157 -- Kaushal Modi --001a11418dd20479d4055a049f37 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
To close the loop:

A better fix (I conf= irm this iteration of the fix too -- fix for the ggtags issue[3]) for this = was later applied in commit 3d3778d8[1]. See this emacs-devel thread[2] for= discussion that arrived to this conclusion.


--

Kaushal Modi

--001a11418dd20479d4055a049f37-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 11:26:44 2017 Received: (at 28412-done) by debbugs.gnu.org; 19 Oct 2017 15:26:44 +0000 Received: from localhost ([127.0.0.1]:50541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5Cia-0001zY-Fl for submit@debbugs.gnu.org; Thu, 19 Oct 2017 11:26:44 -0400 Received: from mail.ericabrahamsen.net ([50.56.99.223]:33785) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5CiZ-0001zQ-6o for 28412-done@debbugs.gnu.org; Thu, 19 Oct 2017 11:26:43 -0400 Received: from localhost (71-212-71-66.tukw.qwest.net [71.212.71.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id AC340C0682 for <28412-done@debbugs.gnu.org>; Thu, 19 Oct 2017 15:26:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.ericabrahamsen.net; s=mail; t=1508426803; bh=nAa8+vnxwFTtQe7/n1AkGN7EE2QDMWlHNGRC+joIznk=; h=From:To:Subject:References:Date:In-Reply-To:From; b=X6KOqXH+LIIFp9TsKCL5xYAJ8cKTSr7soy3KbQfutwGPYMN8vliWHI/HtJn9bdkeP 664YAxbiZoD+38GKwufECDxI0gFqq0mVlXpFkshbFfQrPrrx5ceC2p75BHZlu5d1yt qxS41fp7ln0V5aQoCOvb9jzhRoymyZZLKvwCAxXY= From: Eric Abrahamsen To: 28412-done@debbugs.gnu.org Subject: Re: bug#28412: 26.0.50; Let save-some-buffers accept write-contents-functions References: <87bmmikyug.fsf@ericabrahamsen.net> <838thbj32x.fsf@gnu.org> <87377jizy6.fsf@ericabrahamsen.net> <87vakfenjv.fsf@ericabrahamsen.net> <83lglahdk6.fsf@gnu.org> Date: Thu, 19 Oct 2017 08:25:08 -0700 In-Reply-To: <83lglahdk6.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 19 Sep 2017 19:13:13 +0300") Message-ID: <87d15jnorv.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 28412-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) closing From unknown Fri Sep 05 23:26:35 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 17 Nov 2017 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator