[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gnus: Thread notes?
From: |
Michael Heerdegen |
Subject: |
Re: Gnus: Thread notes? |
Date: |
Tue, 12 Dec 2017 13:26:00 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Hi Eric,
thanks for uploading the new stuff. Haven't yet tried it, but one
comment about this issue:
> > If you would get it all work conveniently without the need of
> > background ticking, it would be better and nicer, yes.
>
> It looks like automatic visibility isn't really feasible, but I've got
> ticking running, and am working on the limit function.
| +;;;###autoload
| +(defun gnorb-gnus-insert-tracked-messages (show-all)
| + "Insert tracked messages into the Summary buffer.
| +Only inserts tracked messages belonging to this group. If
| +SHOW-ALL (interactively, the prefix arg) is non-nil, insert all
| +messages; otherwise only insert messages that are tracked by a
| +heading in a non-DONE state."
| + (interactive "P")
| + (let ((old (sort (mapcar 'car gnus-newsgroup-data) '<))
| + (tracked-messages
| + (registry-search gnus-registry-db
| + :regex `((gnorb-ids ".+"))
| + :member `((group ,gnus-newsgroup-name)))))
| + (unless show-all
| + (setq tracked-messages
| + (cl-remove-if
| + (lambda (msg-id)
| + (let ((id (car-safe (gnus-registry-get-id-key
| + msg-id 'gnorb-ids))))
| + (or (null id)
| + (save-window-excursion
| + (org-id-goto id)
| + (org-entry-is-done-p)))))
| + tracked-messages)))
| + (if tracked-messages
| + (progn
| + (setq tracked-messages
| + (delq nil
| + (mapcar (lambda (id)
| + (cdr (gnus-request-head id
gnus-newsgroup-name)))
| + tracked-messages)))
| + (gnus-summary-insert-articles tracked-messages)
| + (gnus-summary-limit (gnus-sorted-nunion tracked-messages old))
| + (gnus-summary-position-point))
| + (message "No tracked messages in this group"))))
I think you could factor this defun so that it would be possible to set
`gnus-alter-articles-to-read-function' to one factor, then AFAICT,
automatic listing of tracked messages should be possible.
If you care about Gnus, two things that came to my mind when fiddling
with this stuff:
(1) I think `gnus-alter-articles-to-read-function' should better default
to a function (lambda (_group-name article-list) article-list), not to
nil, so that one could use `add-function' on it.
(2) (info "(gnus) Store arbitrary data") is missing a function that can
be used to delete the entry of a key for an ID. One can only associate
a key to nil, but that doesn't remove the association from the database;
it still contains the association key -> nil for ID.
Michael.
- Re: Gnus: Thread notes?,
Michael Heerdegen <=
- Re: Gnus: Thread notes?, Eric Abrahamsen, 2017/12/12
- Re: Gnus: Thread notes?, Michael Heerdegen, 2017/12/13
- Re: Gnus: Thread notes?, Eric Abrahamsen, 2017/12/13
- Re: Gnus: Thread notes?, Michael Heerdegen, 2017/12/14
- Re: Gnus: Thread notes?, Eric Abrahamsen, 2017/12/14
- Re: Gnus: Thread notes?, Michael Heerdegen, 2017/12/15
- Re: Gnus: Thread notes?, Eric Abrahamsen, 2017/12/15
- Re: Gnus: Thread notes?, Michael Heerdegen, 2017/12/15
- Re: Gnus: Thread notes?, Eric Abrahamsen, 2017/12/16
- Re: Gnus: Thread notes?, Eric Abrahamsen, 2017/12/28