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 Subject: bug#23425: master branch: `message' wrongly corrupts ' to curly quote. Date: Fri, 9 Jun 2017 14:44:54 -0700 Organization: UCLA Computer Science Department Message-ID: <3b2a119e-7c2e-e906-dea0-ae91aca80f33@cs.ucla.edu> References: <20170603205331.GA2130@acm.fritz.box> <20170605162737.GA30946@acm.fritz.box> <20170605203753.GB30946@acm.fritz.box> <20170607191344.GB2430@acm.fritz.box> <20170608173400.GA2662@acm.fritz.box> <20170609194141.GA3410@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 1497044777 2875 195.159.176.226 (9 Jun 2017 21:46:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Jun 2017 21:46:17 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 Cc: 23425@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 09 23:46:12 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 1dJRjP-0000Kx-Qp for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Jun 2017 23:46:12 +0200 Original-Received: from localhost ([::1]:56464 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJRjT-00044g-7I for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Jun 2017 17:46:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJRjM-00044Q-0n for bug-gnu-emacs@gnu.org; Fri, 09 Jun 2017 17:46:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJRjH-0008BD-3s for bug-gnu-emacs@gnu.org; Fri, 09 Jun 2017 17:46:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34802) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dJRjG-0008B1-Qx for bug-gnu-emacs@gnu.org; Fri, 09 Jun 2017 17:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dJRjG-00024p-HO for bug-gnu-emacs@gnu.org; Fri, 09 Jun 2017 17:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Jun 2017 21:46: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.14970447057910 (code B ref 23425); Fri, 09 Jun 2017 21:46:02 +0000 Original-Received: (at 23425) by debbugs.gnu.org; 9 Jun 2017 21:45:05 +0000 Original-Received: from localhost ([127.0.0.1]:37479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJRiL-00023V-1v for submit@debbugs.gnu.org; Fri, 09 Jun 2017 17:45:05 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:60976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJRiJ-00022l-Be for 23425@debbugs.gnu.org; Fri, 09 Jun 2017 17:45:04 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5FAA61600E3; Fri, 9 Jun 2017 14:44:56 -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 yR6idu2eKRgX; Fri, 9 Jun 2017 14:44:55 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8360B1600E4; Fri, 9 Jun 2017 14:44:55 -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 0f6S3KmnVgtI; Fri, 9 Jun 2017 14:44:55 -0700 (PDT) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 231A01600E3; Fri, 9 Jun 2017 14:44:55 -0700 (PDT) In-Reply-To: <20170609194141.GA3410@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:133423 Archived-At: On 06/09/2017 12:41 PM, Alan Mackenzie wrote: > It's not OK to have two functions doing the same thing. Nobody is proposing that. Although the proposed function is similar to=20 the message function, it differs in that it does not restyle quotes.=20 There is lots of precedent for having two functions with similar but not=20 identical behavior: for example, the error and user-error functions. >> If having one single function would mean changing hundreds or=20 thousands of callers, then there is an important sense in which one=20 single function would not be better. > > That depends solely on whether anybody's prepared to do the work. No, it also depends on people who have to deal with the modified code=20 afterwards, as the resulting formats would be harder to read. And it=20 depends not only on doing the work for Emacs itself, but also for=20 third-party software written in Elisp. These are significant costs. Users should not be required to litter their code with hard-to-read=20 formats like "Can%'t encode %`0x%x%' with this buffer%'s coding system"=20 to get decent quoting. This would be more error-prone than what we have=20 now, and although I do not object to adding support for new formats I=20 would object to requiring their use in place of what we have now. > You're proposing changing `message' to `memo' for those callers anyway= . No, existing callers such as (message "%s" filename) would continue to=20 operate as before, and would not need to be changed. > This would leave unsolved the problem of format strings containing=20 both literal quote characters and quote characters for possible=20 replacement by curlies. I don=E2=80=99t see this as a significant problem in practice. In practic= e,=20 formats typically want all quotes translated, or no quotes translated.=20 If I am wrong I would like to see practical examples of the problem=20 before worrying about possible solutions. One can address the problem=20 without making any changes to Emacs; whether changing Emacs would be=20 helpful depends on how the problem comes up in practice. >> We discussed and rejected more-=E2=80=9Csurreptitious=E2=80=9D option= s back before=20 his stuff was installed. For example, we discussed changing =E2=80=98form= at=E2=80=99 to=20 behave like =E2=80=98format-message=E2=80=99 does now. > > In effect, that's what was actually done. Not at all. Had we made the more-drastic change, we would have had to=20 rewrite calls like (format "\\`%s" not-word-symbol-re). This would have=20 been considerably more work, and would have resulted in far more=20 compatibility problems, than the change that was eventually installed.