From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Vasilij Schneidermann Newsgroups: gmane.emacs.bugs Subject: bug#25656: [PATCH] 25.1; remember-notes-mode makes every temporary buffer created from it unkillable Date: Fri, 24 Feb 2017 08:40:34 +0100 Message-ID: <20170224074034.GA615@odonien.localdomain> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="17pEHd4RhPHOinZp" X-Trace: blaine.gmane.org 1487922078 14858 195.159.176.226 (24 Feb 2017 07:41:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 24 Feb 2017 07:41:18 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: 25656@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 24 08:41:14 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 1chAV4-00034J-GA for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Feb 2017 08:41:10 +0100 Original-Received: from localhost ([::1]:35249 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chAVA-0003YB-9r for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Feb 2017 02:41:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chAUz-0003Xy-Rj for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2017 02:41:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chAUw-0003kf-Nx for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2017 02:41:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55289) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1chAUw-0003kX-K9 for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2017 02:41:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1chAUw-0007oI-Dn for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2017 02:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Feb 2017 07:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25656 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25656-submit@debbugs.gnu.org id=B25656.148792204429958 (code B ref 25656); Fri, 24 Feb 2017 07:41:02 +0000 Original-Received: (at 25656) by debbugs.gnu.org; 24 Feb 2017 07:40:44 +0000 Original-Received: from localhost ([127.0.0.1]:53486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chAUe-0007n8-86 for submit@debbugs.gnu.org; Fri, 24 Feb 2017 02:40:44 -0500 Original-Received: from mail-wr0-f196.google.com ([209.85.128.196]:36537) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chAUc-0007mW-W0 for 25656@debbugs.gnu.org; Fri, 24 Feb 2017 02:40:43 -0500 Original-Received: by mail-wr0-f196.google.com with SMTP id o22so374737wro.3 for <25656@debbugs.gnu.org>; Thu, 23 Feb 2017 23:40:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=QUmhdb2JlgTAFuzoQMUWDadtBh3UY5ylScxN4IpArJQ=; b=N/9UUry1EXCDxOigVwIRyhRWeUHioc0MFxSkLzFAbdt4A5gv4rw58qir5Pg1vgDM/P 0OnJstrMbheWUwnBw5x4+Xe1dK9BIp8n6ljM8l6TWw6ThTDO7ZNGqMxIl+VYHYv4nIvg AxGZSPR2HD+1Cw2RzM8hhL/igMkm9mgCoKZSa+qtokfbnqjIwzpCThTHlxINMkxLmbDk jdMNUbj8nwgJNandHRMVJ9iWRjXT/MN+iDyJjYpYGzPTwGi6vcYrLo+K2W6B37dLMiiu jJMnmlKsE69yDeC7kMDlAovp7CKggTh0j21iGhzIVRkn84SyGPoKZ5O65Sx3kTHLhn5v NS5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=QUmhdb2JlgTAFuzoQMUWDadtBh3UY5ylScxN4IpArJQ=; b=kaKtF8KzwlEG0XOLQK02rdZfQ3cjTg6sXl5pyU7i9lPnGWCxemnoYqP5WPvZXinAQ/ BzCQyBCncQah+VJR2bS7rVF3eJGMODbDTpUGgGYxzNFk3vkgX/3uA1w2ub915OzkoyxV jxtxY9+uFJTX3USm3fc2CSIdbyjjoGI1/TsCwgA1htAmJlWG5tkQkui/g/MFw71e4VqK T5foi1bJSFliuvmJXx/UlLsBkqWuf1LN+A5myLlhjkq3JhcRQMEYcQyt3PDmXhg7iGo0 cKXgfocczsCaVIChFsxesgPq6L6FtdtdcN6QZksmP9IUgJJArBsLrdNWnrofUWAy2s9G UR5w== X-Gm-Message-State: AMke39nF+yNPp2uU6bKZtAFw3vRMcMFQSvsYIzbBEpcgNnqv9VWYCemNW62fPeAl5mubAA== X-Received: by 10.223.156.2 with SMTP id f2mr1341162wrc.4.1487922036753; Thu, 23 Feb 2017 23:40:36 -0800 (PST) Original-Received: from localhost (dslb-092-072-006-155.092.072.pools.vodafone-ip.de. [92.72.6.155]) by smtp.gmail.com with ESMTPSA id 96sm9207592wrb.14.2017.02.23.23.40.35 for <25656@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Feb 2017 23:40:35 -0800 (PST) Content-Disposition: inline In-Reply-To: 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:129713 Archived-At: --17pEHd4RhPHOinZp Content-Type: text/plain; charset=utf-8 Content-Disposition: inline I wrote a simple patch for merely checking whether the buffer about to be killed happens to be the remember-notes buffer. --17pEHd4RhPHOinZp Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="0001-Make-only-remember-notes-buffer-unkillable.patch" >From b1f95cf53fdb3574525f3644df668f357405f4a1 Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann Date: Fri, 24 Feb 2017 08:36:38 +0100 Subject: [PATCH] Make only remember-notes buffer unkillable * remember.el (remember-notes--kill-buffer-query): Check whether buffer to be killed is the remember-notes buffer --- lisp/textmodes/remember.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el index 388e49cfdc..a217357471 100644 --- a/lisp/textmodes/remember.el +++ b/lisp/textmodes/remember.el @@ -649,7 +649,8 @@ Save the current buffer if modified. If `remember-notes-bury-on-kill' is non-nil, bury it and return nil; otherwise return t." (when (buffer-modified-p) (save-buffer)) - (if remember-notes-bury-on-kill + (if (and remember-notes-bury-on-kill + (equal (buffer-name (current-buffer)) remember-notes-buffer-name)) (progn ;; bury-buffer always returns nil, but let's be explicit. (bury-buffer) -- 2.11.0 --17pEHd4RhPHOinZp--