From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: message registry for Gnus
Date: Sat, 01 Feb 2003 15:20:25 -0500 [thread overview]
Message-ID: <m3el6reos6.fsf@heechee.beld.net> (raw)
In-Reply-To: <m3isw4arb2.fsf@quimbies.gnus.org>
[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]
On Sat, 01 Feb 2003, larsi@gnus.org wrote:
>> In Gnus terms, what are the basic message transfer functions?
>>
>> - message copy
>>
>> - message move
>>
>> - new message spooling
>>
>> - old message respooling
>
> And expiry with expiry-target.
>
> Copy, move and respooling are all done in
> `gnus-summary-move-article'.
OK, I added the hooks for copy/move/respool/delete/expire. Attached
is a patch and an empty gnus-registry.el with an example of how things
are called. I haven't committed anything to CVS.
The message deletion hook (gnus-summary-article-delete-hook)
invocation in gnus-summary-move-article doesn't seem to do anything,
when is that 'junk condition in gnus-sum.el used?
I think I got expiry and deletion right otherwise, can you check?
Especially expiry is tricky, I'm not sure I understand the whole
function.
Incoming messages seem to be spooled in several places, so I'm not
sure how to deal with that. I only want to intercept nnmail and
nnimap for now, should I just prepend the hook call to their
respective split-methods?
Thanks
Ted
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: registry.patch --]
[-- Type: text/x-patch, Size: 3554 bytes --]
Index: gnus.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus.el,v
retrieving revision 6.153
diff -r6.153 gnus.el
61a62,65
> (defgroup gnus-registry nil
> "Article Registry."
> :group 'gnus)
>
3114,3115c3118,3120
< (defun gnus-group-prefixed-name (group method)
< "Return the whole name from GROUP and METHOD."
---
> (defun gnus-group-prefixed-name (group method &optional full)
> "Return the whole name from GROUP and METHOD. Call with full set to
> get the fully qualified group name (even if the server is native)."
3118c3123
< (gnus-server-equal method "native")
---
> (and (not full) (gnus-server-equal method "native"))
3121a3127,3140
>
> (defun gnus-group-guess-prefixed-name (group)
> "Guess the whole name from GROUP and METHOD."
> (gnus-group-prefixed-name group (gnus-find-method-for-group
> group)))
>
> (defun gnus-group-full-name (group method)
> "Return the full name from GROUP and METHOD, even if the method is
> native."
> (gnus-group-prefixed-name group method t))
>
> (defun gnus-group-guess-full-name (group)
> "Guess the full name from GROUP, even if the method is native."
> (gnus-group-full-name group (gnus-find-method-for-group group)))
Index: gnus-sum.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v
retrieving revision 6.300
diff -r6.300 gnus-sum.el
849a850,864
> (defcustom gnus-summary-article-move-hook nil
> "*A hook called after an article is moved, copied, respooled, or crossposted."
> :group 'gnus-summary
> :type 'hook)
>
> (defcustom gnus-summary-article-delete-hook nil
> "*A hook called after an article is deleted."
> :group 'gnus-summary
> :type 'hook)
>
> (defcustom gnus-summary-article-expire-hook nil
> "*A hook called after an article is expired."
> :group 'gnus-summary
> :type 'hook)
>
8759,8760c8774,8781
< (gnus-summary-mark-article article gnus-canceled-mark)
< (gnus-message 4 "Deleted article %s" article)))
---
> (let ((id (mail-header-id (gnus-data-header
> (assoc article (gnus-data-list nil))))))
> (gnus-summary-mark-article article gnus-canceled-mark)
> (gnus-message 4 "Deleted article %s" article)
> ;; run the move/copy/crosspost/respool hook
> (run-hook-with-args 'gnus-summary-article-delete-hook
> action id gnus-newsgroup-name nil
> select-method))))
8838c8859,8866
< article gnus-newsgroup-name (current-buffer)))))
---
> article gnus-newsgroup-name (current-buffer))))
>
> ;; run the move/copy/crosspost/respool hook
> (let ((id (mail-header-id (gnus-data-header
> (assoc article (gnus-data-list nil))))))
> (run-hook-with-args 'gnus-summary-article-move-hook
> action id gnus-newsgroup-name to-newsgroup
> select-method)))
9059c9087,9093
< (gnus-summary-mark-article article gnus-canceled-mark))))))
---
> (gnus-summary-mark-article article gnus-canceled-mark)
> (let ((id (mail-header-id (gnus-data-header
> (assoc article
> (gnus-data-list nil))))))
> (run-hook-with-args 'gnus-summary-article-expire-hook
> 'delete id gnus-newsgroup-name nil
> nil)))))))
9107a9142,9147
> (let* ((article (car articles))
> (id (mail-header-id (gnus-data-header
> (assoc article (gnus-data-list nil))))))
> (run-hook-with-args 'gnus-summary-article-delete-hook
> 'delete id gnus-newsgroup-name nil
> nil))
[-- Attachment #3: gnus-registry.el --]
[-- Type: application/emacs-lisp, Size: 1818 bytes --]
next prev parent reply other threads:[~2003-02-01 20:20 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-31 17:15 Ted Zlatanov
2003-02-01 10:28 ` Kai Großjohann
2003-02-01 16:39 ` Lars Magne Ingebrigtsen
2003-02-01 20:20 ` Ted Zlatanov [this message]
2003-02-02 12:10 ` Lars Magne Ingebrigtsen
2003-02-02 15:14 ` Ted Zlatanov
2003-02-07 12:20 ` Lars Magne Ingebrigtsen
2003-02-02 16:54 ` Kai Großjohann
2003-02-03 20:47 ` Ted Zlatanov
2003-02-04 15:25 ` Simon Josefsson
2003-02-04 19:57 ` Ted Zlatanov
2003-02-05 5:56 ` Simon Josefsson
2003-02-07 20:43 ` Ted Zlatanov
2003-02-02 0:35 ` Raja R Harinath
2003-02-02 1:30 ` Ted Zlatanov
2003-02-02 17:15 ` Raja R Harinath
2003-02-07 20:48 ` Ted Zlatanov
2003-02-07 21:10 ` Lars Magne Ingebrigtsen
2003-02-07 22:45 ` Ted Zlatanov
2003-02-08 20:39 ` Lars Magne Ingebrigtsen
2003-02-21 19:05 ` Ted Zlatanov
2003-02-22 22:20 ` Lars Magne Ingebrigtsen
2003-02-24 15:36 ` Ted Zlatanov
2003-02-24 16:58 ` Andreas Fuchs
2006-09-28 13:20 ` gnus-registry: alist-to-hashtable, hashtable-to-alist (was: message registry for Gnus) Reiner Steib
2006-09-28 14:21 ` gnus-registry: alist-to-hashtable, hashtable-to-alist Ted Zlatanov
2006-09-28 16:03 ` CHENG Gao
2006-09-28 16:58 ` Reiner Steib
2003-02-24 21:57 ` message registry for Gnus Lars Magne Ingebrigtsen
2003-02-24 22:14 ` Ted Zlatanov
2003-02-25 7:19 ` Kai Großjohann
2003-02-25 17:57 ` Ted Zlatanov
2003-03-28 9:20 ` Ted Zlatanov
2003-04-16 20:35 ` Ted Zlatanov
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=m3el6reos6.fsf@heechee.beld.net \
--to=tzz@lifelogs.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).