Gnus development mailing list
 help / color / mirror / Atom feed
* Labels/Annotations per message
@ 2000-05-13 12:20 Pavel Janík ml.
  2000-08-13 17:07 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Pavel Janík ml. @ 2000-05-13 12:20 UTC (permalink / 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



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

end of thread, other threads:[~2000-08-14 21:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-13 12:20 Labels/Annotations per message Pavel Janík ml.
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

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