The emacs way: boxquote.el

Finally I found a nice way of quoting in Emacs. It is particularly useful in gnus. The module in question is called boxquote and can be obtained from here.

It’ll draw a nice border around the quoted text:

 | This is the quoted text.

That’s the relevant entry from .emacs:

(require 'boxquote)
(global-set-key [f7] 'boxquote-region)

(global-set-key (kbd "C-c q y")   'boxquote-yank)
(global-set-key (kbd "C-c q r")   'boxquote-region)
(global-set-key (kbd "C-c q u")   'boxquote-unbox-region)
(global-set-key (kbd "C-c q t")   'boxquote-title)
(global-set-key (kbd "C-c q i")   'boxquote-insert-file)
(global-set-key (kbd "C-c q k")   'boxquote-kill)
(global-set-key (kbd "C-c q s")   'boxquote-shell-command)

(global-set-key (kbd "C-c q b")   'boxquote-buffer)
(global-set-key (kbd "C-c q p")   'boxquote-paragraph)
(global-set-key (kbd "C-c q n")   'boxquote-narrow-to-boxquote)
(global-set-key (kbd "C-c q w")   'boxquote-where-is)
(global-set-key (kbd "C-c q d f") 'boxquote-describe-function)
(global-set-key (kbd "C-c q d k") 'boxquote-describe-key)
(global-set-key (kbd "C-c q d v") 'boxquote-describe-variable)

If you use org-mode with standard key bindings, you are quite likely to encounter problems
as C-c b is also a common mapping for org-iswitchb:

(define-key global-map "\C-cb" 'org-iswitchb)

I personally changed the boxquote mappings to C-c q, which semantically makes more sense to me anyway

Leave a Reply

Your email address will not be published. Required fields are marked *