From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: hw <hw@adminart.net>
Newsgroups: gmane.emacs.help
Subject: Re: What should I use to unrestrict a buffer?
Date: Thu, 25 Jan 2024 19:30:17 +0100
Message-ID: <cdec1d74bb1c3570eb30f3152d30ebbb09740402.camel@adminart.net>
References: <4df85194384c642c3cda3289cd1ac1a20ee42bcc.camel@adminart.net>
 <86r0i5dgvh.fsf@gnu.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="5926"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Evolution 3.50.3 (3.50.3-1.fc39)
To: help-gnu-emacs@gnu.org
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 25 19:31:16 2024
Return-path: <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org>
Envelope-to: geh-help-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 <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1rT4VN-0001H1-J0
	for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 25 Jan 2024 19:31:13 +0100
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <help-gnu-emacs-bounces@gnu.org>)
	id 1rT4Up-0001cF-Dl; Thu, 25 Jan 2024 13:30:39 -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 <hw@adminart.net>) id 1rT4UZ-0001bC-8q
 for help-gnu-emacs@gnu.org; Thu, 25 Jan 2024 13:30:27 -0500
Original-Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.24])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hw@adminart.net>) id 1rT4UW-0001uw-VD
 for help-gnu-emacs@gnu.org; Thu, 25 Jan 2024 13:30:22 -0500
ARC-Seal: i=1; a=rsa-sha256; t=1706207417; cv=none;
 d=strato.com; s=strato-dkim-0002;
 b=XprSuxyeoF8ayz7UliXHbaReum51xg0xn9IU/Art/UW+Lw2P40g0gR8/2Kw25SRhPb
 aKA+piiMg2Cpg10s9IUgmsBwodPtfUZlV0zdQ1eKXuxvUs/dQ868LmsV7ajV5Uffho+n
 f5m8UHTRTVZVRTGm1eSmu6DmXxnB/SR4OmLkT6zsAMoQDptYElK4RcSy2EF7IAi28bn7
 UXDt3eTeQn7fLvyEnER9Dm1cen4iRSoCHgCgm/JbLieZeJoAtrgFrSUrxjwFvWBy+yX/
 yQRPbKF1TBsKS1az6Rv7gP3Y9F5ZG62AW09m5KF+xyDrlfFCTgfpCDuSpB+XycOZhFf7
 so1w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1706207417;
 s=strato-dkim-0002; d=strato.com;
 h=References:In-Reply-To:Date:To:From:Subject:Message-ID:Cc:Date:From:
 Subject:Sender;
 bh=5/i8kwgsUZA2PwH4z+z6PtT8z4Ifd4OmkQq/7vj08Yw=;
 b=f+8qkKElErB5lFksE/wi5ThGCTfjyHeB0NO5HnK+//dUhSSrJ8eK/Ha56R4VmKyLkO
 fjO+Ik+o3O6CUIoYfpLJWDRZy/MZctySxUhYgWolCHksSiSlurSLZ8+lwMwfQo/50uPU
 3yyKfzG+PKWFg60oZa6Fr9kqIPh/WReD5zty/wZ/1u91Ahd5S+K4oBi7tY66RVR4xIY/
 cpivvgWH1FpVyXzn5G7fubU/4F8axWys8G3DSnigwEyjjegxKp+KCMwBzqkcKNu/ltK4
 kHzn5dbsTsBvK1zWvDj/+krINx9OcepLAGiSXI1dNYJUu07KeheR/eiZ2x13c+ZkDC7X
 Zdiw==
ARC-Authentication-Results: i=1; strato.com;
    arc=none;
    dkim=none
X-RZG-CLASS-ID: mo00
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1706207417;
 s=strato-dkim-0002; d=adminart.net;
 h=References:In-Reply-To:Date:To:From:Subject:Message-ID:Cc:Date:From:
 Subject:Sender;
 bh=5/i8kwgsUZA2PwH4z+z6PtT8z4Ifd4OmkQq/7vj08Yw=;
 b=Q72iBQmUCHzU73xWXNsoh+luE+9Gjzi3jyiJLFNvBrvVmZ8qjNY/Tj++1A7lMyWGYe
 RoNKAsYt0hPyvBzkw/q26yd6n8YpkJQBlkq4zahJRswyjt+PtK4Jt7JEhALKpVGYl75E
 xGY4qdyBK6aPJO689ntERPnrpWETqQYGIo8UN8Fk7+7RvCYOcYhOtVD+7/ky4C5ADp3R
 2dupWVFKOyhuUzaHsFhUHYmIshhK180hclzmTRCtXFqKLigc7UR9PpbPjShonJodUbDQ
 f4MVMvXCLJEBf0hBkt/Tzn+htfoYFmZ1aPCBlnh1hL4fTwT3xY9RHIfdMTULo1d78SI1
 CqFg==
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1706207417;
 s=strato-dkim-0003; d=adminart.net;
 h=References:In-Reply-To:Date:To:From:Subject:Message-ID:Cc:Date:From:
 Subject:Sender;
 bh=5/i8kwgsUZA2PwH4z+z6PtT8z4Ifd4OmkQq/7vj08Yw=;
 b=5LL4XORUSUyetPdvZFEe0cwr01UQjp2svYBuDn+ksa7/BZYCpAyjbovWIghNxRzI1G
 TlQGvkaJZDcSwyMSfsAg==
X-RZG-AUTH: ":O2kGeEG7b/pS1Ey9Rna9iAZFrfz26y6zbtmqiE/f0+UVPWzfkhbRoUzSCTTNnjIupuXQshKqSmhSDVvony6i1weUKtlbj4WMF+E="
Original-Received: from [IPv6:2a09:8e40:377f:1c00:1:ff:ff:f]
 by smtp.strato.de (RZmta 49.11.2 AUTH)
 with ESMTPSA id U7e39f00PIUH7Gu
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits))
 (Client did not present a certificate) for <help-gnu-emacs@gnu.org>;
 Thu, 25 Jan 2024 19:30:17 +0100 (CET)
In-Reply-To: <86r0i5dgvh.fsf@gnu.org>
Received-SPF: none client-ip=85.215.255.24; envelope-from=hw@adminart.net;
 helo=mo4-p00-ob.smtp.rzone.de
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_PASS=-0.001, SPF_NONE=0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-gnu-emacs>,
 <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/help-gnu-emacs>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-gnu-emacs>,
 <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org
Xref: news.gmane.io gmane.emacs.help:145804
Archived-At: <http://permalink.gmane.org/gmane.emacs.help/145804>

On Thu, 2024-01-25 at 09:14 +0200, Eli Zaretskii wrote:
> > From: hw <hw@adminart.net>
> > Date: Wed, 24 Jan 2024 21:12:56 +0100
> >=20
> > Also, I don't want possible restrictions to be restored, like
> > (without-restriction) would do.
>=20
> Why not?  After you do whatever you need to do with the widened
> buffer, you are supposed to return the restrictions to their previous
> state, and that includes restoring the restrictions present before the
> widening.  Why would you need to avoid restoring them, and thus change
> the restrictions behind some other Lisp program which doesn't expect
> its restrictions to be lifted?

I want to behold the whole buffer after the operation was performed to
see if the outcome looks ok.  And if the external program has found an
error, it puts a message into the first line of its output (the
buffer) which I'm unlikely to be able to see when the buffer is
restricted.

Keeping or restoring restrictions wouldn't be useful.