From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Shmakov Newsgroups: gmane.emacs.bugs Subject: bug#18207: erc-truncate-buffer-on-save: misleading variable name and docstring Date: Wed, 06 Aug 2014 10:35:57 +0000 Message-ID: <87vbq5ucqa.fsf@violet.siamics.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1407321451 2919 80.91.229.3 (6 Aug 2014 10:37:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Aug 2014 10:37:31 +0000 (UTC) To: 18207@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 06 12:37:26 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XEyar-0000r6-1O for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Aug 2014 12:37:17 +0200 Original-Received: from localhost ([::1]:37973 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEyao-0003j8-JD for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Aug 2014 06:37:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEyah-0003il-IM for bug-gnu-emacs@gnu.org; Wed, 06 Aug 2014 06:37:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEyac-0004te-RP for bug-gnu-emacs@gnu.org; Wed, 06 Aug 2014 06:37:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEyac-0004tO-KR for bug-gnu-emacs@gnu.org; Wed, 06 Aug 2014 06:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XEyac-0007yY-2t for bug-gnu-emacs@gnu.org; Wed, 06 Aug 2014 06:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Shmakov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Aug 2014 10:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18207 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: submit@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.140732137130578 (code B ref -1); Wed, 06 Aug 2014 10:37:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Aug 2014 10:36:11 +0000 Original-Received: from localhost ([127.0.0.1]:59958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XEyZm-0007x6-Hl for submit@debbugs.gnu.org; Wed, 06 Aug 2014 06:36:11 -0400 Original-Received: from fely.am-1.org ([78.47.74.50]:49583) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XEyZj-0007wt-CP for submit@debbugs.gnu.org; Wed, 06 Aug 2014 06:36:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Sender:Subject:To:From; bh=7QDc2XvHgAtBt8dGIDKUW+zIG37PLz2xhNUHsX69eUk=; b=iuy1ErR0OEkelj6WyZCJtrcSWSgzbu9GywT/pi1Owo6PZxZTCmhI0mT4QAW1cj6cT039IAih9+//m0Lek76aUsEfOoi0DAtHlWMKG/vTNvhgg2nh4OuynvT1/9ttiFactRqIYP2YCXkp8uDIIMr9iHPk5QCZ3EJGTaTA2SUopNo=; Original-Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XEyZh-0003kI-Kv for submit@debbugs.gnu.org; Wed, 06 Aug 2014 10:36:06 +0000 Original-Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XEyZZ-0003Uk-Tr for submit@debbugs.gnu.org; Wed, 06 Aug 2014 17:35:58 +0700 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92170 Archived-At: 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=E2=80=99re also erc-truncate module, and, in particular, =E2=80=93 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.) --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A