;;; -*- lexical-binding: t -*- ;; ;; this file: ;; https://dataswamp.org/~incal/emacs-init/gnus/gnus-cite-incal.el (require 'gnus-cite) (setq message-cite-prefix-regexp "\\([ ]*\\(\\w\\|[_.]\\)+>+\\|[ ]*>\\)+") (setq gnus-treat-hide-citation t) (defun citation-style-f () (let*((from (mail-header-from message-reply-headers)) (from-data (gnus-extract-address-components from)) (name (or (car from-data) ;; if the user hasn't set his name, use the ;; mail username e.g. joe for joe@hacker.com (car (split-string (cadr from-data) "@")))) (citation-string (format "%s wrote:\n\n" name)) ) (insert citation-string) )) (setq message-citation-line-function #'citation-style-f) (defun gnus-article-show-filled-citation () (interactive) (let*((pos (point)) (btn (get-char-property pos 'button)) ) (when btn (widget-button-press pos) (save-excursion (gnus-article-fill-cited-article) )))) (provide 'cite)