From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#22983: syntax-ppss returns wrong result. Date: Sun, 13 Mar 2016 18:57:55 +0000 Message-ID: <20160313185755.GG1871@acm.fritz.box> References: <20160311151512.GD2888@acm.fritz.box> <20160311212410.GG2888@acm.fritz.box> <73903215-f94b-e194-7bfe-0d6350c95769@yandex.ru> <20160311221540.GH2888@acm.fritz.box> <2c301ec9-041d-9172-d628-479062314b23@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1457895381 29965 80.91.229.3 (13 Mar 2016 18:56:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Mar 2016 18:56:21 +0000 (UTC) Cc: 22983@debbugs.gnu.org, Dmitry Gutov To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 13 19:56:10 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 1afBBR-0002Vn-Rb for geb-bug-gnu-emacs@m.gmane.org; Sun, 13 Mar 2016 19:56:10 +0100 Original-Received: from localhost ([::1]:37175 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afBBQ-0007VC-Sr for geb-bug-gnu-emacs@m.gmane.org; Sun, 13 Mar 2016 14:56:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afBBN-0007Uj-73 for bug-gnu-emacs@gnu.org; Sun, 13 Mar 2016 14:56:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afBBK-000195-05 for bug-gnu-emacs@gnu.org; Sun, 13 Mar 2016 14:56:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afBBJ-000191-T8 for bug-gnu-emacs@gnu.org; Sun, 13 Mar 2016 14:56:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1afBBJ-0002mU-OG for bug-gnu-emacs@gnu.org; Sun, 13 Mar 2016 14:56: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: Sun, 13 Mar 2016 18:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22983 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22983-submit@debbugs.gnu.org id=B22983.145789531710641 (code B ref 22983); Sun, 13 Mar 2016 18:56:01 +0000 Original-Received: (at 22983) by debbugs.gnu.org; 13 Mar 2016 18:55:17 +0000 Original-Received: from localhost ([127.0.0.1]:47173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1afBAb-0002lZ-Am for submit@debbugs.gnu.org; Sun, 13 Mar 2016 14:55:17 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:33462) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1afBAa-0002lR-AA for 22983@debbugs.gnu.org; Sun, 13 Mar 2016 14:55:16 -0400 Original-Received: (qmail 31897 invoked by uid 3782); 13 Mar 2016 18:55:14 -0000 Original-Received: from acm.muc.de (p5B146B5E.dip0.t-ipconnect.de [91.20.107.94]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 13 Mar 2016 19:55:13 +0100 Original-Received: (qmail 1579 invoked by uid 1000); 13 Mar 2016 18:57:55 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114862 Archived-At: Hello, Stefan. On Sun, Mar 13, 2016 at 01:37:27PM -0400, Stefan Monnier wrote: > >> But it's not the semantics these .el files get. What's probably keeping > >> them functional is the rarity with which buffers are narrowed to an > >> "awkward" point-min. > > Another thing that keeps it together, is that narrowing, as a user-level > > operator, is not that popular. > Luckily, yes. I happen to use it frequently. I expect other users do, to. It's useful. > > Personally, I consider it an anti-feature. > Same here. Luckily also, as pointed out elsewhere, the semantics of it > is unclear, so that in several important cases, whichever behavior we > end up choosing will be both correct for some users and incorrect > for others. That's pure sophistry. The semantics needed are quite clear: What were strings and comments before narrowing should remain strings and comments after narrowing. Otherwise, nothing would work in such a narrowed buffer. font-locking, for example, behaves properly in a narrowed buffer. > Hence, so far, I didn't make any effort to try and "do the right thing" > for user-activated narrowing, since these are just not well defined > enough to even determine what is "the right thing". Lets define them as I said in the previous paragraph. Or can you conceive of a use case where one would want narrowing to invert strings and non-strings, leaving comments totally random? Do you have any views on how the bug should be resolved? > Stefan -- Alan Mackenzie (Nuremberg, Germany).