GNU bug report logs - #31057
27.0.50; Gnus: Make configurable what to show when selecting a group

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Wed, 4 Apr 2018 10:56:02 UTC

Severity: wishlist

Found in version 27.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 31057 <at> debbugs.gnu.org
Subject: bug#31057: 27.0.50; Gnus: Make configurable what to show when selecting a group
Date: Thu, 12 Apr 2018 14:26:12 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Well, you're not supposed to advice
> `gnus-alter-articles-to-read-function', but instead set it to a
> function that returns a new list of articles (based on the list that's
> passed in).

No, the doc clearly says

| [...] Use `add-function' to set one or more custom filter functions.

That's what I did:

#+begin_src emacs-lisp
(add-function :around gnus-alter-articles-to-read-function
              (defun my-gnus-auto-show-registry-marked (f group-name article-list)
                (cl-union
                 (delq nil
                       (mapcar (lambda (id) (cdr (gnus-request-head id group-name)))
                               (cl-loop for key being the hash-keys of (oref gnus-registry-db data)
                                        using (hash-values v)
                                        when (assoc 'mark v)
                                        collect key)))
                 (funcall f group-name article-list))))
#+end_src

AFAIR Eric Abrahamsen and I decided that we want the thing to be
customizable like that, because it's then possible that different modes
can `add-function' stuff onto the variable to control things in
different ways.

> And as far as I can tell from reading the code, the list returned is
> the list of articles Gnus will fetch from the server

Yes.

> (And then display, depending on whether you have other filters in
> place).

Hmm, the additional articles (articles with attached custom marks in my
case) are not displayed for me.  AFAICT I have no filters enabled at
all.  When the registry marked articles are "old" they are just not
shown AFAICT.


Michael.




This bug report was last modified 7 years and 40 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.