From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Major modes using `widen' is a good, even essential, programming practice. Date: Tue, 9 Aug 2022 00:16:23 +0300 Message-ID: <3036db04-df93-2dff-0364-1e59f95772bc@yandex.ru> References: <6ae35c9306ade07b4c45@heytings.org> <83fsi7wjqe.fsf@gnu.org> <838rnzvup5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4596"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Cc: acm@muc.de, gregory@heytings.org, emacs-devel@gnu.org To: Eli Zaretskii , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 08 23:22:24 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oLACe-00010V-Th for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Aug 2022 23:22:24 +0200 Original-Received: from localhost ([::1]:46756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLACd-0002KQ-3J for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Aug 2022 17:22:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLA7C-0008I4-Ce for emacs-devel@gnu.org; Mon, 08 Aug 2022 17:16:46 -0400 Original-Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:40800) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLA7A-0007TA-FM; Mon, 08 Aug 2022 17:16:46 -0400 Original-Received: by mail-wr1-x42e.google.com with SMTP id l22so12242742wrz.7; Mon, 08 Aug 2022 14:16:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=P8Yr3J8zM/PFGsm6zCkTsi/sAF5Ga3/Qg0CMqOeltgA=; b=Oq3sIBX84t3iNYdltmcOHRncV5MTJ2wq++slHV1/IYFoPIIvsILFAogsjXwvOosjd8 5vLHDclKVklj1qgR10sI1T+f0AW+BY/IKY1MPZTSg9AS4AGkZ5xOVIPeTMv/LIr2/UE9 q6GESzjqJZmS052oH+K16mayTdAURllcyTW/EKp9lLQo83WaAotkGXJ6ms5+TQ8VrZ/8 fR8bXJmEzJmKELm6kVe/bXaScizkCiRgv3gYHLRJAc4S3Kc4gxRJXKsD9sUaO2KPQVah 4Ao0JmhzUFpGPYsIsRwD+kqGaLA/UJTX2VGMDSCD6D9V64CiJbywwIMkU9CySNPpX4la H0Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=P8Yr3J8zM/PFGsm6zCkTsi/sAF5Ga3/Qg0CMqOeltgA=; b=ayLMIJcbO0XS4zfu5F+QhIWL3ddd4VpKBvWbH+J7F/Ft3qZuR7hxsc7+u6JmfPi42a +P+Zh/UdOLGmDEKCr/IANMMlm0SxAP4BbiYL3L7PbsGJRX7tIC6B/6BVIki1L7wawvch w04z5Kdldp9rlbT9EKzFOemItgDjrQ11rfOSIk5C+t74HW1cpv1/AszzOkPhSZmGmIn+ GC0ugMjNgPVNAJRGUz30i4RXjEyWd2CFsmgNj96/v4Jb1tC9LtZpuQWRpPIljAEbfN1b c53gl7B6vdXabxySwafeemwJcTDooq7uhJBfp7viMd661slNfeW1NKCtJtL+aDaEc0VQ /2GQ== X-Gm-Message-State: ACgBeo262j/531bf6hq5ZeU/oNmuyCbc73RKav1QVMpbMIXau5/b7o3X IYgSy81USYkaAjZtPz4b/Olsffa3YsU= X-Google-Smtp-Source: AA6agR5CDdv9TKsryvzmUL18SiMEDpqPsNyfXpI9YPs+hfgPncqtgVKxw6ioxeotvat6xy8i5dFkxg== X-Received: by 2002:adf:f346:0:b0:21f:13ec:cacf with SMTP id e6-20020adff346000000b0021f13eccacfmr12169925wrp.525.1659993386060; Mon, 08 Aug 2022 14:16:26 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id j4-20020a05600c1c0400b003a31fd05e0fsm30588wms.2.2022.08.08.14.16.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Aug 2022 14:16:25 -0700 (PDT) Content-Language: en-US In-Reply-To: <838rnzvup5.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=raaahh@gmail.com; helo=mail-wr1-x42e.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:293285 Archived-At: On 08.08.2022 14:30, Eli Zaretskii wrote: > So if you dislike the current solution of locked narrowing, how about > making syntax-ppss work in chunks (perhaps from an idle timer?), after > initially scanning only the first small portion of the file. The goal > is to have the file displayed quickly enough, and thereafter complete > the scan when possible. The file is already displayed "quickly enough". The problem arrives when you try to navigate far from BOB (e.g. to EOB). What's going to happen then, if the timer hasn't fired yet? And for the timer's work to be useful, it has to had happened between the last edit and the subsequent navigation. A lot of idle timers like that = a lot of discarded work.