From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#22983: [ Patch ] Re: bug#22983: syntax-ppss returns wrong result. Date: Fri, 22 Sep 2017 17:09:03 +0300 Message-ID: <8819156d-b58f-f87f-14b1-5e347202c752@yandex.ru> References: <20170907204502.GC4488@ACM> <69e034d3-7a52-cc81-dc56-e5308ad5dce0@yandex.ru> <20170910113626.GB3588@ACM> <20170911201204.GC3605@ACM> <20170917102956.GA4519@ACM> <20170918190847.GB4536@ACM> <20170919204753.GD19168@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1506089668 3794 195.159.176.226 (22 Sep 2017 14:14:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 22 Sep 2017 14:14:28 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Thunderbird/56.0 Cc: John Wiegley , Philipp Stephani , 22983@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 22 16:14:24 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 1dvOik-0000cW-Av for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Sep 2017 16:14:22 +0200 Original-Received: from localhost ([::1]:59139 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvOir-0007ee-PG for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Sep 2017 10:14:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvOed-0003iq-Nv for bug-gnu-emacs@gnu.org; Fri, 22 Sep 2017 10:10:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvOeY-0004vm-PR for bug-gnu-emacs@gnu.org; Fri, 22 Sep 2017 10:10:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44269) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dvOeY-0004vf-Lg for bug-gnu-emacs@gnu.org; Fri, 22 Sep 2017 10:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dvOeY-00010e-DP for bug-gnu-emacs@gnu.org; Fri, 22 Sep 2017 10:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Sep 2017 14:10:02 +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.15060893543812 (code B ref 22983); Fri, 22 Sep 2017 14:10:02 +0000 Original-Received: (at 22983) by debbugs.gnu.org; 22 Sep 2017 14:09:14 +0000 Original-Received: from localhost ([127.0.0.1]:52950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvOdm-0000zQ-L4 for submit@debbugs.gnu.org; Fri, 22 Sep 2017 10:09:14 -0400 Original-Received: from mail-wm0-f45.google.com ([74.125.82.45]:47528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvOdl-0000zB-1p for 22983@debbugs.gnu.org; Fri, 22 Sep 2017 10:09:13 -0400 Original-Received: by mail-wm0-f45.google.com with SMTP id r136so4289461wmf.2 for <22983@debbugs.gnu.org>; Fri, 22 Sep 2017 07:09:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=zk1hsJ1chfC0pzjlbmjdMSOLYldzMGXAsm5XPzrNHoM=; b=OL1ibK0hmKwGBM+VtKm8qXGPFjW1upyuC/TQ/ayF/5n41H8EnCgrX6kRRZ7HHn4Eu6 J8O+RCzRrjAZIvPo2yfIVDUDVGUJO5zTNGvZB1IORbx9HHB9hJ459xzFwYrs1NC1UxJx p/XlLGp/eQlt4S9gYQ1gZuqwy5ObCu844n5cTdgQeV3FP8sYQ/7/3Ib8mec4XTCzOJ3R M2QYJuSmnYGtuwAXoUPb5x3C8aWeGb32c8rStzQ25eGfR5h13Uwoh0B8ythZyKLrl2e2 EYGlMmXXMfc7YiKcny+2e+Wp40WGwrIeqRYGxhBNHlPaUJafjY4lSiUG+X+li6ZzZrOP LKPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zk1hsJ1chfC0pzjlbmjdMSOLYldzMGXAsm5XPzrNHoM=; b=umNED/OD9UoVic7zKHBtlNoyRTDNydZbi2qXXmGaK3u0yEPANYZ1tUCZe+6LxEwKq7 23xWO4rKOtuaXOLbBxWjk3oJqxlSdzhb9rRG8or85Q2GisfdGFAJZDuEnAol8m3Q0YJU PoDkV44F+pRcYFdq5AIIlTSEEBHADLm3FNtJgcr+lCAvabPg8YI8SYof8LYdC6rp5xz6 U6Mf1af8UdPptd0jr+MFB7WktbFt8EwR6MgxmiEslvYqioXKJuYKFB7OQnsu3Ormm0Nq H/ZLe+zKZeR1luZ91ZqAWta2VF3c0g1K8ByDikQ8/zSI+msYVhtM6YZ/Nodi7xrVlLZT zURA== X-Gm-Message-State: AHPjjUgwCnFhYFugUNAtVoXFEl9NWhUodks6xlUBEpD+BtVYK+vSnlTO WI+UJutzT7TKektuhwqptx6wM02h X-Google-Smtp-Source: AOwi7QCsXmnz0FKe2ILDgpF8BjJ5cPLcRTDYND0GiQdBpTp0kG+o/1AK9Hbrrk/7A5C9tDrZYWZDWQ== X-Received: by 10.80.189.204 with SMTP id z12mr4838747edh.2.1506089347078; Fri, 22 Sep 2017 07:09:07 -0700 (PDT) Original-Received: from [192.168.0.133] (static-nbl2-118.cytanet.com.cy. [212.31.107.118]) by smtp.googlemail.com with ESMTPSA id x29sm2266185eda.51.2017.09.22.07.09.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Sep 2017 07:09:06 -0700 (PDT) In-Reply-To: <20170919204753.GD19168@ACM> 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:137232 Archived-At: Hi Alan, On 9/19/17 11:47 PM, Alan Mackenzie wrote: > I have done now, without the slightest cause for concern (see below). Thank you. Should you commit the patch (with any documentation tweaks you deem necessary), or should I? > I've done some semi-formal testing on it. My semi-formal test log is: > > (ii) Do some testing, using xdisp.c as test file. A file.c will not have > other calls to syntax-ppss interfering with the tests. > o - 1. Normal working: check both caches stay empty. They don't, because > syntax-ppss is used, I think, by font locking. > o - 2. Normal work in a narrowed buffer. Seems OK. > o - 3. Switch back to widened. Seems OK. > o - 4. Switch back to narrowed, same point-min. Check the caches. They > look OK. > o - 5. Switch to a different narrowing and (syntax-ppss (point-min)). This > does indeed empty the syntax-ppss-narrow, as it should. s-p-wide looks > unchanged. Good. > o - 6. Get well filled caches for both narrow and wide regions. With the > buffer wide, make a buffer change early in the buffer. Check both caches > are properly trimmed. They are. > o - 7. Repeat 6, but trim with the buffer narrow. Both caches look OK, the > narrow cache being (nil). Yes, this sounds fine. I've tried out most of those myself too, except usually without checking the cache contents. Just the syntax-ppss results. It would be nice to have 2 or 3 of those added as automated tests, BTW. > Maybe I should also try some heavy hacking in, say, Emacs Lisp mode as a > kind of soak test, since elisp mode uses syntax-ppss quite a bit, I > believe. Sure, except emacs-lisp-mode seems to still retain certain indentation-related problems, even without this change. I don't really expect to uncover problems from this patch much later. That's been the point of making the change as simple as possible.