From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs,gmane.emacs.devel Subject: bug#23425: master branch: `message' wrongly corrupts ' to curly quote. Date: Sun, 4 Jun 2017 14:01:42 -0700 Organization: UCLA Computer Science Department Message-ID: References: <4019c1e5-36b4-745f-b299-16b074bff81e@cs.ucla.edu> <83zis4h59w.fsf@gnu.org> <51a2ae75-71f7-10f6-ae2a-7c830bdf0a30@cs.ucla.edu> <17c1c00d-a275-5e61-0c47-6872a64a9347@cs.ucla.edu> <20170531212452.GA3789@acm.fritz.box> <07bf5f9d-e8cd-a4d9-1843-b488bfe0b92c@cs.ucla.edu> <20170602210209.GA3570@acm.fritz.box> <11c0adfb-7fdd-8d28-1a47-869e3e7043ea@cs.ucla.edu> <20170603205331.GA2130@acm.fritz.box> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1496610131 14492 195.159.176.226 (4 Jun 2017 21:02:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Jun 2017 21:02:11 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 Cc: 23425@debbugs.gnu.org To: emacs-devel@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 04 23:02:07 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHcf0-0003RT-Gn for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Jun 2017 23:02:06 +0200 Original-Received: from localhost ([::1]:58688 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHcf5-0006m7-FM for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Jun 2017 17:02:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHcew-0006km-UD for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2017 17:02:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHcew-0003Yr-2z for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2017 17:02:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53495) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHcew-0003YP-07 for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2017 17:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dHcev-0000j7-MN for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2017 17:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Jun 2017 21:02: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.14966101122779 (code B ref 23425); Sun, 04 Jun 2017 21:02:01 +0000 Original-Received: (at 23425) by debbugs.gnu.org; 4 Jun 2017 21:01:52 +0000 Original-Received: from localhost ([127.0.0.1]:56172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHcem-0000il-C7 for submit@debbugs.gnu.org; Sun, 04 Jun 2017 17:01:52 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:53126) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHcek-0000iZ-Dh for 23425@debbugs.gnu.org; Sun, 04 Jun 2017 17:01:51 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 951661600E3; Sun, 4 Jun 2017 14:01:43 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id hLax0kMHAhio; Sun, 4 Jun 2017 14:01:42 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id BC3751600E8; Sun, 4 Jun 2017 14:01:42 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id f_ah0hcJKoYz; Sun, 4 Jun 2017 14:01:42 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [47.153.188.248]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 9D35E1600E3; Sun, 4 Jun 2017 14:01:42 -0700 (PDT) In-Reply-To: <20170603205331.GA2130@acm.fritz.box> Content-Language: en-US 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:133271 gmane.emacs.devel:215447 Archived-At: Alan Mackenzie wrote: > We have moved from a state where everybody knew what > `message' did (in Emacs 24), to one with wild special characters which > only apply sometimes, and necessitate crazy prolix formulations to work > around unwanted translations of quote characters. This exaggerates somewhat. We moved from Emacs 24 where only % is special= , to=20 Emacs 25 where %, ` and ' are special. Although some people don't know th= at `=20 and ' are special, that's also true for %. And although it can be annoyin= g to=20 write (message "%s" STR) to avoid unwanted translation of STR, that annoy= ance=20 was already present for %. > it makes sense to shift this burden over to the use cases where the > programmers need quote translation, and hence will be aware of it. When text-quoting-style specifies translation, most instances of ` and ' = in=20 Emacs messages are better off translated. So it also makes sense to trans= late by=20 default in this situation, with a way to avoid translation in the rare ca= ses=20 where translation isn't wanted. The question is about which approach make= s more=20 sense, not whether one approach is sensible and the other nonsense. >> although it simplifies =E2=80=98message=E2=80=99 (obviously), this is = at the price of >> complicating everything else. >=20 > What is the "everything else" that gets thus complicated? I was referring to the hassle of going through hundreds or thousands of m= essage=20 strings or calls, deciding which instances of ` and ' should be replaced = with %`=20 and %', and replacing the instances accordingly. It's also possible that = at=20 times we'll need two format strings instead of one, complicating the code= . > There are around 17,000 > occurrances of "message" in our Lisp sources, and probably a few in our > C sources. Only (some of) those containing the quote characters in the > format string would need amendment. These will comprise a tiny portion > of these ~17,000 How many lines do you think will be in that "tiny portion"? No matter how= you=20 count them, it'll be quite a few changes. > and can be found easily enough with a script I'm afraid not, because in many cases the string is not a simple literal=20 constant argument to the message function. For starters, there's also the= error=20 function; that's another 14,000 text matches in the Elisp source -- many = of them=20 false alarms of course, but not all of them. I'm not saying this sort of change is impossible. It's just that it'd be = quite a=20 bit of work, work that someone would need to volunteer to do. Is this rea= lly the=20 best use of our limited resources?