email - Gnus 回复并在顶部签名

标签 email emacs gnus

在摘要模式下,当我按 R 表示 gnus-summary-reply-with-original 或按 F 表示 gnus-summary-followup-with-original 时,我的签名会插入到原始消息文本下方。

我如何告诉 gnus 在消息的最顶部,在原始引用文本之前插入我的签名?

最佳答案

看起来这不是 Gnus 内置的选项(从 v5.10.8 开始),因此您必须像这样重新定义其中一个内置函数:

(eval-after-load "gnus-msg"
  (defun gnus-inews-yank-articles (articles)
    (let (beg article yank-string)
      (goto-char (point-max))           ; put articles after signature
      (insert "\n")                     ; and one extra newline
                                        ; was this (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))))

我将 'gnus-inews-yank-articles 的新定义包装在 eval-after-load 表单中,以便在适当的时候定义它。显然,如果您想允许自定义,请创建一个变量并编写适当的 if 语句。

关于email - Gnus 回复并在顶部签名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1050968/

相关文章:

java - 使用 java 将电子邮件转换为其原始格式

emacs - 组织模式折叠将空白视为内容

emacs - 为 BBDB3 中的所有电子邮件地址自动创建条目

email - 使用谷歌应用程序脚本获取gmail中的当前线程ID

ios - 使用 SKPSMTPMessage 发送的电子邮件附件在 iOS 邮件客户端中显示为联系人

java - 无需身份验证/没有发件人密码即可发送 java 电子邮件

emacs - css 的 html 缩进,emacs 中的 html

emacs - emacs 的行重复代码

emacs - 更改 GNUS 组的显示名称

Emacs Gnus 接收邮件(dis)订单