From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#56682: feature/improved-locked-narrowing 9dee6df39c: Reworked locked narrowing. Date: Thu, 09 Feb 2023 20:47:11 +0000 Message-ID: References: <166939872890.18950.12581667269687468681@vcs2.savannah.gnu.org> <6c9d91cffc394613f58a@heytings.org> <83eds0ksev.fsf@gnu.org> <8aadf0ddd54c85c8144a@heytings.org> <831qnhg3d9.fsf@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> <83k00qlqkw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1685"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, 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 21:48:25 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 1pQDqD-0000Ev-Es for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Feb 2023 21:48:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQDpx-0006WJ-15; Thu, 09 Feb 2023 15:48:09 -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 1pQDpr-0006Jw-Mr for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 15:48:04 -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 1pQDpr-0006FG-2c for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 15:48:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pQDpq-0007Ol-Nx for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 15:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Feb 2023 20:48: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.167597563628244 (code B ref 56682); Thu, 09 Feb 2023 20:48:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 9 Feb 2023 20:47:16 +0000 Original-Received: from localhost ([127.0.0.1]:33841 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQDp6-0007LT-21 for submit@debbugs.gnu.org; Thu, 09 Feb 2023 15:47:16 -0500 Original-Received: from heytings.org ([95.142.160.155]:50134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQDp3-0007LH-F8 for 56682@debbugs.gnu.org; Thu, 09 Feb 2023 15:47:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1675975632; bh=QUoxvXNxle4lUXEBeqgfH6Qmk7zYBB2FV9TC+xhunxg=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=Qj6HLWfhYERWQPA4mGHDQzZ9QWrY+PmNUaenvGLqbnCgu3hoOs5FJAHfYwyMpj9hJ i7XQtpyB0TvRfvotYtA7UQbZ6ZCpzm8RMFbNTMbiIkp5vC+nMN0fydS2EKzKLocYC8 5YHmaZxS1sshmrpKnlyxKN28yamLqRfN3xtOpUfzq5g7jx1ScPri4IXqazm/t32B9X a1uZT5BT/PJKV0INKNKCZJMWCZV1ViSjKPo7WbiYZRDwR+18IYN+cmQ3fjlcpDYJb9 5BzmVj0B8wP6MwvmVo+fPhQ5UwutCHuFs+Juk8ELkKMZtD0RZER11DF7hE1ZyALXk0 TYpzhbAEyPkGQ== In-Reply-To: <83k00qlqkw.fsf@gnu.org> 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:255252 Archived-At: >> Indeed, but returning the label would defeat the purpose of the tool. >> If a program can by itself determine that it is in a labeled narrowing >> and get its label, it can escape that narrowing without much ado. > > We make a point of documenting these labeled narrowings in great detail, > including the labels and their effects. It makes no sense to describe > them and not let programs adapt their behaviors to these situations. > Without access to the label, the without-narrowing macro is not useful, > so why provide such a macro at all if we really don't want Lisp programs > to use it? > Why do you think it's not useful? It is meant to be used for example in a function that is called in fontification-functions to temporarily escape the narrowing set around fontification-functions, when its author has determined that it is safe to do that, like this: (without-narrowing :label long-line-optimizations-in-fontification-functions ... some code ...) IMO, if it becomes possible to escape the narrowing programmatically (IOW, without even checking where and why the narrowing has been set), the exercise becomes even more pointless. (Also, in that case it seems to me that there is no reason anymore to label these narrowings: their label serves no real purpose.) >> (Note that I'm writing the above to "defend" a feature that I still >> believe should better be removed from Emacs.) > > I'm not sure what to do with this remark. I'm not accusing you of > anything, so you don't need to justify or defend yourself. We are > discussing what should this feature include assuming that it will be in > Emacs. > Don't worry, I don't feel accused at all. I was only expressing that I'm reasoning against my intuition here.