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 19:55:45 +0300 Message-ID: <831t5jkrn2.fsf@gnu.org> References: <7e599cf6-18c3-1633-33d5-e9f4eaa8fe6a@cs.ucla.edu> <20160502191031.GB2048@acm.fritz.box> <83a8k7kv87.fsf@gnu.org> <20160503162716.GB11330@acm.fritz.box> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1462294684 24504 80.91.229.3 (3 May 2016 16:58:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 May 2016 16:58:04 +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 18:57:49 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 1axdde-00053H-Vu for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 May 2016 18:57:35 +0200 Original-Received: from localhost ([::1]:42278 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axddb-0001KQ-95 for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 May 2016 12:57:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axddR-00016N-Mx for bug-gnu-emacs@gnu.org; Tue, 03 May 2016 12:57:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axddB-000107-O7 for bug-gnu-emacs@gnu.org; Tue, 03 May 2016 12:57:12 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axddB-0000yZ-LL for bug-gnu-emacs@gnu.org; Tue, 03 May 2016 12:57:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1axdd8-0000qY-6g for bug-gnu-emacs@gnu.org; Tue, 03 May 2016 12:57: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 16:57: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.14622945653188 (code B ref 23425); Tue, 03 May 2016 16:57:02 +0000 Original-Received: (at 23425) by debbugs.gnu.org; 3 May 2016 16:56:05 +0000 Original-Received: from localhost ([127.0.0.1]:35573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axdcC-0000pL-NO for submit@debbugs.gnu.org; Tue, 03 May 2016 12:56:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axdcA-0000os-J6 for 23425@debbugs.gnu.org; Tue, 03 May 2016 12:56:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axdbv-0000Bv-4S for 23425@debbugs.gnu.org; Tue, 03 May 2016 12:55:54 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axdbv-000093-05; Tue, 03 May 2016 12:55:47 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4651 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1axdbo-0001f4-Fh; Tue, 03 May 2016 12:55:41 -0400 In-reply-to: <20160503162716.GB11330@acm.fritz.box> (message from Alan Mackenzie on Tue, 3 May 2016 16:27:16 +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:117654 Archived-At: > Date: Tue, 3 May 2016 16:27:16 +0000 > Cc: eggert@cs.ucla.edu, 23425@debbugs.gnu.org > From: Alan Mackenzie > > > > (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? > > I suppose so. Have you got anything agains me putting that suggestion > into etc/NEWS, in the entry for `message'? No, I have nothing against that. > > > 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. > > Only in the form of characters I can't distinguish on my terminal, and > couldn't even if they were distinct due to my failing eyesight ;-). And > not in the form I would need to be able to program with them, such as > their ASCII/UTF-8 codes. Well, a picture is worth about a thousand words. I very much doubt one could explain that clearly enough, if we assume the characters are not displayed correctly and that the user isn't already familiar with the terminology. How do you "define" character by just talking about them, without showing their glyphs?? > > > 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. > > If I need to output source code using `message', I will need to bind > `text-quoting-style' to a sensible value, won't I? No, you just need to use "%s" as the first argument, that's all. > And why is it something that users shouldn't routinely do? Because the theory behind this change is that everyone will want that, certainly after they get used to it a little. If that theory is wrong, we will have to change much more than just document that variable or teach users to use it more. > Surely it should be a configuration variable. Some people, like me, > don't like being lied to by a computer program. You are not being lied to. Just think of ` and ' as yet another format specifier character, not unlike %. > > > 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. > > I'd like it to be fixed in the code. :-) You mean, disable the conversion? Not going to happen before 25.1, and unless there's a user outcry, not going to happen, period. That's why I think we should use the default, and find and fix any leftovers like the one which started this discussion. > > > 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. > > No, `grave' doesn't work. This changes curly quotes to ASCII quotes, i.e. > it distorts the input and loses information. ??? Are we talking about the same issue? emacs -Q M-: (setq text-quoting-style 'grave) RET M-: (message "`this'") RET => `this' What am I missing? > > > 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. > > No. This particular change causes previously working lisp code (such as > my function from yesterday) to stop working. Like any other change can. > > > How do I restore the old behaviour of `message'? > > > By setting text-quoting-style. But again, please don't. > > I want my Emacs to deliver messages to me as they were intended by the > people who wrote them. I have a visceral disgust of and hate for this > distortion of strings caused by this translation of quotes. I'm sure I'm > not the only person who feels like this (and indeed, there were > snide/sarcastic remarks on this list yesterday in my support). You are not just anyone. You are a core developer and a maintainer of several important packages. That is a responsibility that places an onus on us to "suffer" a little so that bugs will be detected and fixed sooner rather than latter. In general, developers should try using as many defaults as they can, for that very reason -- to see the problems that users will as soon as possible. If you still don't want that, I cannot force you. It's just that there's so few of us that every single one counts. > > > Can we please fix this before Emacs 25.1 gets released? > > > What fix would you like to see? I'm not sure I understand. > > I want there to be an additional value `leave' for `text-quoting-style' > which would suppress all substitution of quotes. See above: I'm missing something here, because I don't understand why is that needed.