From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 9ce1d38: Use curved quotes in core elisp diagnostics Date: Sun, 23 Aug 2015 00:30:30 -0400 Message-ID: References: <20150816160149.9416.80132@vcs.savannah.gnu.org> <55D1043C.3030909@yandex.ru> <55D15899.2070105@cs.ucla.edu> <55D1C9CE.2060407@yandex.ru> <55D20EDF.5070906@cs.ucla.edu> <55D223CA.4080109@yandex.ru> <55D22A1F.8040508@cs.ucla.edu> <55D22CF4.9030608@yandex.ru> <55D2747D.10809@cs.ucla.edu> <55D317A9.6000805@yandex.ru> <55D42210.9070703@cs.ucla.edu> <55D48503.3020406@yandex.ru> <55D50159.2030104@cs.ucla.edu> <55D62B31.3010100@cs.ucla.edu> <55D8A3E9.3070704@yandex.ru> <55D8C3E8.2010707@cs.ucla.edu> <55D8E4F3.6060406@yandex.ru> <55D8FB22.4080503@cs.ucla.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1440304273 13482 80.91.229.3 (23 Aug 2015 04:31:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Aug 2015 04:31:13 +0000 (UTC) Cc: emacs-devel@gnu.org, dgutov@yandex.ru To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 23 06:31:04 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZTMvv-0001gB-FN for ged-emacs-devel@m.gmane.org; Sun, 23 Aug 2015 06:31:03 +0200 Original-Received: from localhost ([::1]:49219 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTMvu-0002TU-El for ged-emacs-devel@m.gmane.org; Sun, 23 Aug 2015 00:31:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTMvr-0002TB-0d for emacs-devel@gnu.org; Sun, 23 Aug 2015 00:30:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTMvp-0002o3-VT for emacs-devel@gnu.org; Sun, 23 Aug 2015 00:30:58 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50750) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTMvP-0002To-2l; Sun, 23 Aug 2015 00:30:31 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ZTMvO-00062e-9q; Sun, 23 Aug 2015 00:30:30 -0400 In-reply-to: <55D8FB22.4080503@cs.ucla.edu> (message from Paul Eggert on Sat, 22 Aug 2015 15:43:46 -0700) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:189076 Archived-At: [[[ 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 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.