From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Making a read-only buffer writable Date: Tue, 12 Sep 2023 17:26:14 +0700 Message-ID: References: <0dkHSu-LB9gHq-vWDPApgSFURUdqrdbAu7ZKq6k1LFAl6S7HJQ2sHmp3YCDJmAm-yqrbOxqQdne10jnbdUyfLwICE99HUEnPXkBzCJUgrNo=@protonmail.com> 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="15327"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Heime via Users list for the GNU Emacs text editor To: Heime Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 12 12:27:20 2023 Return-path: 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 ) id 1qg0c3-0003lx-Pp for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 12 Sep 2023 12:27:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qg0bS-0007xm-DP; Tue, 12 Sep 2023 06:26:42 -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 1qg0bK-0007vn-UI for help-gnu-emacs@gnu.org; Tue, 12 Sep 2023 06:26:36 -0400 Original-Received: from mail-vs1-xe2d.google.com ([2607:f8b0:4864:20::e2d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qg0bG-0001av-Fv for help-gnu-emacs@gnu.org; Tue, 12 Sep 2023 06:26:32 -0400 Original-Received: by mail-vs1-xe2d.google.com with SMTP id ada2fe7eead31-450b8d61550so734973137.0 for ; Tue, 12 Sep 2023 03:26:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694514386; x=1695119186; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=pzf4+xo6RIZh1+XxtSrBNIrtP8fB0gULo8SmOS98/Mc=; b=FJLPPWqUHiHrx4zMyChSxqn2W2WG/jusZIhDIkeOC8YG/GTfJ51YvJFqYq2bwYuOX6 ZDn6M7p8Ghh8gWxl6DmxCSsuT6bUD4FDcfPVTTz8QOadzWWdMRcoIGX54ULVdDVE2NR9 pmQAVtjDYMDzy9TErzQ5y5ijf/T/oVFcI2AaFhYwAhPTV7LcdRU7fy8wJ5bzQrt6wgK7 c0kayeDTSa8K0D0CT3NP4P0oN2WBo05Te1RPRvwYB3pIIux26TL7DpPJgZEWfS9e1qh5 EYBeoNkPZhQjUEx8H/KJ2rFqI+zL5eNZHWfTNnLN96qlNGJdiIdZG2T1WHPIIDgCiPFz djdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694514386; x=1695119186; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pzf4+xo6RIZh1+XxtSrBNIrtP8fB0gULo8SmOS98/Mc=; b=pWpgiA79FpDxdWKoxm9DbLAWNKjjDj8zFMK0B7GbpESe9H/1ij1MVaIhvHeoNxr+35 6vyROK7ZniZpTNBv1JA30c1T9M72MpTshauzqVOexOha20hSDkR1Nu8OJUnFq+v2WT/d 38yhJkUcPXsjsuidCQM57heXetUNIgLZZoiphbxlVfnQwRJZ0pofawux0y+xOIw7IHkP z4gIi0/Tpgnjx9KvotIe52RBqQ8xQyzGq9hCmjlcj9xJqMFXMXS0eT/zCWI6zSzOdPPb 5LzBZR3E0vwUI8oWxZtEhcJaWZhXM6/qelYUtOvab4SyQyKwhsYTYBHzSbB7la9hth0h yvCA== X-Gm-Message-State: AOJu0YwcdbpiCNonKBHUryY2VDXVir/YJWR36Pn9eFywvXZ4QBruam+K ROWGNKuWMhiItAxmvgZ+aaPmYBp2qiTQExtacA0= X-Google-Smtp-Source: AGHT+IHE78yJLgnb4lsyTKcBcBiLmfqsfhgv9qjama1zL6PGwRJuI6fSvrLpCh4CmFCrmyPgF1X0aVcHHrWs3a3bICU= X-Received: by 2002:a05:6102:86:b0:44d:40b1:926d with SMTP id t6-20020a056102008600b0044d40b1926dmr10911579vsp.32.1694514385979; Tue, 12 Sep 2023 03:26:25 -0700 (PDT) In-Reply-To: <0dkHSu-LB9gHq-vWDPApgSFURUdqrdbAu7ZKq6k1LFAl6S7HJQ2sHmp3YCDJmAm-yqrbOxqQdne10jnbdUyfLwICE99HUEnPXkBzCJUgrNo=@protonmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::e2d; envelope-from=yurivkhan@gmail.com; helo=mail-vs1-xe2d.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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:145103 Archived-At: On Tue, 12 Sept 2023 at 16:10, Heime wrote: > Then I wonder how it is possible for the following function > to call > > (insert-button "[1]" > > without calling > > (setq buffer-read-only nil) > > first, just after > > (with-help-window (help-buffer) Have you read the source for =E2=80=98with-help-window=E2=80=99? It arrange= s for =E2=80=98inhibit-read-only=E2=80=99 to be set to =E2=80=98t=E2=80=99 around= the call to its body. Once the body finishes, that temporary binding goes out of scope and read-only is in effect again.