unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob c1ad827a26e01d4b73061c3bdc649b0b4672ee36 902 bytes (raw)
name: patches/emacs-undohist-ignored.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 
From 52bfd419bf9022726048f818d955b8ea10a16d5c Mon Sep 17 00:00:00 2001
From: Patrick Mosby <info@schreiblogade.de>
Date: Mon, 7 Sep 2015 09:05:56 +0200
Subject: [PATCH] Don't save undo file for ignored files.

This fixes #4.
---
 undohist.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/undohist.el b/undohist.el
index b184a26..de60356 100644
--- a/undohist.el
+++ b/undohist.el
@@ -164,7 +164,8 @@ To use undohist, you just call this function."
                 undohist-ignored-files)))
 
 (defun undohist-save-1 ()
-  (when (consp buffer-undo-list)
+  (when (and (consp buffer-undo-list)
+             (undohist-recover-file-p (buffer-file-name (current-buffer))))
     (let ((file (make-undohist-file-name (buffer-file-name)))
           (contents `((digest . ,(md5 (current-buffer)))
                       (undo-list . ,(undohist-encode buffer-undo-list)))))
-- 
2.21.0


debug log:

solving c1ad827a26e01d4b73061c3bdc649b0b4672ee36 ...
found c1ad827a26e01d4b73061c3bdc649b0b4672ee36 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).