From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#23425: master branch: `message' wrongly corrupts ' to curly quote. Followup-To: gmane.emacs.devel Date: Sat, 3 Jun 2017 20:53:31 +0000 Message-ID: <20170603205331.GA2130__23513.5698611431$1496523317$gmane$org@acm.fritz.box> 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> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1496523317 399 195.159.176.226 (3 Jun 2017 20:55:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 3 Jun 2017 20:55:17 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: 23425@debbugs.gnu.org To: Paul Eggert , emacs-devel@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 03 22:55:10 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 1dHG4k-0007yC-CH for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Jun 2017 22:55:10 +0200 Original-Received: from localhost ([::1]:54809 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHG4m-0004ns-Q1 for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Jun 2017 16:55:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHG4d-0004mt-L7 for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2017 16:55:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHG4c-00067y-HD for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2017 16:55:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51539) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHG4c-00067i-E9 for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2017 16:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dHG4b-0006O7-UF for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2017 16:55: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: Sat, 03 Jun 2017 20:55: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.149652327724522 (code B ref 23425); Sat, 03 Jun 2017 20:55:01 +0000 Original-Received: (at 23425) by debbugs.gnu.org; 3 Jun 2017 20:54:37 +0000 Original-Received: from localhost ([127.0.0.1]:54216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHG4C-0006NS-RZ for submit@debbugs.gnu.org; Sat, 03 Jun 2017 16:54:37 -0400 Original-Received: from ocolin.muc.de ([193.149.48.4]:45248 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1dHG4B-0006NJ-AM for 23425@debbugs.gnu.org; Sat, 03 Jun 2017 16:54:35 -0400 Original-Received: (qmail 37297 invoked by uid 3782); 3 Jun 2017 20:54:32 -0000 Original-Received: from acm.muc.de (p4FC46308.dip0.t-ipconnect.de [79.196.99.8]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 03 Jun 2017 22:54:31 +0200 Original-Received: (qmail 2230 invoked by uid 1000); 3 Jun 2017 20:53:31 -0000 Content-Disposition: inline In-Reply-To: <11c0adfb-7fdd-8d28-1a47-869e3e7043ea@cs.ucla.edu> 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:133231 Archived-At: [ Message posted to emacs-devel@gnu.org, with Reply-To: set. ] Hello, Paul. On Fri, Jun 02, 2017 at 14:47:42 -0700, Paul Eggert wrote: > On 06/02/2017 02:02 PM, Alan Mackenzie wrote: > > How about transferring this discussion to emacs-devel, so that more > > people would be able to see it. > We had that discussion there already, and I doubt whether it’d be > worthwhile to repeat it. Of course you're free to take it there again if > you like. The previous discussion was abruptly cut short, without reaching a conclusion, with a "we're too close to a release to change anything now". This came with the implicit understanding the discussion could be countinued after the release. > > The default behaviour has been changed already, and that change has > > caused problems and will cause further problems. > I expect that most of the practical problems have been shaken out > already with the changes published in Emacs 25.1 last year, so that most > of this cost has already been paid. They have not. 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. `message' is currently broken. Introducing quote translation has introduced a burden on all users of `message'. Seeing how poisonous and insidious this translation can be, 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. > > I propose restoring the default to what it was in Emacs 24. For > > simplicity's sake, only % should be special, and for translating quotes > > we could introduce %' and %`, such that quote translation happens only > > when a %' or %` is present. > That kind of approach was proposed way back when. It doesn’t address > quotes in doc strings, though. Of course it doesn't. Doc strings have their own peculiar quoting mechanisms which are disjoint from those of `message'. > More generally, a problem with this sort of approach is that although > it simplifies ‘message’ (obviously), this is at the price of > complicating everything else. What is the "everything else" that gets thus complicated? I don't see anything else getting more complicated. > I estimate we’d need to change 10,000 lines of Emacs source code to > make that change to ‘message’. (This is a just a quick estimate based > on ‘grep '".*`.*"'’.) The resulting source code would typically be a > bit harder to read than it is now. I think this estimate is way over the mark. 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, and can be found easily enough with a script. -- Alan Mackenzie (Nuremberg, Germany).