Function: erc-grab-region
erc-grab-region is an interactive and byte-compiled function defined
in erc.el.gz.
Signature
(erc-grab-region START END)
Documentation
Copy the region between START and END in a recreatable format.
Converts all the IRC text properties in each line of the region into control codes and writes them to a separate buffer. The resulting text may be used directly as a script to generate this text again.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc-grab-region (start end)
"Copy the region between START and END in a recreatable format.
Converts all the IRC text properties in each line of the region
into control codes and writes them to a separate buffer. The
resulting text may be used directly as a script to generate this
text again."
(interactive "r")
(erc-set-active-buffer (current-buffer))
(save-excursion
(let* ((cb (current-buffer))
(buf (generate-new-buffer erc-grab-buffer-name))
(region (buffer-substring start end))
(lines (erc-split-multiline-safe region)))
(set-buffer buf)
(dolist (line lines)
(insert (concat line "\n")))
(set-buffer cb)
(switch-to-buffer-other-window buf)))
(message "erc-grab-region doesn't grab colors etc. anymore. If you use this, please tell the maintainers.")
(ding))