[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master 9ce1d38: Use curved quotes in core elisp diagno

From: Paul Eggert
Subject: Re: [Emacs-diffs] master 9ce1d38: Use curved quotes in core elisp diagnostics
Date: Sun, 23 Aug 2015 18:10:33 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0

Richard Stallman wrote:
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

   > Here's what's implemented in master now (either works):

   >    (format "‘add-to-list’ can't use var ‘%s’; use ‘push’ or ‘cl-pushnew’" 

That's not a feature -- it is just a way you can use the old 'format'

The feature has been removed in master due to compatibility concerns, so this part of the discussion is moot now. However, the idea was that ‘format’ requoted as per user preference, so that the resulting string would look like this:

   "`add-to-list' can't use var `foo'; use `push' or `cl-pushnew'"

if SYM was "foo" and the user preferred the grave quoting style.

I'm working on a patch to do this sort of requoting in a separate new function, which should resolve the compatibility concerns.

   >    (format "%q can't use var %qs; use %qs or %qs" "add-to-list" sym "push"
   > "cl-pushnew")

what is the difference between %q and %qs?

Sorry, the first %q was a typo; it should have been %qs.

   > Digraphs were proposed, but not implemented:

   >    (format "%<add-to-list%> can't use var %<%s%>; use %<push%> or
   > %<cl-pushnew%>" sym)

That seems much cleaner, since it does not require moving fixed parts
of the message out of the format string.

Does anyone have an objection to this feature?

Yes, it's ugly and hard to read and maintain. It's reminsicent of the trigraphs of ANSI C (and it's being introduced for the same reasons!) and in the long run it would suffer the same fate as trigraphs.

It's simpler when one can cut and paste text from text files into Lisp strings and vice versa, and have it just work. Requiring escapes like %< and %> would work against this simplicity. Obviously we can't always cut and paste arbitrary text, but we should be able to do so with single quotes without having to resort to a trigraph-like syntax.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]