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: Richard Stallman
Subject: Re: [Emacs-diffs] master 9ce1d38: Use curved quotes in core elisp diagnostics
Date: Sun, 23 Aug 2015 00:30:30 -0400

[[[ 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. ]]]

  >    (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.

That is true -- but the problem case is unusual, and the harm done
when it happens is not a disaster.  Meanwhile, it is not clear how to
solve the problem 100%.

We know how to do quoting that is reliable.  print does that for strings.
But that looks bad in these error messages.  Do we really want to make them
ugly in .1% of the cases to avoid ambiguity in .001% of the cases,
which will confuse the user in only .00001% of the cases?

(Those figures are guesses but I expect they are in the ballpark.)

Dmitry Gutov <address@hidden> wrote:

  > An ambiguity in `format' can cause an 
  > unexpected error due to a program, say, being unable to open a file.

That would happen only if you're trying to parse the output and use
the result, and that seems like bad practice to me.

-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.




reply via email to

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