GNU bug report logs - #51258
emacs-next/git-master broken due to pdmp file naming changes

Previous Next

Package: guix;

Reported by: Paxton Evans <paxton <at> riseup.net>

Date: Mon, 18 Oct 2021 04:00:04 UTC

Severity: normal

Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 51258 <at> debbugs.gnu.org (full text, mbox):

From: Morgan.J.Smith <at> outlook.com
To: 51258 <at> debbugs.gnu.org,
	paxton <at> riseup.net
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Subject: [PATCH] gnu: emacs: Handle pdump filenames that contain a fingerprint
Date: Mon, 18 Oct 2021 19:50:21 -0400
From: Morgan Smith <Morgan.J.Smith <at> outlook.com>

* gnu/packages/emacs.scm (emacs) [restore-emacs-pdmp]: Add regex to handle
filenames that have a fingerprint in them
---

Fixed your problem.  Well it was also my problem.  The regex is pretty simple but probably a little intimidating if you've never done it before.  I highly recommend reading up on ERE's and BRE's from the POSIX specification if you have time.  I still don't exactly know how guile does regex but knowing POSIX regex has served me quite well.

I've tested this patch and it works great for me on the latest emacs commit.  It should also be backwards compatible so that's nice.


 gnu/packages/emacs.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 6d9950d068..6ebcfecbc7 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -183,9 +183,10 @@ (define* (emacs-byte-compile-directory dir)
              (let* ((libexec (string-append (assoc-ref outputs "out")
                                             "/libexec"))
                     ;; each of these find-files should return one file
-                    (pdmp (find-files libexec "^emacs\\.pdmp$"))
+                    ;; there might be a fingerprint in the name
+                    (pdmp (find-files libexec "^emacs(-[[:xdigit:]]+)?\\.pdmp$"))
                     (pdmp-real (find-files libexec
-                                           "^\\.emacs\\.pdmp-real$")))
+                                           "^\\.emacs(-[[:xdigit:]]+)?\\.pdmp-real$")))
                (for-each (lambda (wrapper real)
                            (delete-file wrapper)
                            (rename-file real wrapper))
-- 
2.33.0





This bug report was last modified 3 years and 209 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.