emacs-devel
[Top][All Lists]
Advanced

[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: Sat, 22 Aug 2015 15:43:46 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0

Dmitry Gutov wrote:
On 08/22/2015 09:48 PM, Paul Eggert wrote:
Dmitry Gutov wrote:

Regarding automatic translation in `format': do you anticipate someone,
somewhere, having a file with "‘add-to-list’" in its name

Emacs diagnostics that use quotes have never worked well when they quote
a file name or any other string that contains quotes or newlines.

I'm not talking about diagnostics, just about the function `format', which is
used in different contexts.

Sorry, I'm not understanding the distinction. The standard diagnostics functions ‘message’, ‘error’, etc. all call ‘format’. Any of these functions can run into trouble when quoting a file name that can contain arbitrary characters.

For example:

  (format "Moving file ‘%s’ to ‘%s’" src dest)
  (message "Moving file ‘%s’ to ‘%s’" src dest)
  (error "Cannot move file ‘%s’ to ‘%s’" src dest)

All three uses generate ambiguous output if SRC and DEST can contain arbitrary characters, and this is true even if we fiddle with the format strings’ quoting styles.



reply via email to

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