Subject: Re: [PATCH] 25.1; remember-notes-mode makes every temporary buffer created from it unkillable

From: Vasilij Schneidermann <[email-masked]>
Date: Fri, 24 Feb 2017 08:40:34 +0100

I wrote a simple patch for merely checking whether the buffer about to
be killed happens to be the remember-notes buffer.
>From b1f95cf53fdb3574525f3644df668f357405f4a1 Mon Sep 17 00:00:00 2001
From: Vasilij Schneidermann <[email-masked]>
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