all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#18250: 24.3; ERC display commands in current buffer
@ 2014-08-12 13:03 Kelvin White
  0 siblings, 0 replies; only message in thread
From: Kelvin White @ 2014-08-12 13:03 UTC (permalink / raw)
  To: 18250


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?





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-12 13:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-12 13:03 bug#18250: 24.3; ERC display commands in current buffer Kelvin White

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.