GNU bug report logs - #18207
erc-truncate-buffer-on-save: misleading variable name and docstring

Previous Next

Package: emacs;

Reported by: Ivan Shmakov <ivan <at> siamics.net>

Date: Wed, 6 Aug 2014 10:37:01 UTC

Severity: minor

Tags: fixed

Done: Lars Ingebrigtsen <larsi <at> gnus.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 18207 in the body.
You can then email your comments to 18207 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-gnu-emacs <at> gnu.org:
bug#18207; Package emacs. (Wed, 06 Aug 2014 10:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ivan Shmakov <ivan <at> siamics.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 06 Aug 2014 10:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: submit <at> debbugs.gnu.org
Subject: erc-truncate-buffer-on-save: misleading variable name and docstring 
Date: Wed, 06 Aug 2014 10:35:57 +0000
Package:  emacs
Severity: minor

	The docstring for erc-truncate-buffer-on-save reads:

Truncate any ERC (channel, query, server) buffer when it is saved.

	This is somewhat misleading, as there’re also erc-truncate
	module, and, in particular, – the erc-truncate-buffer function,
	which are used to truncate buffer /to a given size/ (see
	erc-max-buffer-size.)  On the contrary, this variable, when
	non-nil, forces the buffer to be /completely erased,/ as per the
	following lisp/erc/erc-log.el fragment:

   434		      (if (and erc-truncate-buffer-on-save
   435			       (called-interactively-p 'interactive))
   436			  (progn
   437			    (let ((inhibit-read-only t)) (erase-buffer))
   438			    (move-marker erc-last-saved-position (point-max))
   439			    (erc-display-prompt))

	I believe that this behavior should be made clear in the
	documentation, like:

Erase ERC (channel, query, server) buffers when one is saved.

This function uses `erase-buffer' and has nothing to do with the
`erc-truncate-buffer' function.  In order to keep ERC buffer sizes
within a specific limit, you may set `erc-max-buffer-size' and use
`erc-truncate-mode' instead.

	It also makes sense to rename this variable (leaving a
	compatibility alias.)

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18207; Package emacs. (Sun, 27 Dec 2015 20:46:01 GMT) Full text and rfc822 format available.

Message #8 received at 18207 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ivan Shmakov <ivan <at> siamics.net>
Cc: 18207 <at> debbugs.gnu.org
Subject: Re: bug#18207: erc-truncate-buffer-on-save: misleading variable name
 and docstring
Date: Sun, 27 Dec 2015 21:44:54 +0100
Ivan Shmakov <ivan <at> siamics.net> writes:

> Package:  emacs
> Severity: minor
>
> 	The docstring for erc-truncate-buffer-on-save reads:
>
> Truncate any ERC (channel, query, server) buffer when it is saved.
>
> 	This is somewhat misleading, as there’re also erc-truncate
> 	module, and, in particular, – the erc-truncate-buffer function,
> 	which are used to truncate buffer /to a given size/ (see
> 	erc-max-buffer-size.)  On the contrary, this variable, when
> 	non-nil, forces the buffer to be /completely erased,/ as per the
> 	following lisp/erc/erc-log.el fragment:
>
>    434		      (if (and erc-truncate-buffer-on-save
>    435			       (called-interactively-p 'interactive))
>    436			  (progn
>    437			    (let ((inhibit-read-only t)) (erase-buffer))
>    438			    (move-marker erc-last-saved-position (point-max))
>    439			    (erc-display-prompt))
>
> 	I believe that this behavior should be made clear in the
> 	documentation, like:
>
> Erase ERC (channel, query, server) buffers when one is saved.
>
> This function uses `erase-buffer' and has nothing to do with the
> `erc-truncate-buffer' function.  In order to keep ERC buffer sizes
> within a specific limit, you may set `erc-max-buffer-size' and use
> `erc-truncate-mode' instead.

Can you send a patch for this change?

> 	It also makes sense to rename this variable (leaving a
> 	compatibility alias.)

I don't think that renaming the variable is worth it.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18207; Package emacs. (Sat, 14 Apr 2018 18:54:02 GMT) Full text and rfc822 format available.

Message #11 received at 18207 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ivan Shmakov <ivan <at> siamics.net>
Cc: 18207 <at> debbugs.gnu.org
Subject: Re: bug#18207: erc-truncate-buffer-on-save: misleading variable name
 and docstring
Date: Sat, 14 Apr 2018 20:53:09 +0200
Ivan Shmakov <ivan <at> siamics.net> writes:

> 	The docstring for erc-truncate-buffer-on-save reads:
>
> Truncate any ERC (channel, query, server) buffer when it is saved.
>
> 	This is somewhat misleading, as there’re also erc-truncate
> 	module, and, in particular, – the erc-truncate-buffer function,
> 	which are used to truncate buffer /to a given size/ (see
> 	erc-max-buffer-size.)  On the contrary, this variable, when
> 	non-nil, forces the buffer to be /completely erased,/ as per the
> 	following lisp/erc/erc-log.el fragment:
>
>    434		      (if (and erc-truncate-buffer-on-save
>    435			       (called-interactively-p 'interactive))
>    436			  (progn
>    437			    (let ((inhibit-read-only t)) (erase-buffer))
>    438			    (move-marker erc-last-saved-position (point-max))
>    439			    (erc-display-prompt))
>
> 	I believe that this behavior should be made clear in the
> 	documentation, like:
>
> Erase ERC (channel, query, server) buffers when one is saved.

I've now made a similar change to Emacs 27.1.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 14 Apr 2018 18:54:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 18207 <at> debbugs.gnu.org and Ivan Shmakov <ivan <at> siamics.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 14 Apr 2018 18:54:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 13 May 2018 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 99 days ago.

Previous Next


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