Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-registry flags API
@ 2007-09-25 16:26 Ted Zlatanov
  2007-09-25 19:58 ` Bastien
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Ted Zlatanov @ 2007-09-25 16:26 UTC (permalink / raw)
  To: Ding Mailing List

I added an API to the gnus-registry for reading and writing flags.  It's
very simple (id is always the message ID):

;; get the list of flags (note it's a list)
(gnus-registry-fetch-extra-flags id)
;; set 'important and 'todo flags (note the parameters are not a list)
(gnus-registry-store-extra-flags id 'important 'todo)
;; remove just the 'important flag
(gnus-registry-delete-extra-flags id 'important)
;; is 'important set?
(gnus-registry-has-extra-flag id 'important)
;; remove all the flags
(gnus-registry-store-extra-flags id nil)
;; convenience function for the above
(gnus-registry-delete-all-extra-flags id)

Because of the design of the gnus-registry, these flags will persist as
a message gets moved between groups.  The flag data is *not* stored in
the newsrc file, which I think is an advantage over server-side flags
for certain situations.  Code could be written to synchronize
server-side flags with gnus-registry flags, though I think it's more
valuable as a parallel facility that backends don't use, only intended
for frontend functionality.

Caching the flags (for quick lookup of all the 'important messages, for
example) will need some extra work, as the current caching assumes that
the extras value associated with a particular message and extras key is
not a list.

The frontend functionality I would like:

- set a flag for an article (this should be a simple function a user can
call from a group or message buffer, which grabs the message ID and uses
the gnus-registry API afterwards)

- indicate the article flags somehow (fringe or status line maybe?)

- add summary line formatting support for arbitrary flags

Any suggestions or contributions (especially the three items above) are
welcome.  Please review and criticize the code if you can, I haven't
done Emacs Lisp in a bit :)

Ted



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

end of thread, other threads:[~2008-03-06 21:50 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-25 16:26 gnus-registry flags API Ted Zlatanov
2007-09-25 19:58 ` Bastien
2007-09-25 23:40 ` Leo
2007-12-19  1:22 ` Ted Zlatanov
2008-01-03 17:10   ` Reiner Steib
2008-01-03 17:55     ` Ted Zlatanov
2008-01-04 17:43       ` Reiner Steib
2008-01-15 21:56         ` Ted Zlatanov
2008-01-16 21:52           ` Ted Zlatanov
2008-02-06 17:17             ` Ted Zlatanov
2008-02-16 20:26               ` Reiner Steib
2008-02-28 15:12                 ` Ted Zlatanov
2008-02-28 20:04                   ` Reiner Steib
2008-02-29 23:19                     ` Ted Zlatanov
2008-03-04 22:43                     ` Ted Zlatanov
2008-03-05 19:00                       ` Ted Zlatanov
2008-03-06 21:50                         ` Ted Zlatanov

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