Gnus development mailing list
 help / color / mirror / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: ding@gnus.org
Subject: Re: Fixed bug with custom marks in registry
Date: Tue, 06 Nov 2018 01:54:15 +0100	[thread overview]
Message-ID: <87muqn6n60.fsf@web.de> (raw)
In-Reply-To: <87efcw1gsn.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Thu, 11 Oct 2018 11:26:00 -0700")

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Obviously not too many people were using this feature, or else we would
> have heard about it sooner, but there was a bug in the Gnus registry
> where entries with custom marks attached to them could still be pruned
> (deleted), even though they're not supposed to be.
>
> That's fixed now, and the fix will go into Emacs 26.2 and 27, so if
> you'd run into this before and decided not to use custom marks in the
> registry, watch for updates.

I've a question about the setup.  I want Gnus to always auto-show all
registry-marked articles in the summary (maybe we should have an option
for that?).  From the docs I derived that something like this would do:

#+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 (cdr (assoc 'mark v))
                           collect key)))
    (funcall f group-name article-list))))
#+end_src

That works but has the side effect that when I add or remove a registry
mark - e.g. simply M M i or M M I, after that the article line in the
summary is duplicated - one line has the mark, the other doesn't.  Apart
from that, the lines are identical.  When I restart Gnus, I get one
article line again as expected.

Any hints how to do it better? (FWIW, I do not remember that this
happened to me in the past, but I'm not sure)


Thanks,

Michael.



  parent reply	other threads:[~2018-11-06  0:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-11 18:26 Eric Abrahamsen
2018-10-11 18:44 ` Emanuel Berg
2018-10-11 21:00 ` Ted Zlatanov
2018-11-06  0:54 ` Michael Heerdegen [this message]
2018-11-06  4:56   ` Michael Heerdegen
2018-11-06  6:01   ` Eric Abrahamsen
2018-11-06 23:33     ` Michael Heerdegen
2018-11-07  5:00       ` Eric Abrahamsen
2018-11-17  0:32         ` Eric Abrahamsen
2018-11-17 15:01           ` Michael Heerdegen
2018-11-19 23:51             ` Eric Abrahamsen

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=87muqn6n60.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=ding@gnus.org \
    --cc=eric@ericabrahamsen.net \
    /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).