Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: "Peter Münster" <pmlists@free.fr>
To: info-gnus-english@gnu.org
Subject: Re: adding a header when filing a message into a specific mailbox
Date: Thu, 08 Oct 2015 15:20:00 +0200	[thread overview]
Message-ID: <87a8rtbipr.fsf@free.fr> (raw)
In-Reply-To: <m2d1wp61xq.fsf@Riga.lan>

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	other threads:[~2015-10-08 13:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-08 11:21 Erik Colson
2015-10-08 13:20 ` Peter Münster [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a8rtbipr.fsf@free.fr \
    --to=pmlists@free.fr \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).