info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding a header when filing a message into a specific mailbox


From: Peter Münster
Subject: Re: adding a header when filing a message into a specific mailbox
Date: Thu, 08 Oct 2015 15:20:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

On Thu, Oct 08 2015, Erik Colson wrote:

> So I was thinking how I could achieve some kind of searching in this
> specific mailbox and I got an idea: why not add a specific header
> (i.e. "x-tag:") when filing messages into this specific mailbox? So I'd
> need gnus to ask me a question (tags) when it detects that I want to
> file messages into this specific mailbox. Then gnus can add the x-tag
> header to the messages before filing them. Another option is to write a
> specific function for this...

Perhaps like this:

--8<---------------cut here---------------start------------->8---
(defun pm/save-article (group)
  (interactive (list (gnus-group-completing-read
                      nil nil nil nil nil gnus-current-move-group)))
->(if group is the special one, then add x-tag header)
  (let ((summary-p (string-match "Summary" (buffer-name))))
    (gnus-summary-move-article nil group)
    (if summary-p
        (next-line)
      (gnus-summary-next-unread-article)
      (gnus-summary-show-article)
      (gnus-summary-select-article-buffer))))
--8<---------------cut here---------------end--------------->8---

-- 
           Peter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]