Gnus development mailing list
 help / color / mirror / Atom feed
* Storing the group a message has been written to
@ 1998-11-11 13:02 Kai.Grossjohann
  1998-11-13 18:47 ` MIME composition (was: Storing the group a message has been written to) Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 79+ messages in thread
From: Kai.Grossjohann @ 1998-11-11 13:02 UTC (permalink / 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.


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

end of thread, other threads:[~1998-11-19  3:05 UTC | newest]

Thread overview: 79+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-11 13:02 Storing the group a message has been written to Kai.Grossjohann
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

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