From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65913: with-help-window arranges for 'inhibit-read-only' to be set to 't' Date: Wed, 13 Sep 2023 13:26:51 +0000 Message-ID: <_hKt5j_6bUwtEyWyE-e6GenkfdjfDll8AAVkejgxh3gyiYkvovpnhPNs1-ijjzyQaXlAJNSKb917yFQKrejO0q4tTql2vw0iu35n-JbUl8w=@protonmail.com> References: <838r9anrmi.fsf@gnu.org> Reply-To: Heime 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="29157"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65913@debbugs.gnu.org, Stefan Kangas To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 13 15:28:22 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 1qgPun-0007Lv-Rq for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Sep 2023 15:28:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgPud-0003xI-3P; Wed, 13 Sep 2023 09:28:11 -0400 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 1qgPuQ-0003uN-GX for bug-gnu-emacs@gnu.org; Wed, 13 Sep 2023 09:27:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgPuQ-0007F6-7p for bug-gnu-emacs@gnu.org; Wed, 13 Sep 2023 09:27:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qgPuU-0002OM-EU for bug-gnu-emacs@gnu.org; Wed, 13 Sep 2023 09:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Heime Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Sep 2023 13:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65913 X-GNU-PR-Package: emacs Original-Received: via spool by 65913-submit@debbugs.gnu.org id=B65913.16946116299126 (code B ref 65913); Wed, 13 Sep 2023 13:28:02 +0000 Original-Received: (at 65913) by debbugs.gnu.org; 13 Sep 2023 13:27:09 +0000 Original-Received: from localhost ([127.0.0.1]:32948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgPtd-0002N8-4W for submit@debbugs.gnu.org; Wed, 13 Sep 2023 09:27:09 -0400 Original-Received: from mail-40130.protonmail.ch ([185.70.40.130]:27301) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgPtb-0002Mc-9m for 65913@debbugs.gnu.org; Wed, 13 Sep 2023 09:27:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1694611615; x=1694870815; bh=rpCgAu2l0jqq/PhV+QZNGU7elbC91EDOLXzsuxHnJYk=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=VwrsOS465tsgHO4/E7l+ra5OACIuKy7Hd9jNl9mk3a57ZYhqMRj6HzJY6M9UC9zqU cZCwHURkItndhqM3URhh/hmTQuGKlHYAE+6mE9hnI32RwWEnSqOl9rbXjt1ggvreIt WnlmVqgh+Q+6qK54gAXSduPKNHm3F/P4wDHdlIuOejW+s1SZ7gLnR0iGsC3eCqAYor 5g6glyOOruAs9/JgT9fM559vgC6rz+q5+QV3QbNtpbJKwZbXvZMslr8eBYK9FToDSy e0L2gbYVw8fkuvTD4W2++kvrLCOjPRDpSYGszHRk04bl0XJrtFewomqiZmpWEPMKw2 T2XVBjZJja8MA== In-Reply-To: <838r9anrmi.fsf@gnu.org> Feedback-ID: 57735886:user:proton 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:270280 Archived-At: Sent with Proton Mail secure email. ------- Original Message ------- On Thursday, September 14th, 2023 at 1:13 AM, Eli Zaretskii = wrote: > > Date: Wed, 13 Sep 2023 10:41:01 +0000 > > From: Heime via "Bug reports for GNU Emacs, > > the Swiss army knife of text editors" bug-gnu-emacs@gnu.org > >=20 > > Any time one wants to write (insert) into a read-only buffer (e.g. help= ), > > one has to make it writable. Doesn't matter when that time is. If it's > > read-only you need to make it writable to write into it. > >=20 > > Reading the source for 'with-help-window', it arranges for 'inhibit-rea= d-only' > > to be set to 't' around the call to its body. Once the body finishes, t= hat > > temporary binding goes out of scope and read-only is in effect again. > >=20 > > The aforementioned resetting of 'inhibit-read-only' to 't' is an import= ant > > feature that should be included in the docstring for the function 'with= -help-window'. >=20 >=20 > I disagree. The use of inhibit-read-only is an implementation detail > of with-help-window (and of many other functions in Emacs); mentioning > it in the doc string will IMO have no useful purpose. >=20 > The doc string of "C-x C-q" (read-only-mode) does mention > inhibit-read-only, which is I think a much more reasonable place for a > reference to that variable. >=20 > Stefan, WDYT? Docstrings have become so short at times that reading them is of no practic= al=20 use. The reality of it is not simply an implementation detail of no conseq= uence. Because if a developers knows that detail, ho would refrain form introducin= g things like=20 (with-help-window (help-buffer) (setq buffer-read-only nil) (insert " Graphic Organisation") (setq buffer-read-only t)) and instead immediately write (with-help-window (help-buffer) (insert " Graphic Organisation")) =20