From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: Gnus: Thread notes? Date: Tue, 12 Dec 2017 13:26:00 +0100 Message-ID: <87mv2om8tj.fsf@web.de> References: <87o9pc359b.fsf@web.de> <874lr3pz2q.fsf@ericabrahamsen.net> <87o9p6zy4f.fsf@web.de> <878tgavoio.fsf@ericabrahamsen.net> <87fu93ulhz.fsf@web.de> <87o9nq50hi.fsf@ericabrahamsen.net> <877eudsj2x.fsf@web.de> <874lpfjgb2.fsf@ericabrahamsen.net> <87indv6iup.fsf@web.de> <87wp2agxo5.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1513081631 14130 195.159.176.226 (12 Dec 2017 12:27:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 12 Dec 2017 12:27:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Eric Abrahamsen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 12 13:27:03 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eOjeJ-0003CK-6g for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Dec 2017 13:27:03 +0100 Original-Received: from localhost ([::1]:57928 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOjeO-0000Vy-MC for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Dec 2017 07:27:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOjdy-0000VH-L2 for help-gnu-emacs@gnu.org; Tue, 12 Dec 2017 07:26:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eOjdu-0008GZ-JP for help-gnu-emacs@gnu.org; Tue, 12 Dec 2017 07:26:42 -0500 Original-Received: from mout.web.de ([212.227.17.11]:57127) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eOjdu-0008FN-8t for help-gnu-emacs@gnu.org; Tue, 12 Dec 2017 07:26:38 -0500 Original-Received: from drachen.dragon ([92.74.165.17]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LkhBY-1ewhPV1eaq-00aWQa; Tue, 12 Dec 2017 13:26:21 +0100 In-Reply-To: <87wp2agxo5.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Tue, 28 Nov 2017 08:44:58 -0800") X-Provags-ID: V03:K0:SwcFLE0lv6drGYK5KPZ9uWbszU3yvEAMWvmIadeGL9ErssUJYHq fIecqyobuIQSmbh+RDoJPxzL7hvcGSWdcGcIuT97IA5U2bFqhFPCr79ifPtrHXvcCuh1oFU +cGRw8D+40YODvahwGB7jH9i8rzc2dohZrpxCXftAwErC72MWqUgTQQhsYBbrcSYWjsF6nz jKUURpu5rBMPRR/SOzYEA== X-UI-Out-Filterresults: notjunk:1;V01:K0:Va6PZMethIM=:QeVLt1Zxlv0MqNvZiG0P76 g//GCjMilahe0wJ9g664QYPvfAwqtb2EoMPPpDFGNiZzb3/fsvzit9/vH+jiG5bMrtuYsQy21 KVHB7BfTRjZM02wtNbLZHo7s7YTmWy6Qyx+8aZGbTgc4YIufNsGpNtDIj3of5mhRokXCs1BXW eLqR30pbHE/jT+sYnAK/WAB/bTQhV0gk4cTrq5Qsp+oaNU4jbKGhG41XjXJAzeRfMFu8r/Mkw 8mVyYDGzK/YA1cP70CTttqyQ5XtPG8O52l44g++r1Lu319zIeRQPDs9p/vZXR8SVZnxR3KMeY LmvSmdCm+fROCaLM6wfmPqMm0wbaJyPqlkgHXbbzoDBBazJpD0EnjXAh7A0y4ZDDiKYvJc6SS g2zJ+xJk1WhWQPnDe/39k0eUbVbUBqzbEj5ZxmpeYIybK8aOnHJMse97iIMGpB2zxWxf3aCEe PFr2TR9uzxQlaKHGmBzX5odq0WizOm5Y/ne7uDcyg4oEh3SRJa142xEOwUoKmdErNfq3TIDnt 4yx9trswwiLq1jUechx9V70aD4ud6MIXFQUy2y7+QmXUlHf7GseZmOlvuxpi332Q0yMzw7MM6 G1ElPY7sxe+ar9RSoW24gUxmIJl7f3Rc87l5xz77aDSv1k31kqLAYer5w5OE0Z3yCr+fkTLIg gk5vo8hqRo09Xg9m/f9cnOoMhn6PVQl7H606diFLW38/1o8PwId0HZInGLjBLX5PfifQpbG8o asftS5F6VizoZXASB93KZmYgEoiP0urkw6PkoCZHcfNHzPf8F1CZBP+BqnWavTBLbP9ty/ts X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.11 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:115334 Archived-At: 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.