GNU bug report logs - #57427
[PATCH] gnu: emacs-polymode: Add patch for native compilation.

Previous Next

Package: guix-patches;

Reported by: Hilton Chain <hako <at> ultrarare.space>

Date: Fri, 26 Aug 2022 14:07:01 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57427 in the body.
You can then email your comments to 57427 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#57427; Package guix-patches. (Fri, 26 Aug 2022 14:07:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hilton Chain <hako <at> ultrarare.space>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 26 Aug 2022 14:07:01 GMT) Full text and rfc822 format available.

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

From: Hilton Chain <hako <at> ultrarare.space>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: emacs-polymode: Add patch for native compilation.
Date: Fri, 26 Aug 2022 22:05:45 +0800
From 9615148440a3be38e8763bdd611568761511f0f7 Mon Sep 17 00:00:00 2001
From: Hilton Chain <hako <at> ultrarare.space>
Date: Fri, 26 Aug 2022 21:41:37 +0800
Subject: [PATCH] gnu: emacs-polymode: Add patch for native compilation.

* gnu/packages/emacs-xyz.scm (emacs-polymode)[source]: Add patch.
* gnu/packages/patches/emacs-polymode-fix-lexical-variable-error.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |  2 +
 gnu/packages/emacs-xyz.scm                    |  5 ++-
 ...-polymode-fix-lexical-variable-error.patch | 37 +++++++++++++++++++
 3 files changed, 43 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/emacs-polymode-fix-lexical-variable-error.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 26dfb6afe2..03d5f2ff15 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -51,6 +51,7 @@
 # Copyright © 2022 Remco van 't Veer <remco <at> remworks.net>
 # Copyright © 2022 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
 # Copyright © 2022 John Kehayias <john.kehayias <at> protonmail.com>
+# Copyright © 2022 Hilton Chain <hako <at> ultrarare.space>
 #
 # This file is part of GNU Guix.
 #
@@ -1040,6 +1041,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/emacs-highlight-stages-add-gexp.patch	\
   %D%/packages/patches/emacs-libgit-use-system-libgit2.patch    \
   %D%/packages/patches/emacs-lispy-fix-thread-last-test.patch   \
+  %D%/packages/patches/emacs-polymode-fix-lexical-variable-error.patch  \
   %D%/packages/patches/emacs-source-date-epoch.patch		\
   %D%/packages/patches/emacs-telega-path-placeholder.patch	\
   %D%/packages/patches/emacs-telega-test-env.patch		\
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 379c5fb22c..69fa392eee 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -17308,7 +17308,10 @@ (define-public emacs-polymode
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "18ssl2h861dm2jkd3df6wkfr48p8zk337dbvpq5522kia7fq1lbn"))))
+        (base32 "18ssl2h861dm2jkd3df6wkfr48p8zk337dbvpq5522kia7fq1lbn"))
+       ;; Cherry-picked from upstream, remove when bumping to 0.2.3.
+       (patches
+        (search-patches "emacs-polymode-fix-lexical-variable-error.patch"))))
     (build-system emacs-build-system)
     (home-page "https://github.com/polymode/polymode")
     (synopsis "Framework for multiple Emacs modes based on indirect buffers")
diff --git a/gnu/packages/patches/emacs-polymode-fix-lexical-variable-error.patch b/gnu/packages/patches/emacs-polymode-fix-lexical-variable-error.patch
new file mode 100644
index 0000000000..77a8452c2a
--- /dev/null
+++ b/gnu/packages/patches/emacs-polymode-fix-lexical-variable-error.patch
@@ -0,0 +1,37 @@
+From 8b83fa772a71efc9dc030c43db2cba944e4338c1 Mon Sep 17 00:00:00 2001
+From: Kien Nguyen <kien.n.quang <at> gmail.com>
+Date: Wed, 19 May 2021 23:15:01 +0900
+Subject: [PATCH] Fix using of temporary lexical variable causes error in
+ native compiling
+
+---
+ polymode-core.el | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/polymode-core.el b/polymode-core.el
+index e7d40be..ef316f8 100644
+--- a/polymode-core.el
++++ b/polymode-core.el
+@@ -2088,14 +2088,14 @@ Elements of LIST can be either strings or symbols."
+                              (stringp pm--output-file)
+                              (pm--file-mod-time pm--output-file)))
+                    (imt (and omt (pm--file-mod-time pm--input-file)))
+-                   (action (if is-exporter "exporting" "weaving"))
+                    (ofile (if (and imt (time-less-p imt omt))
+                               (progn
+                                 (message "Not re-%s as input file '%s' hasn't changed"
+-                                         (file-name-nondirectory ifile) action)
++                                         (if is-exporter "exporting" "weaving")
++                                         (file-name-nondirectory ifile))
+                                 pm--output-file)
+                             (message "%s '%s' with '%s' ..."
+-                                     (capitalize action)
++                                     (if is-exporter "EXPORTING" "WEAVING")
+                                      (file-name-nondirectory ifile)
+                                      (eieio-object-name processor))
+                             (let ((fn (with-no-warnings
+
+base-commit: 44265e35161d77f6eaa09388ea2256b89bd5dcc8
+-- 
+2.37.2
+

base-commit: de2f419618b9929cf65b477568f21bc77e218b70
-- 
2.37.2





Information forwarded to guix-patches <at> gnu.org:
bug#57427; Package guix-patches. (Sun, 18 Sep 2022 12:18:01 GMT) Full text and rfc822 format available.

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

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Hilton Chain via Guix-patches via <guix-patches <at> gnu.org>
Cc: Hilton Chain <hako <at> ultrarare.space>, 57427-done <at> debbugs.gnu.org
Subject: Re: [bug#57427] [PATCH] gnu: emacs-polymode: Add patch for native
 compilation.
Date: Sun, 18 Sep 2022 14:17:22 +0200
Hello,

Hilton Chain via Guix-patches via <guix-patches <at> gnu.org> writes:

> From 9615148440a3be38e8763bdd611568761511f0f7 Mon Sep 17 00:00:00 2001
> From: Hilton Chain <hako <at> ultrarare.space>
> Date: Fri, 26 Aug 2022 21:41:37 +0800
> Subject: [PATCH] gnu: emacs-polymode: Add patch for native
> compilation.

Applied (finally!). Thank you.

Regards,
-- 
Nicolas Goaziou




Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Sun, 18 Sep 2022 12:18:02 GMT) Full text and rfc822 format available.

Notification sent to Hilton Chain <hako <at> ultrarare.space>:
bug acknowledged by developer. (Sun, 18 Sep 2022 12:18:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 17 Oct 2022 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 190 days ago.

Previous Next


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