all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kelvin White <kwhite@gnu.org>
To: 18250@debbugs.gnu.org
Subject: bug#18250: 24.3; ERC display commands in current buffer
Date: Tue, 12 Aug 2014 09:03:41 -0400	[thread overview]
Message-ID: <87y4uthnbm.wl%kwhite@gnu.org> (raw)


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	other threads:[~2014-08-12 13:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=87y4uthnbm.wl%kwhite@gnu.org \
    --to=kwhite@gnu.org \
    --cc=18250@debbugs.gnu.org \
    /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.