Gnus development mailing list
 help / color / mirror / Atom feed
From: Kai.Grossjohann@CS.Uni-Dortmund.DE
Subject: Storing the group a message has been written to
Date: 11 Nov 1998 14:02:22 +0100	[thread overview]
Message-ID: <vafpvauv0v5.fsf@ramses.cs.uni-dortmund.de> (raw)

Lars told me that I could add stuff to nnmail-cache-insert to store
the group a message has been written to in ~/.nnmail-cache.  I expect
to be able to do useful stuff with it.

I have now produced the following horrible abomination:

,-----
| (defun nnmail-cache-insert (id)
|   (when nnmail-treat-duplicates
|     ;; Store some information about the group this message is written
|     ;; to.  This function might have been called from various places.
|     ;; Sometimes, a function up in the calling sequence has an
|     ;; argument GROUP which is bound to a string, the group name.  At
|     ;; other times, there is a function up in the calling sequence
|     ;; which has an argument GROUP-ART which is a list of pairs, and
|     ;; the car of a pair is a group name.  Should we check that the
|     ;; length of the list is equal to 1? -- kai
|     (let ((g nil))
|       (cond ((and (boundp 'group) group)
|              (setq g group))
|             ((and (boundp 'group-art) group-art (listp group-art))
|              (setq g (caar group-art)))
|             (t (setq g "")))
|       (unless (gnus-buffer-live-p nnmail-cache-buffer)
|         (nnmail-cache-open))
|       (save-excursion
|         (set-buffer nnmail-cache-buffer)
|         (goto-char (point-max))
|         (insert id "\t" g "\n")))))
`-----

This depends on the fact that nnmail-cache-insert is called
(indirectly) from nnchoke-request-accept-article which sets GROUP-ART
or from nnmail-split-incoming which sets GROUP.

Two questions:

(1) This is truly horrible, one should not depend on such an
    obfuscated fact.  Any suggestions for improving this?

(2) The group name is not unique.  Sometimes the group name is
    `drafts' which comes from the nndraft server, sometimes the group
    name comes from the normal nnml server.  I want to use this for
    mail splitting.  Mail splitting deals with one backend only.
    Thus, I would need to find out whether the group concerned is from
    that backend and to ignore it if it doesn't come from the backend
    where mail splitting is done.

kai
-- 
Life is hard and then you die.


             reply	other threads:[~1998-11-11 13:02 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-11 13:02 Kai.Grossjohann [this message]
1998-11-13 18:47 ` MIME composition (was: Storing the group a message has been written to) Lars Magne Ingebrigtsen
1998-11-13 21:28   ` Wes Hardaker
1998-11-13 22:18     ` Lars Magne Ingebrigtsen
1998-11-13 22:45       ` Kai.Grossjohann
1998-11-13 23:02         ` Lars Magne Ingebrigtsen
1998-11-13 23:27           ` Kai.Grossjohann
1998-11-13 23:49             ` Lars Magne Ingebrigtsen
1998-11-14  9:13               ` Kai.Grossjohann
1998-11-14 17:35                 ` Lars Magne Ingebrigtsen
1998-11-14  9:14               ` Kai.Grossjohann
1998-11-14  1:00       ` Wes Hardaker
1998-11-14  1:14         ` Hrvoje Niksic
1998-11-14  2:07         ` Lars Magne Ingebrigtsen
1998-11-14  2:19           ` Hrvoje Niksic
1998-11-14  3:01             ` Lars Magne Ingebrigtsen
1998-11-14 15:34               ` Simon Josefsson
1998-11-14 17:26                 ` Lars Magne Ingebrigtsen
1998-11-14 15:50               ` Hrvoje Niksic
1998-11-14 17:24                 ` Lars Magne Ingebrigtsen
1998-11-16  8:31                   ` Steinar Bang
1998-11-16  8:30               ` Steinar Bang
1998-11-16 14:53                 ` Lars Magne Ingebrigtsen
1998-11-15 17:01           ` Wes Hardaker
1998-11-15 19:29             ` Lars Magne Ingebrigtsen
1998-11-16  8:24     ` Steinar Bang
1998-11-16 15:23       ` Wes Hardaker
1998-11-13 22:08   ` Kai.Grossjohann
1998-11-13 22:50     ` Lars Magne Ingebrigtsen
1998-11-13 22:12   ` Kai.Grossjohann
1998-11-13 22:47   ` Kai.Grossjohann
1998-11-13 22:56     ` Lars Magne Ingebrigtsen
1998-11-13 23:37       ` Kai.Grossjohann
1998-11-13 23:52         ` Lars Magne Ingebrigtsen
1998-11-13 23:36   ` Kai.Grossjohann
1998-11-13 23:51     ` Lars Magne Ingebrigtsen
1998-11-14  1:09       ` Hrvoje Niksic
1998-11-14  2:18         ` Lars Magne Ingebrigtsen
1998-11-14 15:34           ` Simon Josefsson
1998-11-14 17:36             ` Lars Magne Ingebrigtsen
1998-11-15 13:42               ` Kai.Grossjohann
1998-11-15 19:27                 ` Lars Magne Ingebrigtsen
1998-11-15 21:25                   ` Hrvoje Niksic
1998-11-15 22:20                     ` Lars Magne Ingebrigtsen
1998-11-16  8:08                       ` Hrvoje Niksic
1998-11-16 14:52                         ` Lars Magne Ingebrigtsen
1998-11-15 22:12                   ` Simon Josefsson
1998-11-16  5:46                     ` Lars Magne Ingebrigtsen
1998-11-15  1:39             ` Kai.Grossjohann
1998-11-14  1:05   ` Hrvoje Niksic
1998-11-14  2:10     ` Lars Magne Ingebrigtsen
1998-11-16 15:11   ` Per Abrahamsen
1998-11-16 19:45     ` Edward J. Sabol
1998-11-17  2:08       ` Matt Armstrong
1998-11-17  3:08         ` Wes Hardaker
1998-11-17  5:38           ` Matt Armstrong
1998-11-17  7:45             ` Yair Friedman
1998-11-17  8:33               ` Steinar Bang
1998-11-17 12:37               ` Per Abrahamsen
1998-11-17 19:01                 ` Matt Armstrong
1998-11-18  0:28                   ` Lars Magne Ingebrigtsen
1998-11-18  8:16                     ` Kai.Grossjohann
1998-11-18  8:36                       ` Lars Magne Ingebrigtsen
1998-11-18  8:55                         ` Kai.Grossjohann
1998-11-18 13:11                           ` Lars Magne Ingebrigtsen
1998-11-18 13:50                             ` Jan Vroonhof
1998-11-18 14:02                               ` Lars Magne Ingebrigtsen
1998-11-18 18:50                             ` Per Abrahamsen
1998-11-19  3:05                               ` Lars Magne Ingebrigtsen
1998-11-17 12:37             ` Per Abrahamsen
1998-11-17 14:52               ` Steinar Bang
1998-11-17 17:45                 ` Per Abrahamsen
1998-11-18  9:55                   ` Steinar Bang
1998-11-18 18:50                     ` Per Abrahamsen
1998-11-17  8:39       ` Kai.Grossjohann
1998-11-17  9:59         ` Vladimir Volovich
1998-11-17 12:18           ` Steinar Bang
1998-11-17 13:44             ` Vladimir Volovich
1998-11-17 14:50               ` Steinar Bang

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=vafpvauv0v5.fsf@ramses.cs.uni-dortmund.de \
    --to=kai.grossjohann@cs.uni-dortmund.de \
    /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).