all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#60454: 30.0.50; `format-message' does not allow displaying "`" and "'" verbatim
@ 2022-12-31 15:04 Ihor Radchenko
  2022-12-31 15:41 ` Andreas Schwab
  2022-12-31 15:42 ` Gregory Heytings
  0 siblings, 2 replies; 7+ messages in thread
From: Ihor Radchenko @ 2022-12-31 15:04 UTC (permalink / raw)
  To: 60454; +Cc: Stefan Monnier

Hi,

Following up https://list.orgmode.org/87k027af5x.fsf@localhost/T/#t
and https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=62dc49509c8962bd2a19c4c4475fc616eebdfde8

`format-message' and thus also `warn' unconditionally replace _all_ the
instances of "`" and "'" in the message:

    This acts like ‘format’, except it also replaces each grave accent (`)
    by a left quote, and each apostrophe (') by a right quote.

However, sometimes, it is desired to keep these chars literal.
For example, `org-assert-version' displays a warning that suggests Elisp
code:

(warn "...
   It is recommended to put
    (straight-use-package 'org)
...")

Replacing "'" is undesired here and will make copy-pasted Elisp code
incorrect.

Would it be possible to introduce some kind of escape mechanism in
`format-message' to produce literal "'" and "`" when needed?

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.35, cairo version 1.17.6) of 2022-12-26 built on localhost
Repository revision: cc29fab3a66c59e77d0ff67c0f3e2e34ec80a03c
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Gentoo Linux

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>





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

end of thread, other threads:[~2022-12-31 20:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-31 15:04 bug#60454: 30.0.50; `format-message' does not allow displaying "`" and "'" verbatim Ihor Radchenko
2022-12-31 15:41 ` Andreas Schwab
2022-12-31 16:39   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-31 15:42 ` Gregory Heytings
2022-12-31 17:06   ` Ihor Radchenko
2022-12-31 19:29     ` Gregory Heytings
2022-12-31 20:17       ` Gregory Heytings

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.