From 0dab14238e9f5f7dcbee7409b2a7d1158599faec Mon Sep 17 00:00:00 2001 From: tfheen Date: Tue, 6 May 2008 08:20:59 +0000 Subject: [PATCH] Grab sender from Sender field git-svn-id: file:///svn/tfheen/trunk/dotfiles@1230 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf --- gnus | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/gnus b/gnus index 4bcf61e..593b3ac 100644 --- a/gnus +++ b/gnus @@ -93,13 +93,13 @@ (add-hook 'nntp-server-opened-hook 'nntp-send-authinfo) (add-hook 'nntp-server-opened-hook 'nntp-send-mode-reader) -(setq mail-open-quote "«") -(setq mail-close-quote "»") +(setq mail-open-quote "«") +(setq mail-close-quote "»") (defun mail-insert-quote (arg) "Insert the appropriate quote marks for Norwegian mail. -Inserts the value of `mail-open-quote' (normally «) or `mail-close-quote' -\(normally ») depending on the context. With prefix argument, always +Inserts the value of `mail-open-quote' (normally «) or `mail-close-quote' +\(normally ») depending on the context. With prefix argument, always inserts \" characters." (interactive "*P") (if arg @@ -272,6 +272,15 @@ inserts \" characters." ;(add-hook 'gnus-article-prepare-hook 'tfheen-right-quotify) (add-hook 'gnus-article-display-hook 'gnus-article-highlight-citation) +(defadvice message-sendmail-envelope-from (around tfheen-set-sendmail-sender activate) + "Set the sender to the contents of the Sender field, if present." + (if (message-fetch-field "sender") + (let ((message-sendmail-envelope-from + (nth 1 (mail-extract-address-components + (message-fetch-field "sender"))))) + ad-do-it) + ad-do-it)) + ;; Don't _reply_ in news, dimwit! (defadvice gnus-summary-reply (around reply-in-news activate) (interactive) @@ -385,8 +394,8 @@ inserts \" characters." (expand-file-name (concat "~/.signature-" system-name)) "~/.signature"))) - ;; Du vil sikkert ha mer her enn det følgende: - ("drift.news.nag.submissions" ;; Antar at man får moderator-mail hit + ;; Du vil sikkert ha mer her enn det følgende: + ("drift.news.nag.submissions" ;; Antar at man får moderator-mail hit (From ;; settes til bidragsyters adresse ved posting (save-excursion (set-buffer gnus-article-buffer) @@ -414,7 +423,7 @@ inserts \" characters." (widen) msgid) ) - "