From unknown Mon Aug 18 04:38:04 2025 X-Loop: don@donarmstrong.com Subject: bug#1434: Docstring for `toggle-read-only' shouldn't imply the buffer is file-visiting Reply-To: "Juanma Barranquero" , 1434@debbugs.gnu.org Resent-From: "Juanma Barranquero" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 26 Nov 2008 15:45:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1434 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122771386032755 (code B ref -1); Wed, 26 Nov 2008 15:45:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-10.1 required=4.0 tests=AWL,BAYES_00,HAS_PACKAGE, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 26 Nov 2008 15:37:40 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAQFbZk3032745 for ; Wed, 26 Nov 2008 07:37:36 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L5MSM-0003yk-Ue for bug-gnu-emacs@gnu.org; Wed, 26 Nov 2008 10:37:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L5MSL-0003yE-HM for bug-gnu-emacs@gnu.org; Wed, 26 Nov 2008 10:37:34 -0500 Received: from [199.232.76.173] (port=35702 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L5MSL-0003yB-BJ for bug-gnu-emacs@gnu.org; Wed, 26 Nov 2008 10:37:33 -0500 Received: from rn-out-0910.google.com ([64.233.170.184]:46523) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L5MSK-0006Yx-Vv for bug-gnu-emacs@gnu.org; Wed, 26 Nov 2008 10:37:33 -0500 Received: by rn-out-0910.google.com with SMTP id k32so528477rnd.7 for ; Wed, 26 Nov 2008 07:37:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=9WNFJsrtVLz2ONnaOIEprAAuod7aBhJCYy9CAvtuHio=; b=oAm1r8Eiyf6OcwFDddzG8CHNWaHAPPSeuu9uwMcq4kpyxzZidaL3VkUZoZU13zZts+ 3taka/uV5BPENaRkpc0L61M9pCwk21qr7kCkGtF2fwHrAqUVPyYCYASezf4qodJ5xR1r vTmU25L3cYP3VwkwU7MTZNSbTKJDlZCpvX1Ao= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=FRQutnat0447UjX7YO6RT0kTuBfJbeOi507l63670KrQt3TdovYHuMCPfJCcMt3wnA fKBFgdMr0rRZICNr3nrIEu94hSsZd82ACCZkJGZAlE+pXCRzsiJHm7P22991kTFY5xHB 6Iz9UgB2/eJOs1Vh71cgdH/S6dW2QQvnYmUvA= Received: by 10.100.141.10 with SMTP id o10mr3128946and.41.1227713851488; Wed, 26 Nov 2008 07:37:31 -0800 (PST) Received: by 10.100.13.13 with HTTP; Wed, 26 Nov 2008 07:37:31 -0800 (PST) Message-ID: Date: Wed, 26 Nov 2008 16:37:31 +0100 From: "Juanma Barranquero" To: Bug-Gnu-Emacs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Package: emacs Severity: minor Most references to readonly-ness in files.el do talk about file-visiting buffers, which makes sense. However, `toggle-read-only' is useful for non-visiting buffers too, though the docstring seems to imply otherwise. Docstring for `toggle-read-only' says: Change whether this buffer is visiting its file read-only. With prefix argument ARG, make the buffer read-only if ARG is positive, otherwise make it writable. If visiting file read-only and `view-read-only' is non-nil, enter view mode. Juanma From unknown Mon Aug 18 04:38:04 2025 X-Loop: don@donarmstrong.com Subject: bug#1434: Docstring for `toggle-read-only' shouldn't imply thebuffer is file-visiting Reply-To: "Drew Adams" , 1434@debbugs.gnu.org Resent-From: "Drew Adams" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 26 Nov 2008 18:15:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1434 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12277229347171 (code B ref -1); Wed, 26 Nov 2008 18:15:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.6 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 26 Nov 2008 18:08:54 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAQI8oVb007165 for ; Wed, 26 Nov 2008 10:08:51 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L5Ooj-0002gS-Pn for bug-gnu-emacs@gnu.org; Wed, 26 Nov 2008 13:08:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L5Ooh-0002fL-Rb for bug-gnu-emacs@gnu.org; Wed, 26 Nov 2008 13:08:49 -0500 Received: from [199.232.76.173] (port=53066 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L5Ooh-0002fB-KW for bug-gnu-emacs@gnu.org; Wed, 26 Nov 2008 13:08:47 -0500 Received: from rcsinet11.oracle.com ([148.87.113.123]:38621 helo=rgminet11.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L5Ooh-0004Sj-5J for bug-gnu-emacs@gnu.org; Wed, 26 Nov 2008 13:08:47 -0500 Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rgminet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mAQI9KI8031050 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 26 Nov 2008 18:09:21 GMT Received: from acsmt701.oracle.com (acsmt701.oracle.com [141.146.40.71]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mAQI8bJB009606; Wed, 26 Nov 2008 18:08:38 GMT Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 26 Nov 2008 10:08:30 -0800 From: "Drew Adams" To: "'Juanma Barranquero'" , <1434@debbugs.gnu.org>, "'Bug-Gnu-Emacs'" References: Date: Wed, 26 Nov 2008 10:08:30 -0800 Message-ID: <000601c94ff1$fd2f54e0$c2b22382@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AclP3s2/pNLfwmgQS3q4TtlVsyiRpgAEtzJw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: acsmt701.oracle.com [141.146.40.71] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A09020A.492D90A0.0125:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-CrossAssassin-Score: 2 > Most references to readonly-ness in files.el do talk about > file-visiting buffers, which makes sense. However, `toggle-read-only' > is useful for non-visiting buffers too, though the docstring seems to > imply otherwise. > > Docstring for `toggle-read-only' says: > > Change whether this buffer is visiting its file read-only. > With prefix argument ARG, make the buffer read-only if ARG is > positive, otherwise make it writable. If visiting file read-only > and `view-read-only' is non-nil, enter view mode. FWIW, I agree. When writing mode doc strings that describe some key bindings using \\[...], for instance, I typically toggle read-only in *Help*, to adjust line lengths there before correcting the source code. From unknown Mon Aug 18 04:38:04 2025 X-Loop: don@donarmstrong.com Subject: bug#1434: Docstring for `toggle-read-only' shouldn't imply the buffer is file-visiting Reply-To: Glenn Morris , 1434@debbugs.gnu.org Resent-From: Glenn Morris Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 04 Dec 2008 00:05:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1434 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 1434-submit@emacsbugs.donarmstrong.com id=B1434.122834874025488 (code B ref 1434); Thu, 04 Dec 2008 00:05:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-12.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1434) by emacsbugs.donarmstrong.com; 3 Dec 2008 23:59:00 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB3NwvsY025482 for <1434@emacsbugs.donarmstrong.com>; Wed, 3 Dec 2008 15:58:58 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1L81bw-0006sW-HK; Wed, 03 Dec 2008 18:58:28 -0500 From: Glenn Morris To: Juanma Barranquero Cc: 1434@debbugs.gnu.org References: X-Spook: Juiliett Class Submarine Al Jazeera ASDIC Plame Delta X-Ran: q!p^7tzH@EW1>,;mNhSxF[R0ybRrQezyBi+`Qq@uXlMz_k5&ILR&H)z$W^O%;kV'aT^9Rn X-Hue: cyan X-Attribution: GM Date: Wed, 03 Dec 2008 18:58:28 -0500 In-Reply-To: (Juanma Barranquero's message of "Wed, 26 Nov 2008 16:37:31 +0100") 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 "Juanma Barranquero" wrote: > `toggle-read-only' is useful for non-visiting buffers too, though > the docstring seems to imply otherwise. So let's change it? *** files.el 3 Dec 2008 03:26:01 -0000 1.1022 --- files.el 3 Dec 2008 23:57:40 -0000 *************** *** 4404,4412 **** (set-buffer-modified-p arg)) (defun toggle-read-only (&optional arg) ! "Change whether this buffer is visiting its file read-only. With prefix argument ARG, make the buffer read-only if ARG is ! positive, otherwise make it writable. If visiting file read-only and `view-read-only' is non-nil, enter view mode." (interactive "P") (if (and arg --- 4404,4412 ---- (set-buffer-modified-p arg)) (defun toggle-read-only (&optional arg) ! "Change whether this buffer is read-only. With prefix argument ARG, make the buffer read-only if ARG is ! positive, otherwise make it writable. If buffer is read-only and `view-read-only' is non-nil, enter view mode." (interactive "P") (if (and arg From unknown Mon Aug 18 04:38:04 2025 X-Loop: don@donarmstrong.com Subject: bug#1434: Docstring for `toggle-read-only' shouldn't imply the buffer is file-visiting Reply-To: "Juanma Barranquero" , 1434@debbugs.gnu.org Resent-From: "Juanma Barranquero" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 04 Dec 2008 00:10:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1434 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 1434-submit@emacsbugs.donarmstrong.com id=B1434.122834905326696 (code B ref 1434); Thu, 04 Dec 2008 00:10:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1434) by emacsbugs.donarmstrong.com; 4 Dec 2008 00:04:13 +0000 Received: from rn-out-0910.google.com (rn-out-0910.google.com [64.233.170.187]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB404Amf026689 for <1434@emacsbugs.donarmstrong.com>; Wed, 3 Dec 2008 16:04:11 -0800 Received: by rn-out-0910.google.com with SMTP id j66so3466542rne.20 for <1434@emacsbugs.donarmstrong.com>; Wed, 03 Dec 2008 16:04:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=LyNyHd1z1cKE7I26AGJ7irosqyKmGabxnPj6fb+RgoQ=; b=mMhTtPKUskI8G9oNOoVWlGOEwt+C8+XPp0CiP/DBjQHT5T/RryqeJSLUCeYywfczVV zGEb2e2sqlCo1x4Jke7SdEQNBUTC1/cShTj8tWpyyCq4kg/8B92Xkj2lqjsCz2tYt/QI uRe5KzW1GN6Tkdd2hmSOR6MrTOe68a9shKgRM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=cyx+3HqSEq/oIVpZ4ysahls8P04qOAsZ+u5BNX8cuwD3CKm+Ja2I+3OrnPaclIOZvY YkgwgerZso8XieRcyvzqNO2TZuj6InTCj/oiOUyHrq6ZO+w7Lp0eKNLf1MZmaDTnjucO Wnsvq2TFchks0tOqsd7MTeoSnSIXIcBQCt/50= Received: by 10.100.124.1 with SMTP id w1mr8142598anc.3.1228349045245; Wed, 03 Dec 2008 16:04:05 -0800 (PST) Received: by 10.100.13.13 with HTTP; Wed, 3 Dec 2008 16:04:00 -0800 (PST) Message-ID: Date: Thu, 4 Dec 2008 01:04:00 +0100 From: "Juanma Barranquero" To: "Glenn Morris" Cc: 1434@debbugs.gnu.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: On Thu, Dec 4, 2008 at 00:58, Glenn Morris wrote: > So let's change it? > --- 4404,4412 ---- > (set-buffer-modified-p arg)) > > (defun toggle-read-only (&optional arg) > ! "Change whether this buffer is read-only. > With prefix argument ARG, make the buffer read-only if ARG is > ! positive, otherwise make it writable. If buffer is read-only > and `view-read-only' is non-nil, enter view mode." > (interactive "P") > (if (and arg OK. Juanma