From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas =?UTF-8?Q?R=C3=B6hler?= Newsgroups: gmane.emacs.bugs Subject: bug#23443: 25.0.93; Temporary change to syntax-table is in effect during syntax-propertize Date: Fri, 13 May 2016 07:49:16 +0200 Message-ID: <57356ADC.1060007@easy-emacs.de> References: <1c56743e-4817-8373-fba9-3a3e21e37af7@yandex.ru> <318abec3-4ff6-f647-5754-dc061be63eaf@yandex.ru> <11eafc4f-9d1b-7941-cb3d-c5dfcd8532f1@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------080903040103020209030505" X-Trace: ger.gmane.org 1463420193 20985 80.91.229.3 (16 May 2016 17:36:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 May 2016 17:36:33 +0000 (UTC) To: 23443@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 16 19:36:22 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 1b2MRB-0002x5-0V for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 May 2016 19:36:13 +0200 Original-Received: from localhost ([::1]:45387 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MRA-00020q-GB for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 May 2016 13:36:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MR6-0001w3-Ad for bug-gnu-emacs@gnu.org; Mon, 16 May 2016 13:36:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2MR1-00017L-0l for bug-gnu-emacs@gnu.org; Mon, 16 May 2016 13:36:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MR0-000177-GT for bug-gnu-emacs@gnu.org; Mon, 16 May 2016 13:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b2MR0-0007QZ-9A for bug-gnu-emacs@gnu.org; Mon, 16 May 2016 13:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 May 2016 17:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23443 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.146342010728482 (code B ref -1); Mon, 16 May 2016 17:36:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 May 2016 17:35:07 +0000 Original-Received: from localhost ([127.0.0.1]:54145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b2MQ7-0007PK-1h for submit@debbugs.gnu.org; Mon, 16 May 2016 13:35:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58973) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b2MQ5-0007Og-59 for submit@debbugs.gnu.org; Mon, 16 May 2016 13:35:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2MPv-0000bO-Ti for submit@debbugs.gnu.org; Mon, 16 May 2016 13:35:00 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:39597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MPv-0000am-Qp for submit@debbugs.gnu.org; Mon, 16 May 2016 13:34:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MPt-0008Le-FS for bug-gnu-emacs@gnu.org; Mon, 16 May 2016 13:34:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2MPo-0000ZR-Tg for bug-gnu-emacs@gnu.org; Mon, 16 May 2016 13:34:52 -0400 Original-Received: from mout.kundenserver.de ([217.72.192.73]:49355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2MPo-0000ZD-IY for bug-gnu-emacs@gnu.org; Mon, 16 May 2016 13:34:48 -0400 Original-Received: from [192.168.178.35] ([95.119.235.188]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0MA5UH-1auB6t1Kaf-00BOPP for ; Fri, 13 May 2016 07:46:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Icedove/38.7.0 In-Reply-To: X-Provags-ID: V03:K0:wjz7MBl9cG8CWrPYH5DV5Tcy2o+3XAoRjdle+fHIvpsgt+j3TRP NdkSHeCvnSDRSB1cRuw4M7rNlpbJ1t/GlOIWSacK+Me8QnYh9UI41iJxGbDwnpfnqgSGn2i J++lcGGZP2IggkSwzO1i5yDUHoXQSnF81BADeXTN4KoRnZAhwOE88mVKO0j3bW5v4ckl2so /D+XkuTaSoteJOtoqGBTw== X-UI-Out-Filterresults: notjunk:1;V01:K0:NUlrDlcVymY=:w5XxjaYGDREmRngJDdvIf/ w4v5fCdQsNQpBSGkSTaRan63h2D9C13hYfx60iQ6M2rU7WOEu6R1njiE2Yz9ZwcqLTxzVCa+V O41A8N6owx0Iq8uXKj0oVTpbd8qGaibkUXOnwmml87nplt0MkPxqoIL/PuS0lCjP5P/GobA8z q8T8YcjEi6uYkaALGeYkLF9IbFU6aZ/pJ9wkIPpfSFa0tlzRt6u7YaKpahP9Iky/u1uknBy9g 1vhXRHYN+LVfSkXWpNgXra6mrIx060aJ6Tbb0NffQGuJjKmhFse6wpIzl6BrK3ML3fQqEjc2y 3gilrR9rlY+GolmFhzgFygCf4JJ8+EeVT9MmcwuDecghNYyz5GOyBV2aInncuNLyYLIxlTsEP j/i9K0bVUpVu3wPY3j2z5RKI1s1bq9undGr8DuNQa1veAQjMPWvfrTsYnW2OTEn5n19AEiRz0 las7PhJWw6YXYZWw7FKznzIROb/MJSEb48Kc5g+NPYLqJfOwFzMMrRYoYq6ow0rC072U43BxJ TXC1nbR2rQG+wGIKogFa5fSUhn0mo7UEF30HqRmZEzQ910ql6UaokARHxdcKJWOXvTn2GfcTT mgQEwh3oMJOTk/lOy02IYG6it3TFCkrjtk8YkAYVVo3f5jdyHdsKhVvcktIKY7yab93xLTzyA R1GkdIAFB/7Urc/OaBsaGJ2XZ/CTgYcJevizH6pShut+ndTxQ4P4NRokPd94Bvnt6WbpliWxq uLzYVtkq6xbKWCey X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:118301 Archived-At: This is a multi-part message in MIME format. --------------080903040103020209030505 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit |reopen| bugnumber The proposed solution, which has to bind syntax-propertize-function to nil before calling scan-sexp, reads like a work around. These things shouldn't be necessary. Assume a fix must affect usage of syntax-propertize-function and probably is not a trivial one. Its design seems worth further discussion. For example reading: "The specified function may call ‘syntax-ppss’ on any position before END, but it should not call ‘syntax-ppss-flush-cache’, which means that it should not call ‘syntax-ppss’ on some position and later modify the buffer on some earlier position." Emacs can do better. On 12.05.2016 12:05, Noam Postavsky wrote: > close 23443 > tags 23443 + notabug > quit > > On Sun, May 8, 2016 at 3:12 PM, Dmitry Gutov wrote: >> Here's a possible stopgap: >> >> - Narrow the buffer to the snippet (just to be safe). >> - Bind syntax-propertize-function to nil. >> - Call scan-sexps. >> - Call (syntax-ppss-flush-cache snippet-beginning-position). > Thanks, this seems to be working well (implemented in [1]). > > [1]: https://github.com/capitaomorte/yasnippet/pull/695 > > > --------------080903040103020209030505 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit reopen bugnumber

The proposed solution, which has to bind syntax-propertize-function to nil before calling scan-sexp, reads like a work around. These things shouldn't be necessary.
Assume a fix must affect usage of syntax-propertize-function and probably is not a trivial one.
Its design seems worth further discussion.

For example reading:

"The specified function may call ‘syntax-ppss’ on any position
before END, but it should not call ‘syntax-ppss-flush-cache’,
which means that it should not call ‘syntax-ppss’ on some
position and later modify the buffer on some earlier position."

Emacs can do better.

On 12.05.2016 12:05, Noam Postavsky wrote:
close 23443
tags 23443 + notabug
quit

On Sun, May 8, 2016 at 3:12 PM, Dmitry Gutov <dgutov@yandex.ru> wrote:
Here's a possible stopgap:

- Narrow the buffer to the snippet (just to be safe).
- Bind syntax-propertize-function to nil.
- Call scan-sexps.
- Call (syntax-ppss-flush-cache snippet-beginning-position).
Thanks, this seems to be working well (implemented in [1]).

[1]: https://github.com/capitaomorte/yasnippet/pull/695




--------------080903040103020209030505--