From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#28412: 26.0.50; Let save-some-buffers accept write-contents-functions Date: Mon, 18 Sep 2017 11:14:35 -0700 Message-ID: <871sn3lvqs.fsf@ericabrahamsen.net> References: <87bmmikyug.fsf@ericabrahamsen.net> <838thbj32x.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1505758584 15553 195.159.176.226 (18 Sep 2017 18:16:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 18 Sep 2017 18:16:24 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 28412@debbugs.gnu.org, Kaushal Modi To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 18 20:16:18 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1du0af-0003hu-Pr for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Sep 2017 20:16:17 +0200 Original-Received: from localhost ([::1]:38204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1du0am-00062i-WC for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Sep 2017 14:16:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1du0ZV-0004zU-Ld for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 14:15:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1du0ZS-00018M-Fl for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 14:15:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38109) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1du0ZS-00018C-Cn for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 14:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1du0ZS-0005aN-7f for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 14:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Sep 2017 18:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28412-submit@debbugs.gnu.org id=B28412.150575847921412 (code B ref 28412); Mon, 18 Sep 2017 18:15:02 +0000 Original-Received: (at 28412) by debbugs.gnu.org; 18 Sep 2017 18:14:39 +0000 Original-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 Original-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 Original-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= In-Reply-To: <838thbj32x.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 18 Sep 2017 21:04:22 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:137072 Archived-At: 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