From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#23425: master branch: `message' wrongly corrupts ' to curly quote. Date: Mon, 2 May 2016 19:10:31 +0000 Message-ID: <20160502191031.GB2048@acm.fritz.box> References: <7e599cf6-18c3-1633-33d5-e9f4eaa8fe6a@cs.ucla.edu> 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 1462218049 4794 80.91.229.3 (2 May 2016 19:40:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 May 2016 19:40:49 +0000 (UTC) Cc: 23425@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 02 21:40:35 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 1axJhp-0004FL-EB for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 May 2016 21:40:33 +0200 Original-Received: from localhost ([::1]:38287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axJhi-0006FL-Da for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 May 2016 15:40:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axJhZ-00061r-3c for bug-gnu-emacs@gnu.org; Mon, 02 May 2016 15:40:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axJhN-0005Bm-7r for bug-gnu-emacs@gnu.org; Mon, 02 May 2016 15:40:11 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axJhN-0005Ay-4a for bug-gnu-emacs@gnu.org; Mon, 02 May 2016 15:40:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1axJhJ-0004iW-Pb for bug-gnu-emacs@gnu.org; Mon, 02 May 2016 15:40:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 May 2016 19:40:01 +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.146221797418078 (code B ref 23425); Mon, 02 May 2016 19:40:01 +0000 Original-Received: (at 23425) by debbugs.gnu.org; 2 May 2016 19:39:34 +0000 Original-Received: from localhost ([127.0.0.1]:34200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axJgr-0004hW-PU for submit@debbugs.gnu.org; Mon, 02 May 2016 15:39:34 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:57235) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axJgp-0004hN-UK for 23425@debbugs.gnu.org; Mon, 02 May 2016 15:39:32 -0400 Original-Received: (qmail 80146 invoked by uid 3782); 2 May 2016 19:39:30 -0000 Original-Received: from acm.muc.de (p548A435F.dip0.t-ipconnect.de [84.138.67.95]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 02 May 2016 21:39:29 +0200 Original-Received: (qmail 6912 invoked by uid 1000); 2 May 2016 19:10:31 -0000 Content-Disposition: inline In-Reply-To: <7e599cf6-18c3-1633-33d5-e9f4eaa8fe6a@cs.ucla.edu> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:117605 Archived-At: Hello, Paul. 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. > Accordingly, I installed the attached patch into the emacs-25 > branch and merged the result to master. That is merely tinkering with the symptoms of the problem. The actual problem is that `message' corrupts strings. > I had already adjusted some other instances of calls to ‘message’ (to > fix problems with % as well as with quotes) but missed this call; > sorry about that. 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. > The behavior of ‘message’ is documented in the manual, in doc strings, It is not. There is no mention of its corruption of quotes in `messages''s doc string. In the Elisp manual there is just the following obscure, and somewhat patronising, paragraph: 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. Curved quotes do not "work better" than straight quotes, as my experience this afternoon demonstrates. Why are readers insulted with "formats"? There is no "formatting" going on here; instead some characters are being expunged, and substituted by other characters. Why is the most important idea in that paragraph, this substitution, slid in as though it was a totally natural thing to do, scarcely worth a mention? Why is there no clear definition of what is meant by the confusing terms "single quotes", "grave quotes", and "straight quotes"? It appears to me that these substitutions are only done on pairs of quote marks, not single quotes. If I'm right, why is this not documented? Why is there no mention of `text-quoting-style' on this page? How do I configure my Emacs so that `message' behaves properly? 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? > 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"? How do I restore the old behaviour of `message'? This information surely belongs in etc/NEWS. As far as I can make out, there is no setting of `text-quoting-style' equivalent to "do nothing". Why not? Not everybody want to "text-quote". Over the months, I've lost a ridiculously large amount of time to these curly quotes. I never want to see them again (even though I'm forced to in precompiled info files). Please document how to expunge them. Can we please fix this before Emacs 25.1 gets released? Otherwise these problems will impact LOTS of users. -- Alan Mackenzie (Nuremberg, Germany).