GNU bug report logs - #1434
Docstring for `toggle-read-only' shouldn't imply the buffer is file-visiting

Previous Next

Package: emacs;

Reported by: "Juanma Barranquero" <lekktu <at> gmail.com>

Date: Wed, 26 Nov 2008 15:45:03 UTC

Severity: minor

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1434 in the body.
You can then email your comments to 1434 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1434; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to "Juanma Barranquero" <lekktu <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: Bug-Gnu-Emacs <bug-gnu-emacs <at> gnu.org>
Subject: Docstring for `toggle-read-only' shouldn't imply the buffer is file-visiting
Date: Wed, 26 Nov 2008 16:37:31 +0100
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





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1434; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Juanma Barranquero'" <lekktu <at> gmail.com>,
        <1434 <at> debbugs.gnu.org>,
        "'Bug-Gnu-Emacs'" <bug-gnu-emacs <at> gnu.org>
Subject: RE: bug#1434: Docstring for `toggle-read-only' shouldn't imply thebuffer is file-visiting
Date: Wed, 26 Nov 2008 10:08:30 -0800
> 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.






Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1434; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1434; Package emacs. Full text and rfc822 format available.

Message #18 received at 1434 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 1434 <at> debbugs.gnu.org
Subject: Re: bug#1434: Docstring for `toggle-read-only' shouldn't imply the buffer is file-visiting
Date: Wed, 03 Dec 2008 18:58:28 -0500
"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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1434; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to "Juanma Barranquero" <lekktu <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #23 received at 1434 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: "Glenn Morris" <rgm <at> gnu.org>
Cc: 1434 <at> debbugs.gnu.org
Subject: Re: bug#1434: Docstring for `toggle-read-only' shouldn't imply the buffer is file-visiting
Date: Thu, 4 Dec 2008 01:04:00 +0100
On Thu, Dec 4, 2008 at 00:58, Glenn Morris <rgm <at> gnu.org> 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




bug closed, send any further explanations to "Juanma Barranquero" <lekktu <at> gmail.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Thu, 04 Dec 2008 06:20:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Thu, 01 Jan 2009 15:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 174 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.