From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#41522: 26.3; Narrowing can prevent syntax propertization Date: Mon, 25 May 2020 18:04:01 +0300 Message-ID: <8f0d1e94-f918-4315-d5d5-ac1ee4df3477@yandex.ru> References: <14765.1590396129@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="121670"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 To: Ikumi Keita , 41522@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 25 17:05:25 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jdEfM-000VWN-Kw for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 May 2020 17:05:24 +0200 Original-Received: from localhost ([::1]:52428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdEfL-0004FV-Nf for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 May 2020 11:05:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdEf0-0004Ex-C0 for bug-gnu-emacs@gnu.org; Mon, 25 May 2020 11:05:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58818) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdEf0-00066N-2U for bug-gnu-emacs@gnu.org; Mon, 25 May 2020 11:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jdEez-0006m2-SK for bug-gnu-emacs@gnu.org; Mon, 25 May 2020 11:05:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 May 2020 15:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41522 X-GNU-PR-Package: emacs Original-Received: via spool by 41522-submit@debbugs.gnu.org id=B41522.159041905225980 (code B ref 41522); Mon, 25 May 2020 15:05:01 +0000 Original-Received: (at 41522) by debbugs.gnu.org; 25 May 2020 15:04:12 +0000 Original-Received: from localhost ([127.0.0.1]:42131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdEeB-0006kx-QY for submit@debbugs.gnu.org; Mon, 25 May 2020 11:04:12 -0400 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:46775) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdEe9-0006kj-LK for 41522@debbugs.gnu.org; Mon, 25 May 2020 11:04:10 -0400 Original-Received: by mail-wr1-f46.google.com with SMTP id x6so3731916wrm.13 for <41522@debbugs.gnu.org>; Mon, 25 May 2020 08:04:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ii+IK1F+5tT934qiJOV/CfQn7EggctbG5pplzFFkYHo=; b=gxZKBIm2o+sQM33bvIgAJHI0TYAYDKvk5yKiItzZE0y0n4ngfA0hbSw4oZeENaDne1 VCuTkW8nS2EJUuGEDt1bGo74jwsL1JRFJfVSaS7FnrGsQ8PO0oAG9W5wuRwO/3ff/TYS NFCwzodQfk2rmxkbyka3hD2SL8UUWb/gAhUVrYVOojl01ET+t1zq+0BTKgwvT/ENFnn6 HFEFVFzwiio/BQSOvqz5o+AVVW01AyS2akOte3oRwOfVGTM5A1pnfxzvH6juDDXeEQx/ iFaxEeTax2wxWnNKcVJAAcCpeivNXAYU6QEqH6vJskDmdjhGFNQH09CN695KIDL46JJd G2NA== 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:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ii+IK1F+5tT934qiJOV/CfQn7EggctbG5pplzFFkYHo=; b=tpQ01lsk0cc57QymnSpTHVpWi7dc0uFF2QaggH3dXj/hBVOe4vKvUlYNQgRfxWgzDs nafh8JYzl9pQkzD60gOHCJa4f9xd2y38DJjrxmBY7ScaEFINo8g9V3vrGIpbEK9bn1n1 v17wVTeabCgrYbP8wSVPdcpEmYjg/RvTYaip0qKb9PAtumPqVp1f5407sXWqa90xGxY+ 41ZUCT3hv2uFw5vOwv7B7LVrkxA1+9z5SDKlOa0ekFA4vMjeRJM/9x1uh60xU7b8BT+g H8vPlxRBgUvFS/RcV70rLWCF73lOuDiLlp6FOFgI1uIjwt+Q20jbvZ+gwmlq3TLWP1v5 Nzbw== X-Gm-Message-State: AOAM532Z4A8qJy3STM0tdq9YR41akClRZjSmhpOWqKSsy1aUXPrez5Sl rSjSIzJNE+hMlwKduRLrAFEcHTb9 X-Google-Smtp-Source: ABdhPJx/y/fw+qW8yPjr9DiooAIVv5+fQZ1KhEeKMhLJRwC82KYwwmPRKOu4McFVX+zZn6hHTwXXqw== X-Received: by 2002:adf:ed51:: with SMTP id u17mr6282346wro.285.1590419043360; Mon, 25 May 2020 08:04:03 -0700 (PDT) Original-Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id m13sm17967387wmi.42.2020.05.25.08.04.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 May 2020 08:04:02 -0700 (PDT) In-Reply-To: <14765.1590396129@localhost> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:180976 Archived-At: Hi! On 25.05.2020 11:42, Ikumi Keita wrote: > In a similar way, if a lisp function goes to the point where syntax > propertization has not yet took place, makes narrowing and calls some > syntax-aware function which sets `syntax-propertize--done' to a value > inside the narrowing, a large portion of the buffer can be left without > suitable `syntax-table' property. This can lead to incorrect result > for not only font-lock but also syntax-aware functions such as > `forward-comment'. Our current stance on the matter is that, in the simple case, code should call syntax-ppss from "widened" state. And the code which doesn't should be fixed. Or if it really need to do that (for some reason), it should take care to handle any undesired sife-effects itself. See the definition of syntax-ppss-wide, which contains caches for both narrowed and "wide" syntax states.