emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org-macs.el: Fix Emacs-26 compatibility
@ 2023-08-11 15:17 Max Nikulin
  2023-08-11 16:27 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Max Nikulin @ 2023-08-11 15:17 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 315 bytes --]

Current state of the main branch is not compatible with Emacs-26.

Loading /home/ubuntu/src/org-mode/lisp/org-compat.el (source)...
Eager macro-expansion failure: (wrong-number-of-arguments (2 . 2) 6)

It is again `setq-local' call with multiple variables. See the attached 
patch that splits it into several parts.

[-- Attachment #2: 0001-org-macs.el-Fix-Emacs-26-compatibility.patch --]
[-- Type: text/x-patch, Size: 1242 bytes --]

From 9bb21fe2354206d3edf0cc7e145f9d4c5a7bd2ec Mon Sep 17 00:00:00 2001
From: Max Nikulin <manikulin@gmail.com>
Date: Fri, 11 Aug 2023 22:13:17 +0700
Subject: [PATCH] org-macs.el: Fix Emacs-26 compatibility

lisp/org-macs.el (org-string-width): Avoid multiple variables in
`setq-local' since it is not supported by Emacs-26.

The code caused the issue was added in 0c29f53ab8723.
---
 lisp/org-macs.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 9533d7b07..442c607d7 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -1117,9 +1117,9 @@ (defun org-string-width (string &optional pixels)
                  result)))
           (current-char-property-alias-alist char-property-alias-alist))
       (with-current-buffer (get-buffer-create " *Org string width*")
-        (setq-local display-line-numbers nil
-                    line-prefix nil
-                    wrap-prefix nil)
+        (setq-local display-line-numbers nil)
+        (setq-local line-prefix nil)
+        (setq-local wrap-prefix nil)
         (setq-local buffer-invisibility-spec
                     (if (listp current-invisibility-spec)
                         (mapcar (lambda (el)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-12  8:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-11 15:17 [PATCH] org-macs.el: Fix Emacs-26 compatibility Max Nikulin
2023-08-11 16:27 ` Ihor Radchenko
2023-08-12  8:21   ` Max Nikulin

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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).