Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* adding a header when filing a message into a specific mailbox
@ 2015-10-08 11:21 Erik Colson
  2015-10-08 13:20 ` Peter Münster
  0 siblings, 1 reply; 2+ messages in thread
From: Erik Colson @ 2015-10-08 11:21 UTC (permalink / raw)
  To: info-gnus-english

Hi,

I happen to have a lot of mailboxes (~2000) to archive mails which works
fine with gnus.

However there is one specific mailbox I use to archive mails concerning
projects which never got executed. This mailbox holds a lot of messages
which are not really searchable.

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...

What do you guys think about this?
Maybe this already exists?
Or maybe this idea is nuts?

any ideas welcome !
-- 
erik colson



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: adding a header when filing a message into a specific mailbox
  2015-10-08 11:21 adding a header when filing a message into a specific mailbox Erik Colson
@ 2015-10-08 13:20 ` Peter Münster
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Münster @ 2015-10-08 13:20 UTC (permalink / raw)
  To: info-gnus-english

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-08 13:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-08 11:21 adding a header when filing a message into a specific mailbox Erik Colson
2015-10-08 13:20 ` Peter Münster

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).