From: Lars Ingebrigtsen <larsi@gnus.org>
To: Ivan Shmakov <ivan@siamics.net>
Cc: 18207@debbugs.gnu.org
Subject: bug#18207: erc-truncate-buffer-on-save: misleading variable name and docstring
Date: Sun, 27 Dec 2015 21:44:54 +0100 [thread overview]
Message-ID: <8760zjbozd.fsf@gnus.org> (raw)
In-Reply-To: <87vbq5ucqa.fsf@violet.siamics.net> (Ivan Shmakov's message of "Wed, 06 Aug 2014 10:35:57 +0000")
Ivan Shmakov <ivan@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
next prev parent reply other threads:[~2015-12-27 20:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-06 10:35 bug#18207: erc-truncate-buffer-on-save: misleading variable name and docstring Ivan Shmakov
2015-12-27 20:44 ` Lars Ingebrigtsen [this message]
2018-04-14 18:53 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8760zjbozd.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=18207@debbugs.gnu.org \
--cc=ivan@siamics.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.