Gnus:如何强制将签名放在回复的底部/引用消息下?

时间:2011-12-09 16:37:18

标签: emacs gnus

我将Gnus 5.13用于电子邮件(在Mac OS X 10.7.2上使用emacs 24)。我使用gnus-posting-styles条目(eval (set (make-local-variable 'message-cite-reply-position) 'above))将点(光标)放在回复中的消息顶部。这允许我顶部回复或内联回复(在我想回复的消息之间)。不幸的是,上面的条目也将我的签名放在我想回复的邮件之上。如果我想要回复,那也没关系,但如果我想回复内联则错了。如何强制将签名放在我回复的邮件?

1 个答案:

答案 0 :(得分:1)

放弃'message-cite-reply-position'修改,我已将以下内容添加到我的.gnus.el文件中,现在回复电子邮件或新闻帖时,首先发送被删除的消息,然后是我的签名,该点位于邮件的开头。

(eval-after-load "gnus-msg"
  '(defun gnus-inews-yank-articles (articles)
    (let (beg article yank-string)
      (message-goto-body)
      (while (setq article (pop articles))
        (when (listp article)
          (setq yank-string (nth 1 article)
                article (nth 0 article)))
        (save-window-excursion
          (set-buffer gnus-summary-buffer)
          (gnus-summary-select-article nil nil nil article)
          (gnus-summary-remove-process-mark article))
        (gnus-copy-article-buffer nil yank-string)
        (let ((message-reply-buffer gnus-article-copy)
              (message-reply-headers
               ;; The headers are decoded.                                                                                                                                               
               (with-current-buffer gnus-article-copy
                 (save-restriction
                   (nnheader-narrow-to-headers)
                   (nnheader-parse-naked-head)))))
          (message-yank-original)
          (setq beg (or beg (mark t))))
        (when articles
          (insert "\n")))
      (push-mark)
;      (goto-char beg)))        -- Original                              
     (message-goto-body)    ;  -- Modified, so point will be moved to beginning of article
     (insert "\n\n")        ;  -- and two empty lines will be added.
     (message-goto-body)))) ;  --