From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: Canonical list of marks with and without gnus-agent
Date: Wed, 14 May 2003 17:01:17 -0400 [thread overview]
Message-ID: <u1bxw8de.fsf@asfast.com> (raw)
In-Reply-To: <usmrhxwwm.fsf@xpediantsolutions.com> (Kevin Greiner's message of "Wed, 14 May 2003 12:26:01 -0500")
Kevin Greiner <kgreiner@xpediantsolutions.com> writes:
> Lloyd Zusman <ljz@asfast.com> writes:
>
>> [ ... ]
>>
>> Well, it's actually a group of functions, and it's easier if I just
>> explain verbally.
>
> No. It's easier to zip them up and either post or email them. I can't
> help at all with just a verbal description. To put it simply, the
> agent isn't supposed to introduce the effect that you are describing.
> That means that either a) there is an obscure bug in the agent or b)
> there is a bug in your functions. In either case, a verbal
> description will not let me reproduce the error here.
OK. Here's the function that marks the article:
(defun my-gnus-summary-mark-as-killed-forward ()
(interactive)
(save-excursion
(gnus-summary-mark-article-as-read gnus-killed-mark))
;; I forget why I had to do this, but when I wrote this
;; deletion system, it didn't work unless I made the
;; article processable. But that was eons ago ...
(gnus-summary-mark-as-processable 1))
... and here's the function that deletes all the marked articles:
(defun ljz-expunge-all-killed (&optional quiet)
(interactive)
(let ((headers gnus-newsgroup-headers)
(gnus-summary-expunge-below 1)
(group gnus-newsgroup-name)
(count 0)
count-string plural article header data mark temp-processable)
(while headers
(setq header (car headers))
(setq headers (cdr headers))
(setq article (mail-header-number header))
(setq data (gnus-data-find article))
(setq mark (gnus-data-mark data))
(when (eq mark gnus-killed-mark)
(setq count (1+ count))
(setq temp-processable (append temp-processable (list article)))))
(if temp-processable
(let ((gnus-newsgroup-processable temp-processable))
;; Do a total and unequivocal delete
(my-gnus-summary-delete-article))
(unless quiet
(message "No articles have been marked as killed")))))
... and this is the function that does the "total and unequivocal
delete":
(defun my-gnus-summary-delete-article (&optional N)
(interactive "P")
(let ((nnimap-expiry-target 'delete)
;; force a prompt
(gnus-novice-user t))
(gnus-summary-delete-article N)))
When I'm not running under gnus-agent, I can mark the articles with the
first function and delete the ones that are marked with the second
function. But when gnus-agent is set to t, the marking doesn't occur
when I run the first function, and the second function therefore doesn't
see anything to delete.
--
Lloyd Zusman
ljz@asfast.com
next prev parent reply other threads:[~2003-05-14 21:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-12 11:09 Lloyd Zusman
2003-05-12 14:42 ` Kevin Greiner
2003-05-12 15:25 ` Lloyd Zusman
2003-05-12 19:18 ` Kevin Greiner
2003-05-14 14:00 ` Lloyd Zusman
2003-05-14 17:26 ` Kevin Greiner
2003-05-14 21:01 ` Lloyd Zusman [this message]
2003-05-15 5:29 ` Kevin Greiner
2003-05-15 13:23 ` Lloyd Zusman
2003-05-15 14:29 ` Lloyd Zusman
2003-05-15 15:18 ` Kevin Greiner
2003-05-14 5:01 ` Michael R. Wolf
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=u1bxw8de.fsf@asfast.com \
--to=ljz@asfast.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).