Gnus development mailing list
 help / color / mirror / Atom feed
From: Pavel.Janik@inet.cz (Pavel Janík ml.)
Subject: Labels/Annotations per message
Date: Sat, 13 May 2000 14:20:28 +0200	[thread overview]
Message-ID: <m3ln1ed4tj.fsf@totally-fudged-out-message-id> (raw)

Hi,

I was thinking about the feature I wanted to have in Gnus. Very often, I need
to comment (ie. associate the annotation) with my messages. Like "I should
answer this", "This is worthy reading" and similar. I used to solve this via
creating additional nnfolder groups like AnswerIt, ReadIt etc. But this is not
universal. What if I'd like to answer/see only the messages from linux-kernel
or read only interesting things from Gnus mailing list? I do not think that
current Gnus can ease the work here. I remember that RMAIL has something like
this. So I looked around in ding archive and found the discussion between Lars
and Kai about labels. Some part of this is also in todo file:

,---- From Newest Features 
|    * LMI> Well, nnbabyl could alter the group info to heed labels like
|      LMI> answered and read, I guess.
| 
|      It could also keep them updated (the same for the Status: header of
|      unix mbox files).
|      ...
`----

I think that this will be worthy to have.

As I use nnfolder to store all my mail, I use X-Annotations header to do
that. My gnus-summary-line-format's value is 
"%U%R%z%I%(%[%4L: %-20,20f%]%) %uX%s\n"

So I prepend the result of the function gnus-user-format-function-X before the
actual subject of the message. The actual function looks like (sorry for my
elisp ;-):

(defun gnus-user-format-function-X (header)
  "My user-defined function for annotations"
  (let ((my-extra-headers (mail-header-extra gnus-tmp-header)))
    (while (and my-extra-headers (not (eq (car (car my-extra-headers)) 'X-Annotations)))
      (setq my-extra-headers (cdr my-extra-headers)))
    (setq my-extra-headers (cdr (car my-extra-headers)))
    (if my-extra-headers
	(concat "{" my-extra-headers "} ")
      "")))

And I have X-Annotations in *-extra-headers:

(setq gnus-extra-headers '(To Cc X-Annotations))
(setq nnmail-extra-headers gnus-extra-headers)

So when I receive a message with X-Annotations or I add this header via `e' to
the message in the summary buffer, it is displayed with that annotation
prepended before subject. This is sufficient for me, cause I use nnfolder
only. But this is not generic. You can not annotate nntp articles this way
etc.

So I also thought about the Real Solution (tm). We should probably invent
another type of mark, which is associated with annotations. It can be stored
in .newsrc.eld or somewhere else?

gnus-newsrc-alist in .newsrc.eld looks like this now:

("Gnus" 3 ((1 . 1748)) ((dormant 1015 (1153 . 1154)) (expire (1735 . 1748)) (reply 1466 1557 1637) (tick 1734)))

What about inventing new mark annotate like this:

("Gnus" 3 ((1 . 1748)) ((annotate (1 "This is the first message in the buffer.") (1748 "I just received this message."))))

The first message is marked as such and the last one too. If this is
implemented, you can easily limit the summary buffer to the regexp of these
annotations and similar.

What do you think about it?

I think it is worthy to discuss it here and when we will have the
specification, someone with sufficient elisp knowledge can implement it :-)
-- 
Pavel Janík ml.
Pavel.Janik@inet.cz



             reply	other threads:[~2000-05-13 12:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-13 12:20 Pavel Janík ml. [this message]
2000-08-13 17:07 ` Lars Magne Ingebrigtsen
2000-08-13 19:13   ` Karl Eichwalder
2000-08-14 15:52     ` François Pinard
2000-08-14 21:10       ` Kai Großjohann
2000-08-13 19:26   ` Kai Großjohann
2000-08-13 19:50     ` Lars Magne Ingebrigtsen
2000-08-14 21:09       ` Kai Großjohann

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=m3ln1ed4tj.fsf@totally-fudged-out-message-id \
    --to=pavel.janik@inet.cz \
    /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).