* [bug#35029] [PATCH] Add emacs-undohist-el
@ 2019-03-28 4:32 Brian Leung
2019-04-05 15:58 ` bug#35029: " Oleg Pykhalov
0 siblings, 1 reply; 2+ messages in thread
From: Brian Leung @ 2019-03-28 4:32 UTC (permalink / raw)
To: 35029
[-- Attachment #1.1: Type: text/plain, Size: 14 bytes --]
See attached.
[-- Attachment #1.2: Type: text/html, Size: 39 bytes --]
[-- Attachment #2: 0001-gnu-Add-emacs-undohist-el.patch --]
[-- Type: text/x-patch, Size: 3045 bytes --]
From 0c1c572ccb4e41d164cd68754767cf8fe4994a86 Mon Sep 17 00:00:00 2001
From: Brian Leung <bkleung89@gmail.com>
Date: Thu, 28 Mar 2019 05:30:06 +0100
Subject: [PATCH] gnu: Add emacs-undohist-el.
* gnu/packages/emacs-xyz.scm (emacs-undohist-el): New variable.
* gnu/packages/patches/emacs-undohist-ignored.patch: New file.
---
gnu/packages/emacs-xyz.scm | 23 ++++++++++++++++
.../patches/emacs-undohist-ignored.patch | 27 +++++++++++++++++++
2 files changed, 50 insertions(+)
create mode 100644 gnu/packages/patches/emacs-undohist-ignored.patch
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 7554b02599..8601525a28 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -4485,6 +4485,29 @@ Emacs default configuration in uncontroversial ways that nearly everyone can
agree upon.")
(license license:gpl3+)))
+(define-public emacs-undohist-el
+ (let ((commit "d2239a5f736724ceb9e3b6bcaa86f4064805cda0")
+ (revision "1"))
+ (package
+ (name "emacs-undohist-el")
+ (version (git-version "0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/m2ym/undohist-el")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1c0daw246ky7b1x5b8h55x79pl1pjqk1k348l487bdd8zdj4w9wx"))))
+ (build-system emacs-build-system)
+ (home-page "https://github.com/m2ym/undohist-el")
+ (synopsis "Save undo history between sessions")
+ (description "This package allows persistent use of undo history for
+individual file buffers.")
+ (license license:gpl3+))))
+
(define-public emacs-eprime
(let ((commit "17a481af26496be91c07139a9bfc05cfe722506f"))
(package
diff --git a/gnu/packages/patches/emacs-undohist-ignored.patch b/gnu/packages/patches/emacs-undohist-ignored.patch
new file mode 100644
index 0000000000..c1ad827a26
--- /dev/null
+++ b/gnu/packages/patches/emacs-undohist-ignored.patch
@@ -0,0 +1,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
+
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#35029: [PATCH] Add emacs-undohist-el
2019-03-28 4:32 [bug#35029] [PATCH] Add emacs-undohist-el Brian Leung
@ 2019-04-05 15:58 ` Oleg Pykhalov
0 siblings, 0 replies; 2+ messages in thread
From: Oleg Pykhalov @ 2019-04-05 15:58 UTC (permalink / raw)
To: Brian Leung; +Cc: 35029-done
[-- Attachment #1: Type: text/plain, Size: 392 bytes --]
Hello Brian,
Brian Leung <bkleung89@gmail.com> writes:
> See attached.
Pushed as 3dbd240937a7fb4322db21bc1bf6189a1a512223 with adding a line to
‘gnu/local.mk’. Also the package recipe didn't apply the patch, because
it wasn't declared in ‘(source … (patches ; …))’, and I didn't catch
this before a push. Fixed in 37aaf9a8c7d64ae69c4670a12f481dfc0aac53ae.
Oleg.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-05 16:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-28 4:32 [bug#35029] [PATCH] Add emacs-undohist-el Brian Leung
2019-04-05 15:58 ` bug#35029: " Oleg Pykhalov
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.