From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#56682: feature/improved-locked-narrowing 9dee6df39c: Reworked locked narrowing. Date: Thu, 09 Feb 2023 19:43:59 +0200 Message-ID: <83h6vuloo0.fsf@gnu.org> References: <166939872890.18950.12581667269687468681@vcs2.savannah.gnu.org> <9757fbea37611e9c44b9@heytings.org> <83cz6yacxt.fsf@gnu.org> <6943e04e30e5a02a52e6@heytings.org> <838rhk5fy1.fsf@gnu.org> <6943e04e30a40824e107@heytings.org> <83k0143q37.fsf@gnu.org> <94821a0ef100102ac9e0@heytings.org> <83bkmdz04y.fsf@gnu.org> <43562d4dd9dffd81938f@heytings.org> <83357ozhx0.fsf@gnu.org> <83wn4zurit.fsf@gnu.org> <83bkmaueib.fsf@gnu.org> <83357fnwyy.fsf@gnu.org> <83v8kalxsc.fsf@gnu.org> <83r0uylu3z.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25918"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, gregory@heytings.org, akrl@sdf.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 09 18:45:23 2023 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 1pQAz4-0006Xx-5B for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Feb 2023 18:45:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQAyn-0006mG-7p; Thu, 09 Feb 2023 12:45:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQAyl-0006lh-5u for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 12:45:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQAyk-0006A7-SD for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 12:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pQAyk-00007a-80 for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 12:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Feb 2023 17:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56682 X-GNU-PR-Package: emacs Original-Received: via spool by 56682-submit@debbugs.gnu.org id=B56682.1675964669389 (code B ref 56682); Thu, 09 Feb 2023 17:45:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 9 Feb 2023 17:44:29 +0000 Original-Received: from localhost ([127.0.0.1]:33621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQAyC-00006D-SV for submit@debbugs.gnu.org; Thu, 09 Feb 2023 12:44:29 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQAyA-00005s-Qa for 56682@debbugs.gnu.org; Thu, 09 Feb 2023 12:44:27 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQAy4-00062Y-3I; Thu, 09 Feb 2023 12:44:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=uFkAljiv19nvl4hvuDwc9SBPxv3k4+qnSONo38NEXC0=; b=UNk0YTmckNXb vnF/t1E9/kqh21Obemt9w/PKrs4Ti5wAJXRFTTE3T4J2Uut2VB1h2H1m5mMmnXJTOMMOgfcRyvpWC WKedQrDc04MOpJwqr3I9mtiO7WSFHzXzTjac2EvKjNviOSu2f1LyrA8xephzvYRUtIjVK4ImAw/+t mhClrb0omM5lwjZOIxrMrICm4kbtpXX/67t36lCA7tVs7zqqoAa9uVbxcE7JZcgGWagJY+0yDIhng mTQWiau4fDNMhMBEjHrdT5qrjgxtkUdetrK1EmUt7sTDy4zHTMk11uIeha92ZVv7zRIUIlFiDiE9M QarDgQeZrh/PZc1Mcj29nA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQAy2-0004FF-Hp; Thu, 09 Feb 2023 12:44:19 -0500 In-Reply-To: (message from Stefan Monnier on Thu, 09 Feb 2023 12:31:44 -0500) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255241 Archived-At: > From: Stefan Monnier > Cc: Gregory Heytings , akrl@sdf.org, > 56682@debbugs.gnu.org > Date: Thu, 09 Feb 2023 12:31:44 -0500 > > >> A function/macro to check that could indeed be added, its body would be: > >> > >> (save-restriction (widen) (buffer-narrowed-p)) > > > > We should add it and document it, but I'm surprised that there's no > > easier way. One problem with the above is that it could cause a more > > thorough redisplay because it fiddles with buffer restrictions. > > Seeing how `buffer-narrowed-p` is not used very often, I'm not > too worried. Even more so given that the redisplay does try to notice > when the restriction has been modified temporarily but "reset" to its > original value since then. The last part is only true for Lisp that's called from redisplay itself, not for Lisp running between redisplay cycles.