From unknown Wed Jun 18 23:04:32 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#7292 <7292@debbugs.gnu.org> To: bug#7292 <7292@debbugs.gnu.org> Subject: Status: Inappropriate uses of toggle-read-only? Reply-To: bug#7292 <7292@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:04:32 +0000 retitle 7292 Inappropriate uses of toggle-read-only? reassign 7292 emacs submitter 7292 Ryan Twitchell severity 7292 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 27 20:11:24 2010 Received: (at submit) by debbugs.gnu.org; 28 Oct 2010 00:11:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PBG5S-0001ME-FC for submit@debbugs.gnu.org; Wed, 27 Oct 2010 20:11:23 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PBFyJ-0001Iv-De for submit@debbugs.gnu.org; Wed, 27 Oct 2010 20:03:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PBG2F-0004IO-7k for submit@debbugs.gnu.org; Wed, 27 Oct 2010 20:08:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:54272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PBG2B-0004Gu-0Y for submit@debbugs.gnu.org; Wed, 27 Oct 2010 20:08:03 -0400 Received: from [140.186.70.92] (port=48588 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PBG20-0001pw-4Y for bug-gnu-emacs@gnu.org; Wed, 27 Oct 2010 20:07:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PBFxb-0003dl-EO for bug-gnu-emacs@gnu.org; Wed, 27 Oct 2010 20:03:16 -0400 Received: from mail-qw0-f41.google.com ([209.85.216.41]:41028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PBFxb-0003df-CF for bug-gnu-emacs@gnu.org; Wed, 27 Oct 2010 20:03:15 -0400 Received: by qwi2 with SMTP id 2so1297811qwi.0 for ; Wed, 27 Oct 2010 17:03:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=QC6ci21FNeUbr/4Xm2953DqDWhOe/ia2uUDtdgMhoDU=; b=b99pTe0S344Cjl1zBdxC8BqiMoHqKAlk1nBo/iX6ORk2fqde2XKnYYsVF+WEzRuhrd Loj1dTSUosbynFM77kD1cnQchoF9TjCTNWrmMnb1GJ6ZA9XpTQz2LM6xfPiqXJ5k5BIK hGRLvK+12kuWbdS0xz+COKwgYbQ57xLf/bM30= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=NGyvaaNPNK+kWoVlRxbwjGJIWzvDKJhoXzOnZCKKWpDrWeXfx+crna7oR+H4lGhSm2 nX1bkJKSkORx7VWa+A/LlTvCvqUMtuyKb+JzPQN3lCTt9lfvLW9OWdpe1Uyp8aK2EF1y GmcPQHoNvva8QyBInNj+IrpWZ2Jpkweuuolh0= Received: by 10.224.128.147 with SMTP id k19mr2852183qas.23.1288224193895; Wed, 27 Oct 2010 17:03:13 -0700 (PDT) Received: from [192.168.1.28] (cpe-74-74-249-54.rochester.res.rr.com [74.74.249.54]) by mx.google.com with ESMTPS id l9sm231295vbp.11.2010.10.27.17.03.12 (version=SSLv3 cipher=RC4-MD5); Wed, 27 Oct 2010 17:03:13 -0700 (PDT) Message-ID: <4CC8BDBE.4090709@gmail.com> Date: Wed, 27 Oct 2010 20:03:10 -0400 From: Ryan Twitchell User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.11) Gecko/20101025 Lightning/1.0b3pre Thunderbird/3.1.5 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: view-mode clobbers speedbar bindings Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 27 Oct 2010 20:11:21 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) Hi, A number of speedbar's bindings, such as 'n' and 'p', do not work with view-mode enabled in the speedbar buffer (which makes no sense anyway). This is relevant when view-read-only is set, causing speedbar-mode to implicitly enable view-mode. For my part, I have redefined speedbar-mode in my .emacs file as follows: (require 'speedbar) (defvar real-speedbar-mode #'speedbar-mode) (defun speedbar-mode () (let ((view-read-only nil)) (funcall #'real-speedbar-mode))) This appears to solve the problem. speedbar-mode calls toggle-read-only; binding view-read-only to nil around that call should be a more permanent fix. M-x emacs-version GNU Emacs 23.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1) of 2010-09-26 on falconsrevenge Thanks, Ryan Twitchell From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 27 22:57:47 2010 Received: (at 7292) by debbugs.gnu.org; 28 Oct 2010 02:57:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PBIgV-0003CU-Dg for submit@debbugs.gnu.org; Wed, 27 Oct 2010 22:57:47 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PBIgT-0003CP-Li for 7292@debbugs.gnu.org; Wed, 27 Oct 2010 22:57:45 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1PBIkT-0001vp-Jq; Wed, 27 Oct 2010 23:01:53 -0400 To: Ryan Twitchell Subject: Re: bug#7292: view-mode clobbers speedbar bindings References: <4CC8BDBE.4090709@gmail.com> From: Glenn Morris X-Spook: Guantanamo ammunition Europol defense information warfare X-Ran: 5w]~:mpHRP*]M`vr* (Ryan Twitchell's message of "Wed\, 27 Oct 2010 20\:03\:10 -0400") Message-ID: <7lr5fbuiji.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: 7292 Cc: 7292@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) Ryan Twitchell wrote: > speedbar-mode calls toggle-read-only; Why does it do this, as opposed to `(setq buffer-read-only t)'? (I notice a few other files call toggle-read-only as well. Seems odd.) From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 27 23:07:34 2010 Received: (at 7292) by debbugs.gnu.org; 28 Oct 2010 03:07:34 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PBIpx-0003x7-Ig for submit@debbugs.gnu.org; Wed, 27 Oct 2010 23:07:33 -0400 Received: from mail-qw0-f44.google.com ([209.85.216.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PBIpw-0003x0-DC for 7292@debbugs.gnu.org; Wed, 27 Oct 2010 23:07:32 -0400 Received: by qwb7 with SMTP id 7so1421052qwb.3 for <7292@debbugs.gnu.org>; Wed, 27 Oct 2010 20:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=8+4g1biX2hOaBaMFwrcOhhyP8XMhiLiXv1B0H/FNv8A=; b=bc2n4wK3XWvk68rdHXbPSDKAQF+LHx1hMMd+P5aghsGirzMm3xVIpVtEDRWMMcXO0d Jc4a3d91/vwqrUeYHY88q37r3hka7mZ0Uh/AHP7WcJNMG6osjEYAhLKVEBNHlcg6GHv6 TEOl4rY90bF7ZgjtDOqvpVwCB1OjbZbicoUY8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=dsBBWePyRjJZPGg7oX5lHIw6ZApesX8dCR+LAQEvDDbpxaUae/p/5EU+gI/sFeTt1Z y8/BVT9PemCNj3DOq3fdWfC7I57RmFJGw/yzP89xYtqEXrk7ple5bPDZiCLgfaX0F2at 79A8w4a9/HVQ16WLCWsPMyGXvpgvr7aXef37k= Received: by 10.224.195.65 with SMTP id eb1mr3394207qab.71.1288235500293; Wed, 27 Oct 2010 20:11:40 -0700 (PDT) Received: from [192.168.1.28] (cpe-74-74-249-54.rochester.res.rr.com [74.74.249.54]) by mx.google.com with ESMTPS id y21sm345504vbx.16.2010.10.27.20.11.38 (version=SSLv3 cipher=RC4-MD5); Wed, 27 Oct 2010 20:11:39 -0700 (PDT) Message-ID: <4CC8E9E9.8080104@gmail.com> Date: Wed, 27 Oct 2010 23:11:37 -0400 From: Ryan Twitchell User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.11) Gecko/20101025 Lightning/1.0b3pre Thunderbird/3.1.5 MIME-Version: 1.0 To: Glenn Morris Subject: Re: bug#7292: view-mode clobbers speedbar bindings References: <4CC8BDBE.4090709@gmail.com> <7lr5fbuiji.fsf@fencepost.gnu.org> In-Reply-To: <7lr5fbuiji.fsf@fencepost.gnu.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: 7292 Cc: 7292@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.7 (---) On 10/27/2010 11:01 PM, Glenn Morris wrote: > Ryan Twitchell wrote: > >> speedbar-mode calls toggle-read-only; > Why does it do this, as opposed to `(setq buffer-read-only t)'? > > (I notice a few other files call toggle-read-only as well. Seems odd.) A fair question. I suppose this is just caution: toggle-read-only will always "do the right thing" to make sure the buffer is read-only, though setting buffer-read-only should be sufficient. Ryan Twitchell From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 29 03:45:24 2010 Received: (at 7292) by debbugs.gnu.org; 29 Oct 2010 07:45:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PBjeN-0000NB-VK for submit@debbugs.gnu.org; Fri, 29 Oct 2010 03:45:24 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PBjeL-0000N6-UR for 7292@debbugs.gnu.org; Fri, 29 Oct 2010 03:45:22 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1PBjiM-0002Yh-8Z; Fri, 29 Oct 2010 03:49:30 -0400 To: Ryan Twitchell Subject: Re: bug#7292: view-mode clobbers speedbar bindings References: <4CC8BDBE.4090709@gmail.com> <7lr5fbuiji.fsf@fencepost.gnu.org> <4CC8E9E9.8080104@gmail.com> From: Glenn Morris X-Spook: class struggle subversive STARLAN Ft. Bragg Soviet John X-Ran: #5J-T+*fL=y;l@~3ZYYGn4Pl)z)I8fN:B.Y+'B:T8Fe7X5w1B8sE`Qt>VNR:d2}wa=QOH. X-Hue: yellow X-Debbugs-No-Ack: yes X-Attribution: GM Date: Fri, 29 Oct 2010 03:49:29 -0400 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: 7292 Cc: 7292@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) Ryan Twitchell wrote: >> (I notice a few other files call toggle-read-only as well. Seems odd.) > > A fair question. I suppose this is just caution: toggle-read-only will > always "do the right thing" to make sure the buffer is read-only, though > setting buffer-read-only should be sufficient. That doesn't make sense to me. I replace several inappropriate uses, including the speedbar one. I wonder if toggle-read-only should even be added to byte-compile-interactive-only-functions. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 29 11:56:41 2010 Received: (at 7292) by debbugs.gnu.org; 29 Oct 2010 15:56:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PBrJp-0004X4-0h for submit@debbugs.gnu.org; Fri, 29 Oct 2010 11:56:41 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PBrJm-0004Wx-Ql for 7292@debbugs.gnu.org; Fri, 29 Oct 2010 11:56:39 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgwKABSNykzO+Krc/2dsb2JhbACgVn1yvyiFSASSKg X-IronPort-AV: E=Sophos;i="4.58,260,1286164800"; d="scan'208";a="81043638" Received: from 206-248-170-220.dsl.teksavvy.com (HELO ceviche.home) ([206.248.170.220]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 29 Oct 2010 12:00:30 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 7B919660F5; Fri, 29 Oct 2010 12:00:30 -0400 (EDT) From: Stefan Monnier To: Glenn Morris Subject: Re: bug#7292: view-mode clobbers speedbar bindings Message-ID: References: <4CC8BDBE.4090709@gmail.com> <7lr5fbuiji.fsf@fencepost.gnu.org> <4CC8E9E9.8080104@gmail.com> Date: Fri, 29 Oct 2010 12:00:30 -0400 In-Reply-To: (Glenn Morris's message of "Fri, 29 Oct 2010 03:49:29 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 7292 Cc: 7292@debbugs.gnu.org, Ryan Twitchell X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) >>> (I notice a few other files call toggle-read-only as well. Seems odd.) >> A fair question. I suppose this is just caution: toggle-read-only will >> always "do the right thing" to make sure the buffer is read-only, though >> setting buffer-read-only should be sufficient. > That doesn't make sense to me. I replace several inappropriate uses, > including the speedbar one. > I wonder if toggle-read-only should even be added to > byte-compile-interactive-only-functions. I wonder as well. I know I'm to blame for some of the calls to toggle-read-only, because I thought it might be better to use the higher-level function. But indeed it seems that was a mistake. So let's add it to byte-compile-interactive-only-functions (with a comment about why); and if it turns out that there are many cases where calling it from Elisp makes sense, then we'll get to learn which are the cases where it makes sense. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 09 21:19:58 2011 Received: (at 7292-done) by debbugs.gnu.org; 10 Nov 2011 02:19:58 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROKFC-0008Ti-42 for submit@debbugs.gnu.org; Wed, 09 Nov 2011 21:19:58 -0500 Received: from fencepost.gnu.org ([140.186.70.10] ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROKFA-0008Tc-P7 for 7292-done@debbugs.gnu.org; Wed, 09 Nov 2011 21:19:57 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1ROKF2-0001yG-7f; Wed, 09 Nov 2011 21:19:48 -0500 From: Glenn Morris To: 7292-done@debbugs.gnu.org Subject: Re: bug#7292: view-mode clobbers speedbar bindings References: <4CC8BDBE.4090709@gmail.com> <7lr5fbuiji.fsf@fencepost.gnu.org> <4CC8E9E9.8080104@gmail.com> X-Spook: high security Attorney General 2600 Magazine mailbomb X-Ran: ~NgDB.&+.{[kKx(W2RXB};1nVKWf:'EHcRp7EsvtO_V+'3o$VoJ7YFn}[F&$bXq&2n{L2' X-Hue: cyan X-Attribution: GM Date: Wed, 09 Nov 2011 21:19:48 -0500 In-Reply-To: (Stefan Monnier's message of "Fri, 29 Oct 2010 12:00:30 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 7292-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) Version: 24.0.92 Stefan Monnier wrote: > So let's add it to byte-compile-interactive-only-functions (with > a comment about why); and if it turns out that there are many cases > where calling it from Elisp makes sense, then we'll get to learn which > are the cases where it makes sense. Done. From unknown Wed Jun 18 23:04:32 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 08 Dec 2011 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator