Gnus: How to force signature to be placed at the bottom/under quoted messages in replies?

StackOverflow https://stackoverflow.com/questions/8448687

  •  12-03-2021
  •  | 
  •  

Question

I use Gnus 5.13 for emails (on Mac OS X 10.7.2 with emacs 24). I use the gnus-posting-styles entry (eval (set (make-local-variable 'message-cite-reply-position) 'above)) in order to place the point (cursor) on top of the message in replies. This allows me to either top-reply or to reply inline (between the message that I would like to reply to). Unfortunately, the above entry also puts my signature on top of the message I would like to reply to. That's okay if I want to top-reply, but it's wrong if I want to reply inline. How can I force the signature to be placed under the message I reply to?

Was it helpful?

Solution

Discarding the 'message-cite-reply-position' modification, I have added the following to my .gnus.el file, and now when replying to an e-mail or news post, first goes the yanked message, then my signature, and the point is placed at the beginning of the message.

(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)))) ;  --    
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top