From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: bug#23425: master branch: `message' wrongly corrupts ' to curly quote. Date: Sat, 3 Jun 2017 20:53:31 +0000 Message-ID: <20170603205331.GA2130@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 1496523284 26192 195.159.176.226 (3 Jun 2017 20:54:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 3 Jun 2017 20:54:44 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: Glenn Morris , 23425@debbugs.gnu.org To: Paul Eggert , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 03 22:54:40 2017 Return-path: Envelope-to: ged-emacs-devel@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 1dHG4F-0006Y4-Q0 for ged-emacs-devel@m.gmane.org; Sat, 03 Jun 2017 22:54:39 +0200 Original-Received: from localhost ([::1]:54805 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHG4L-0004Zm-2J for ged-emacs-devel@m.gmane.org; Sat, 03 Jun 2017 16:54:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHG4D-0004ZT-N0 for emacs-devel@gnu.org; Sat, 03 Jun 2017 16:54:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHG4A-0005iB-Ii for emacs-devel@gnu.org; Sat, 03 Jun 2017 16:54:37 -0400 Original-Received: from ocolin.muc.de ([193.149.48.4]:37731 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1dHG4A-0005hJ-BO for emacs-devel@gnu.org; Sat, 03 Jun 2017 16:54:34 -0400 Original-Received: (qmail 37287 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-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.4 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:215433 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).