unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* ERC kill/insert current channel and server
@ 2019-04-27 23:50 Emanuel Berg
  0 siblings, 0 replies; only message in thread
From: Emanuel Berg @ 2019-04-27 23:50 UTC (permalink / raw)
  To: emacs-devel; +Cc: help-gnu-emacs, erc-discuss

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 "%s@%s" 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: emacs-devel@gnu.org

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

only message in thread, other threads:[~2019-04-27 23:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-27 23:50 ERC kill/insert current channel and server Emanuel Berg

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).