From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23425: master branch: `message' wrongly corrupts ' to curly quote. Date: Tue, 03 May 2016 18:38:16 +0300 Message-ID: <83a8k7kv87.fsf@gnu.org> References: <7e599cf6-18c3-1633-33d5-e9f4eaa8fe6a@cs.ucla.edu> <20160502191031.GB2048@acm.fritz.box> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1462289984 7690 80.91.229.3 (3 May 2016 15:39:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 May 2016 15:39:44 +0000 (UTC) Cc: eggert@cs.ucla.edu, 23425@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 03 17:39:32 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1axcQ7-0001D0-5o for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 May 2016 17:39:31 +0200 Original-Received: from localhost ([::1]:41800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axcQ3-0001ed-9Z for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 May 2016 11:39:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axcPt-0001QE-S5 for bug-gnu-emacs@gnu.org; Tue, 03 May 2016 11:39:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axcPh-0005Cs-Uq for bug-gnu-emacs@gnu.org; Tue, 03 May 2016 11:39:12 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axcPh-0005Bk-R6 for bug-gnu-emacs@gnu.org; Tue, 03 May 2016 11:39:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1axcPe-0007Mj-D0 for bug-gnu-emacs@gnu.org; Tue, 03 May 2016 11:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 May 2016 15:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23425 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23425-submit@debbugs.gnu.org id=B23425.146228991328278 (code B ref 23425); Tue, 03 May 2016 15:39:02 +0000 Original-Received: (at 23425) by debbugs.gnu.org; 3 May 2016 15:38:33 +0000 Original-Received: from localhost ([127.0.0.1]:35505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axcPA-0007M2-QD for submit@debbugs.gnu.org; Tue, 03 May 2016 11:38:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axcP9-0007Lo-8V for 23425@debbugs.gnu.org; Tue, 03 May 2016 11:38:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axcOu-0004xi-HH for 23425@debbugs.gnu.org; Tue, 03 May 2016 11:38:22 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54091) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axcOu-0004wY-Ea; Tue, 03 May 2016 11:38:16 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4531 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1axcOo-000190-8k; Tue, 03 May 2016 11:38:10 -0400 In-reply-to: <20160502191031.GB2048@acm.fritz.box> (message from Alan Mackenzie on Mon, 2 May 2016 19:10:31 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:117641 Archived-At: > Date: Mon, 2 May 2016 19:10:31 +0000 > From: Alan Mackenzie > Cc: 23425@debbugs.gnu.org > > Hello, Paul. Hello, Alan. First, I understand your frustration, and I'm sorry you lost time over this issue. This happens sometimes when new developments go against our muscle memory. Having said that... > On Mon, May 02, 2016 at 10:53:59AM -0700, Paul Eggert wrote: > > (message "%s" M) is the usual way to output a message M without > > formatting it, and something like this is needed anyway if M might > > contain %. > > That is the case for a string that might contain percent characters. It > is not the case for a string known to be without percents. It is now. In general, the first argument of 'message' is not copied to output verbatim, so the advice to use "%s" is a sound one. Especially when you are going to display a string that is produced dynamically, and so you don't have complete control on the result. It's simply dangerous. We just got one more use case in support of that advice. > There was nothing wrong with `c-replay-parse-state-state'; it used > `message' as documented. Your change implies that your workaround for > `message''s problems is instead to write something like: > > (message "%s" (format "......." .....)) > > , which is ridiculous. I don't see it as ridiculous. You'd have similar problems (and use the same solution) if the string produced by 'format' included % characters, right? > In a format string containing single quotes, curved quotes `like > this' and grave quotes `like this' work better than straight > quotes 'like this', as `message' typically formats every straight > quote as a curved closing quote. > [...] > Why is there no clear definition of what is meant by the confusing terms > "single quotes", "grave quotes", and "straight quotes"? Not sure what you mean: AFAICT, the definition is right there in the text you cited. > Why is there no mention of `text-quoting-style' on this page? Because we don't want to advertise it too much. It is supposed to be a kind of "fire escape", not something users must routinely do. If that assumption is wrong, then having this prominently mentioned in the manual will be the least of our troubles. > How do I configure my Emacs so that `message' behaves properly? I urge you not to do that. Because if you do, problems like this one will slip unnoticed, instead of being fixed in the code. > Properly, for me, means that it handles percent escape sequences, AND > OTHERWISE LEAVES THE STRING UNCHANGED. Why is this information not in > the manual and the doc string? AFAICT, 'grave' is that value. And it is documented. > > and the quoting change in Emacs 25 is documented in etc/NEWS, so it is > > not a bug per se. > > Why is it not in the section "incompatible Lisp changes"? Because it isn't. If this is an incompatible change, then every new features that changes behavior is also an incompatible change. > How do I restore the old behaviour of `message'? By setting text-quoting-style. But again, please don't. > Can we please fix this before Emacs 25.1 gets released? What fix would you like to see? I'm not sure I understand. Thanks.