Discussion:
Typo in doc string of `gnus-dependencies-add-header'?
N. Jackson
2018-07-22 13:37:36 UTC
Permalink
In Gnus v5.13 in GNU Emacs 27.0.50
Repository revision: f3f67cf0b9a6388d423e048a7aafad2eb531b5a5


While poking around [1] in the code, I stumbled across something in
`gnus-dependencies-add-header' that confused me. If I understand
correctly, there is typo in the doc string.

The paragraph in question says:

If `gnus-summary-ignore-duplicates' is nil then duplicate
^^^^^^
Message-IDs will not be entered in the DEPENDENCIES table.
Otherwise duplicate Message-IDs will be renamed to a unique
Message-ID before being entered.

but it seems to me that this should begin:

If `gnus-summary-ignore-duplicates' is not nil ...

.

The relevant code seems to be in the `cond' in
`gnus-dependencies-add-header' at Line 4323 of gnus-sum.el:

(cond
...
;; Renames the existing `header' to a unique Message-ID.
((not gnus-summary-ignore-duplicates)
;; An article with this Message-ID has already been seen.
;; We rename the Message-ID.
(set (setq id-dep (intern (setq id (nnmail-message-id)) dependencies))
(list header))
(mail-header-set-id header id))
...
)

Am I right that the doc string is wrong, or am I missing something?

(I could easily be missing something: trying to read Lisp makes my
head hurt! (The world would be so much kinder on my noggin if
everything were written in C.))

Thanks.

N.


[1] I'm trying to get a better understanding of Bug#28477
(https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28477) where Gnus
occasionally gets the order wrong when displaying threads (and
will show message A as reply to message B when in fact message B
was the later message and responds to message A).
Eric Abrahamsen
2018-07-22 17:00:16 UTC
Permalink
Post by N. Jackson
In Gnus v5.13 in GNU Emacs 27.0.50
Repository revision: f3f67cf0b9a6388d423e048a7aafad2eb531b5a5
If you're using Emacs 27, you shouldn't be loading Gnus externally! Gnus
has been developed as a part of Emacs for a while now (a couple of
years?) and the external codebase is no longer updated. FWIW, the
docstring of `gnus-summary-ignore-duplicates' now reads:

"If non-nil, ignore articles with identical Message-ID headers."

Your bug may still be there, but it will be much more productive to
investigate the Gnus code in Emacs' master branch.

Eric
N. Jackson
2018-07-22 19:24:13 UTC
Permalink
Hi Eric,

Thank you for the response.
Post by Eric Abrahamsen
Post by N. Jackson
In Gnus v5.13 in GNU Emacs 27.0.50
Repository revision: f3f67cf0b9a6388d423e048a7aafad2eb531b5a5
If you're using Emacs 27, you shouldn't be loading Gnus
externally!
Hmm... what makes you think that I am?

As far as I am aware, I am not running an external Gnus. I can't
see anything in my configuration that would load an external Gnus,
I don't have any Gnus-related load path shadows, and in Package
Manager it says I have the "built-in" Gnus.

So I think (probably) that I am okay here.
Post by Eric Abrahamsen
FWIW, the docstring of `gnus-summary-ignore-duplicates' now
"If non-nil, ignore articles with identical Message-ID headers."
Yes, I see that here too. To be clear, this is about the doc
string of the function `gnus-dependencies-add-header', not the doc
string of the variable `gnus-summary-ignore-duplicates'.
Post by Eric Abrahamsen
Your bug may still be there, but it will be much more productive to
investigate the Gnus code in Emacs' master branch.
I just went and double checked that. (You had me worried for a
moment!) But I am looking at the sources checked out from Emacs
master, so no worries there.

Thanks,
N.
Eric Abrahamsen
2018-07-22 20:17:03 UTC
Permalink
Post by N. Jackson
Hi Eric,
Thank you for the response.
Post by Eric Abrahamsen
Post by N. Jackson
In Gnus v5.13 in GNU Emacs 27.0.50
Repository revision: f3f67cf0b9a6388d423e048a7aafad2eb531b5a5
If you're using Emacs 27, you shouldn't be loading Gnus
externally!
Hmm... what makes you think that I am?
As far as I am aware, I am not running an external Gnus. I can't
see anything in my configuration that would load an external Gnus,
I don't have any Gnus-related load path shadows, and in Package
Manager it says I have the "built-in" Gnus.
So I think (probably) that I am okay here.
Post by Eric Abrahamsen
FWIW, the docstring of `gnus-summary-ignore-duplicates' now
"If non-nil, ignore articles with identical Message-ID headers."
Yes, I see that here too. To be clear, this is about the doc
string of the function `gnus-dependencies-add-header', not the doc
string of the variable `gnus-summary-ignore-duplicates'.
Bah, sorry, I guess I forgot that Gnus still has its own version number;
that plus the docstring confusion made me think you were running an old
version of the code.
Post by N. Jackson
Post by Eric Abrahamsen
Your bug may still be there, but it will be much more productive to
investigate the Gnus code in Emacs' master branch.
I just went and double checked that. (You had me worried for a
moment!) But I am looking at the sources checked out from Emacs
master, so no worries there.
Okay, good. And I think you're right that the docstring is backwards.
I'd be happy to change that -- it's a small change, is there anything
else that needs fixing in the meantime? Are you finding any actual bugs?

Eric
N. Jackson
2018-07-24 17:56:45 UTC
Permalink
And I think you're right that the docstring is backwards. I'd be
happy to change that -- it's a small change,
Thanks. Yes, it should be fixed if we are sure it is wrong.
is there anything else that needs fixing in the meantime? Are
you finding any actual bugs?
Ah, no. Not yet. It's a slow process for me. I still have a long
list of things I'm tying to figure out. Such as:

- what the difference is between the two Elisp debuggers
- how to set breakpoints and watchpoints in Elisp code
- what data structures Gnus keeps messages and threads in
- where and how Gnus decides that one message is a reply to another

So I think it'll be a while before I make much progress. But I
will report back when I do.

N.
Eric Abrahamsen
2018-07-24 20:14:14 UTC
Permalink
Post by N. Jackson
And I think you're right that the docstring is backwards. I'd be
happy to change that -- it's a small change,
Thanks. Yes, it should be fixed if we are sure it is wrong.
Okay, I'll do that in a bit.
Post by N. Jackson
is there anything else that needs fixing in the meantime? Are
you finding any actual bugs?
Ah, no. Not yet. It's a slow process for me. I still have a long
- what the difference is between the two Elisp debuggers
- how to set breakpoints and watchpoints in Elisp code
- what data structures Gnus keeps messages and threads in
- where and how Gnus decides that one message is a reply to another
So I think it'll be a while before I make much progress. But I
will report back when I do.
Sounds good, let us know.

Eric
Eric Abrahamsen
2018-07-26 00:37:58 UTC
Permalink
Post by Eric Abrahamsen
Post by N. Jackson
And I think you're right that the docstring is backwards. I'd be
happy to change that -- it's a small change,
Thanks. Yes, it should be fixed if we are sure it is wrong.
Okay, I'll do that in a bit.
Done.

Loading...