Gnus development mailing list
 help / color / mirror / Atom feed
From: Raja R Harinath <harinath@cs.umn.edu>
Subject: Should Message-Ids become first-class Gnus objects?
Date: 26 Sep 1996 18:51:15 -0500	[thread overview]
Message-ID: <d9enjo7s3w.fsf@femto.cs.umn.edu> (raw)

Hi,

I had a few thoughts about the role of message-ids inside Gnus.

There are many lists of Message-Ids that duplicate information.  For
eg., `gnus-dup' maintains a list and an obarray of message-ids already
seen.  `gnus-gl' maintains a list of message-ids rated.  All these are
separate obarrays, and duplicate the message-id string.

I wonder if using a single message-id hashtb with the other facilities
being implemented as property get/sets will be a better alternative.
This would require a major rearchitecting of Gnus.

Things like the following could be done:

Property	    Value		Meaning/Use
--------	    -----		-----------
:seen		(next . prev)	The message has been seen.  The next
				 and prev form a doubly-linked list of
				 symbols in the order seen.  This can be
				 used by `gnus-dup'.  No need to store
				 `gnus-dup-list' and `gnus-dup-hashtb'.

:refs-to	(r1 r2 ...)	The References: header

:has-refs-from	(c1 c2 ...)	Inverse of the References: header.
				 To store list of articles that refer to
				 this message-id.  Can be used to find
				 list of replies to an article, for one.
				 (this is on the Gnus todo list)

:where		((ng1 . art1)	This can be used to list what groups
		 (ng2 . art2)    this message occurs in.  The Xref:
		 ...)            header + local copies.  Used with the 
				 prev two properties, can be used to
				 follow threads across newsgroups.

:gl-prediction	(score l . h)	This can be used to store predictions	
				 obtained from the GroupLens BBB

:gl-rating	(score . time)	This can be used for storing user
				 GroupLens ratings

Using the dup-list maintenance as an example:

gnus-dup-enter-articles would do in a loop

  (put (setq cur (intern "msg-id" gnus-msg-id-hashtb)) :seen (prev . nil))
  (setcdr (get prev :seen) cur)		; ?? is a put reqd or is this ok
  (setq prev cur)

gnus-dup-drop would do

  (setq links (get cur :seen))
  (setq prev (car links)
        next (cdr links))
  (setcdr (get prev :seen) next)
  (setcar (get next :seen) prev)
  (put cur :seen nil)

and gnus-dup-save would do

  ... skip (total-seen - gnus-dup-list-lgth) messages ...
  (while (setq cur (cdr (get cur :seen))) 
      (insert (symbol-name cur)))

Your comments ...

- Hari

-- 
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash


             reply	other threads:[~1996-09-26 23:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-26 23:51 Raja R Harinath [this message]
1996-09-27 17:15 ` Lars Magne Ingebrigtsen

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=d9enjo7s3w.fsf@femto.cs.umn.edu \
    --to=harinath@cs.umn.edu \
    /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).