From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#56682: feature/improved-locked-narrowing 9dee6df39c: Reworked locked narrowing. Date: Thu, 09 Feb 2023 19:44:00 +0200 Organization: LINKOV.NET Message-ID: <86sfferbef.fsf@mail.linkov.net> References: <166939872890.18950.12581667269687468681@vcs2.savannah.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> <83k00qlqkw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38953"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 56682@debbugs.gnu.org, Gregory Heytings , monnier@iro.umontreal.ca, akrl@sdf.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 09 18:55:32 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 1pQB8u-0009yL-CS for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Feb 2023 18:55:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQB8S-0000BL-NA; Thu, 09 Feb 2023 12:55:04 -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 1pQB8R-0000A8-47 for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 12:55: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 1pQB8Q-0000Qd-QF for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 12:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pQB8Q-0000SD-Mm for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 12:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Feb 2023 17:55: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.16759652781658 (code B ref 56682); Thu, 09 Feb 2023 17:55:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 9 Feb 2023 17:54:38 +0000 Original-Received: from localhost ([127.0.0.1]:33625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQB82-0000Qg-1m for submit@debbugs.gnu.org; Thu, 09 Feb 2023 12:54:38 -0500 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:39737) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQB80-0000QN-9j for 56682@debbugs.gnu.org; Thu, 09 Feb 2023 12:54:36 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 6D89D100007; Thu, 9 Feb 2023 17:54:25 +0000 (UTC) In-Reply-To: <83k00qlqkw.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 09 Feb 2023 19:02:39 +0200") 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:255242 Archived-At: >> >> (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. >> >> If necessary, a specific function which does not widen could be added to >> do that, using narrowing_lock_peek_tag: >> >> DEFUN ("...", ...) (void) >> { >> if (NILP (narrowing_lock_peek_tag (Fcurrent_buffer ()))) >> return Qnil; >> else >> return Qt; >> } > > I don't see how we can get away without doing something like that. > And I think it should return the tag itself, not just a boolean flag. 'buffer-narrowed-p' could return different symbols(tags) for narrowing lock.