[Top][All Lists]

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

ERC kill/insert current channel and server

From: Emanuel Berg
Subject: ERC kill/insert current channel and server
Date: Sun, 28 Apr 2019 01:50:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Here is another pretty useful function:

(defun erc-kill-ring-server-and-buffer (&optional insert)
  (interactive "P")
  (let*((channel (buffer-name (car (erc-buffer-list))))
        (server  erc-server)
        (full    (format "address@hidden" channel server) ))
    (if insert
        (insert full)
      (kill-new full) )))
(defalias 'erc-channel #'erc-kill-ring-server-and-buffer)
;; test:
;;   (erc-channel t)
;;   (erc-channel)

For example, you might first ask a question on
IRC, but you don't get a reply. So you decide
to ask on Gmane. Then you simply kill the
question already posted, yank it into
a message, and then use the above function to
say, "Hello, I just asked this on [invoke
function with C-u here] ..."

BTW I crosspost this to gmane.emacs.help and
gmane.emacs.devel as gmane.emacs.erc.general
seems to be totally dead. In erc.el, line 13,
it even says

;; Maintainer: address@hidden

underground experts united

reply via email to

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