Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@northernlight.com>
Subject: Re: possible strange idea about hierarchical lists
Date: Wed, 16 Jan 2002 14:33:38 -0500	[thread overview]
Message-ID: <m3hepmt7jh.fsf@onyx.nimbus.northernlight.com> (raw)
In-Reply-To: <m3bsgivl5m.fsf@quimbies.gnus.org> (Lars Magne Ingebrigtsen's message of "Sat, 29 Dec 2001 03:02:13 +0100")

OK, after a lot of trial and error, I need some help with this.  Keep
in mind, this is my first attempt at writing Lisp beyond my .emacs
files.

The following:

(let* ((recipients '(("foo@bar" . "Name <foo@bar>") ("baz@quux" . "None <baz@quux>")))
       (s recipients)
       (gnus-hierarchical-lists '( ("foo@bar" . "baz@quux"))))
  (while gnus-hierarchical-lists
    (let* ((node (pop gnus-hierarchical-lists))
	   (parent (car node))
	   (child (cdr node)))
      (when (and (assoc parent recipients) (assoc child recipients))
	  (delq parent recipients)))))

(to be done after "Remove first duplicates" at line 4502 in
message.el, function message-get-reply-headers)

does not seem to do what I want.  What I want is, if the recipients
list has the parent and the child, to delete the parent from the
recipients (because the child is the more generic of the two).  This
should happen more than once, so now if the child is in the
gnus-hierarchical-lists list as well as a parent, then this new parent
will be removed in favor of ITS child.  I think my logic (go through
the hierarchical list, and delete all ocurrences of the parent if the
parent and the child exist) makes sense, but my Lisp is not expressing
it correctly.

e.g. ("zero" . "integers") ("integers" . "reals") applied to a list
with "zero", "integers", and "reals" in it should produce "reals"
only.  Does that make sense?

Thanks
Ted




  reply	other threads:[~2002-01-16 19:33 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-04 16:59 Ted Zlatanov
2001-12-04 17:31 ` Kai Großjohann
2001-12-04 17:28   ` Ted Zlatanov
2001-12-04 17:44     ` Paul Jarc
2001-12-04 17:38       ` Ted Zlatanov
2001-12-05  8:55         ` Kai Großjohann
2001-12-05 16:52           ` Matt Armstrong
2001-12-07 14:09           ` Ted Zlatanov
2001-12-29  2:02             ` Lars Magne Ingebrigtsen
2002-01-16 19:33               ` Ted Zlatanov [this message]
2002-01-16 20:12                 ` Ted Zlatanov
2002-01-18  9:18                 ` Kai Großjohann
2002-01-31 21:40                 ` Paul Jarc
2002-02-01 22:14                   ` Ted Zlatanov
2002-02-02  3:37                     ` Paul Jarc
2002-02-25 23:04                       ` [patch] hierarchical lists in message.el Ted Zlatanov
2002-02-25 23:04                       ` Ted Zlatanov
2002-02-25 23:22                         ` Paul Jarc
2002-02-25 23:22                         ` Paul Jarc
2002-02-26 11:40                           ` Ted Zlatanov
2002-02-26 11:40                           ` Ted Zlatanov
2002-03-01 21:23                         ` Paul Jarc
2002-03-04 17:34                           ` Ted Zlatanov
2002-03-04 18:11                             ` Paul Jarc
2002-03-04 18:11                             ` Paul Jarc
2002-03-04 17:34                           ` Ted Zlatanov
2002-03-01 21:23                         ` Paul Jarc

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=m3hepmt7jh.fsf@onyx.nimbus.northernlight.com \
    --to=tzz@northernlight.com \
    /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).