bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18250: 24.3; ERC display commands in current buffer


From: Kelvin White
Subject: bug#18250: 24.3; ERC display commands in current buffer
Date: Tue, 12 Aug 2014 09:03:41 -0400
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/24.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

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?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]