From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kelvin White Newsgroups: gmane.emacs.bugs Subject: bug#18250: 24.3; ERC display commands in current buffer Date: Tue, 12 Aug 2014 09:03:41 -0400 Message-ID: <87y4uthnbm.wl%kwhite@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1407848670 6988 80.91.229.3 (12 Aug 2014 13:04:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Aug 2014 13:04:30 +0000 (UTC) To: 18250@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 12 15:04:22 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 1XHBkQ-0002W3-Kp for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Aug 2014 15:04:18 +0200 Original-Received: from localhost ([::1]:41852 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHBkQ-0003tZ-7r for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Aug 2014 09:04:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHBkI-0003qN-Tp for bug-gnu-emacs@gnu.org; Tue, 12 Aug 2014 09:04:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHBkB-0003U6-1U for bug-gnu-emacs@gnu.org; Tue, 12 Aug 2014 09:04:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHBkA-0003U2-Ux for bug-gnu-emacs@gnu.org; Tue, 12 Aug 2014 09:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XHBkA-0006f7-IV for bug-gnu-emacs@gnu.org; Tue, 12 Aug 2014 09:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kelvin White Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Aug 2014 13:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18250 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.140784863725591 (code B ref -1); Tue, 12 Aug 2014 13:04:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Aug 2014 13:03:57 +0000 Original-Received: from localhost ([127.0.0.1]:40200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XHBk5-0006eh-Ii for submit@debbugs.gnu.org; Tue, 12 Aug 2014 09:03:57 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59147) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XHBk3-0006eU-DS for submit@debbugs.gnu.org; Tue, 12 Aug 2014 09:03:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHBju-0003R4-28 for submit@debbugs.gnu.org; Tue, 12 Aug 2014 09:03:50 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:57185) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHBjt-0003Qz-V8 for submit@debbugs.gnu.org; Tue, 12 Aug 2014 09:03:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHBjs-0003fn-Lc for bug-gnu-emacs@gnu.org; Tue, 12 Aug 2014 09:03:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHBjr-0003Qa-CQ for bug-gnu-emacs@gnu.org; Tue, 12 Aug 2014 09:03:44 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHBjr-0003QW-8g for bug-gnu-emacs@gnu.org; Tue, 12 Aug 2014 09:03:43 -0400 Original-Received: from [2600:3c02::f03c:91ff:fe73:3fa6] (port=45029 helo=localhost.gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1XHBjr-000317-0I for bug-gnu-emacs@gnu.org; Tue, 12 Aug 2014 09:03:43 -0400 User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL/10.8 EasyPG/1.0.0 Emacs/24.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:92437 Archived-At: Currently ERC will insert irc commands into the current buffer. I find this annoying for a couple of reasons and wanted some feedback on this behavior before going further. IMO it unneccesarily clutters up the buffer and in some cases contains sensitive information you may not want others to see, and may potentially even be logged. For example, if this was an /oper command or a command to identify to nickserv it would contain a password, if logging was enabled then it would be written in the logs. So, I came up with a simple patch... === modified file 'lisp/erc/erc.el' --- lisp/erc/erc.el 2014-08-07 16:44:19 +0000 +++ lisp/erc/erc.el 2014-08-12 12:48:29 +0000 @@ -5377,8 +5377,9 @@ (or (and erc-flood-protect (erc-split-line line)) (list line)))) (split-string str "\n")) - ;; Insert the prompt along with the command. - (erc-display-command str) + ;; Don't insert commands in buffer + (unless (string-match "^/" str) + (erc-display-command str)) (erc-process-input-line (concat str "\n") t nil)) t))))) ...but by doing this I realized that the function `erc-display-command' exists solely to display commands in the current buffer. Completely removing the call to `erc-display-command' in `erc-send-input' may be a better option. Anyone have any thoughts or suggestions?