all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#69168: [BUG] 30.0.50; pp-emacs-lisp-code produces invalid elisp for backquoted forms
@ 2024-02-15 19:19 No Wayman
  2024-02-16  2:11 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 10+ messages in thread
From: No Wayman @ 2024-02-15 19:19 UTC (permalink / raw)
  To: 69168


Observe the output of the following two expressions:


(eval (read (with-temp-buffer
              (pp-emacs-lisp-code '`(1+ ,(1+ 1)))
              (buffer-string)))
      t)

;; => eval: Invalid function: `(1+ (,(1+ 1)))

(eval
 (read (with-temp-buffer
         (insert (pp-to-string '`(1+ ,(1+ 1))))
         (buffer-string)))
 t)

;; => (1+ 2)


The form returned by pp-emacs-lisp-code is:

(` (1+ (, (1+ 1))))

The backqoute and comma are not escaped, resulting in the error.
It looks like the logic in pp--insert-lisp would need to be 
extended to account for backquoting constructs.

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.41, cairo version 1.18.0) of 2024-02-03 built on laptop
Repository revision: 4ebded3f5ee8617ac6b1debaa01706cd78206f39
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 
11.0.12101011
System Description: Arch Linux





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

end of thread, other threads:[~2024-03-11  4:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-15 19:19 bug#69168: [BUG] 30.0.50; pp-emacs-lisp-code produces invalid elisp for backquoted forms No Wayman
2024-02-16  2:11 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-25  5:00   ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-25  6:39     ` Eli Zaretskii
2024-02-25  8:02       ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-29  2:30         ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-09  8:49           ` Eli Zaretskii
2024-03-09 15:34             ` Drew Adams
2024-03-11  4:48             ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-25 15:08       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this external index

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