unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Gnus: (documentation) bug? gnus-extra-headers
@ 2021-05-14 22:56 D
  2021-05-16 14:12 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: D @ 2021-05-14 22:56 UTC (permalink / raw)
  To: emacs-devel

Hello all,

I'm a bit lost trying to comprehend the functionality gnus-extra-headers
supposedly provides.  No matter what I do, I cannot seem to get score
files to accept extra headers at all.  What's worse, gnus very clearly
does not seem to parse them at all.  Is there some configuration
missing?  To give a small working example, from emacs -Q:

the gnus init file simply reads

(setq gnus-startup-file (locate-user-emacs-file "gnus/newsrc")
      nntp-authinfo-file (locate-user-emacs-file "gnus/.authinfo")
      gnus-dribble-directory "~/.cache/emacs/gnus/"
      gnus-kill-files-directory "~/News/kill/"
      gnus-select-method '(nntp "news.eternal-september.org"
                                (nntp-open-connection-function
                                 nntp-open-tls-stream)
                                (nntp-port-number 563)
                                (nntp-address
"news.eternal-september.org")))

(setq gnus-extra-headers '(To Cc Keywords Newsgroups Organization))

Trying to use a line involving any one of these extra headers for, say,
Organization, does not work.  That is, a score file like
(("extra"
  ("." -5 nil r "Organization")))

won't score any article at all, independent of what I enter.  However,
the header is very clearly there in various posts (as can be checked by
the header itself).  What's worse, adding the format specifier "%~(form
(gnus-extra-header 'Organization))@" (as mentioned in the manual) to
gnus-group-summary-line-format reveals that the extra header is never
recognized at all, always returning the empty string.  Yet, variables
like gnus-visible-headers (which take strings instead of symbols,
granted) accept Organization no problem, and display the correct value
in the articles that have the header.  Is there some missing flag that
I'm missing?  I very much doubt it's a bug...

Cheers,
D.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Gnus: (documentation) bug? gnus-extra-headers
  2021-05-14 22:56 Gnus: (documentation) bug? gnus-extra-headers D
@ 2021-05-16 14:12 ` Lars Ingebrigtsen
  2021-05-16 14:43   ` D
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-16 14:12 UTC (permalink / raw)
  To: D; +Cc: emacs-devel

D <d.williams@posteo.net> writes:

> I'm a bit lost trying to comprehend the functionality gnus-extra-headers
> supposedly provides.  No matter what I do, I cannot seem to get score
> files to accept extra headers at all.  What's worse, gnus very clearly
> does not seem to parse them at all.  Is there some configuration
> missing? 

You probably also have to set `nnmail-extra-headers'.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Gnus: (documentation) bug? gnus-extra-headers
  2021-05-16 14:12 ` Lars Ingebrigtsen
@ 2021-05-16 14:43   ` D
  2021-05-17 13:51     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: D @ 2021-05-16 14:43 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

I tried the following:

(setq gnus-extra-headers '(To Cc Keywords Newsgroups Organization)
      nnmail-extra-headers gnus-extra-headers)

But it didn't seem to change the outcome.  I also made sure that I'm
running a decently current version (Gnus v5.13, Emacs 27.2).  I'm still
not sure if I'm just overlooking something very obvious or should file a
bug report as described in the info node (gnus) Troubleshooting.  If I'm
not making some common error (I couldn't find the problem discussed
elsewhere), I guess sending a proper bug report would be more helpful,
right?  Either way, thank you for your time.

On 16/05/2021 16:12, Lars Ingebrigtsen wrote:
> D <d.williams@posteo.net> writes:
> 
>> I'm a bit lost trying to comprehend the functionality gnus-extra-headers
>> supposedly provides.  No matter what I do, I cannot seem to get score
>> files to accept extra headers at all.  What's worse, gnus very clearly
>> does not seem to parse them at all.  Is there some configuration
>> missing? 
> 
> You probably also have to set `nnmail-extra-headers'.
> 



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Gnus: (documentation) bug? gnus-extra-headers
  2021-05-16 14:43   ` D
@ 2021-05-17 13:51     ` Lars Ingebrigtsen
  2021-05-17 13:56       ` Andreas Schwab
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-17 13:51 UTC (permalink / raw)
  To: D; +Cc: emacs-devel

D <d.williams@posteo.net> writes:

> I tried the following:
>
> (setq gnus-extra-headers '(To Cc Keywords Newsgroups Organization)
>       nnmail-extra-headers gnus-extra-headers)
>
> But it didn't seem to change the outcome.  I also made sure that I'm
> running a decently current version (Gnus v5.13, Emacs 27.2).

I just tried this myself, and scoring on "extra" headers does indeed not
work any more, so it seems like this has regressed recently(ish).

Can you file a bug report for this?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Gnus: (documentation) bug? gnus-extra-headers
  2021-05-17 13:51     ` Lars Ingebrigtsen
@ 2021-05-17 13:56       ` Andreas Schwab
  2021-05-17 14:27         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Schwab @ 2021-05-17 13:56 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

On Mai 17 2021, Lars Ingebrigtsen wrote:

> I just tried this myself, and scoring on "extra" headers does indeed not
> work any more, so it seems like this has regressed recently(ish).

Don't you need to regenerate the NOV files?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Gnus: (documentation) bug? gnus-extra-headers
  2021-05-17 13:56       ` Andreas Schwab
@ 2021-05-17 14:27         ` Lars Ingebrigtsen
  2021-05-17 17:43           ` D
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-17 14:27 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: emacs-devel

Andreas Schwab <schwab@linux-m68k.org> writes:

>> I just tried this myself, and scoring on "extra" headers does indeed not
>> work any more, so it seems like this has regressed recently(ish).
>
> Don't you need to regenerate the NOV files?

Ah, yes!  Thanks.

Or in the case of nntp, say

(setq nntp-nov-is-evil t gnus-nov-is-evil t)

because the "extra" headers aren't included in the NOV headers from the
NNTP server.  With those two set, scoring on the "extra" header works
for me.

Perhaps the manual should mention those in that section -- it does
mention the issue, but not how to work around it.  I'll make that change
now...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Gnus: (documentation) bug? gnus-extra-headers
  2021-05-17 14:27         ` Lars Ingebrigtsen
@ 2021-05-17 17:43           ` D
  0 siblings, 0 replies; 7+ messages in thread
From: D @ 2021-05-17 17:43 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Andreas Schwab; +Cc: emacs-devel

On 17/05/2021 16:27, Lars Ingebrigtsen wrote:
> Andreas Schwab <schwab@linux-m68k.org> writes:
> 
>>> I just tried this myself, and scoring on "extra" headers does indeed not
>>> work any more, so it seems like this has regressed recently(ish).
>>
>> Don't you need to regenerate the NOV files?
> 
> Ah, yes!  Thanks.
> 
> Or in the case of nntp, say
> 
> (setq nntp-nov-is-evil t gnus-nov-is-evil t)
> 
> because the "extra" headers aren't included in the NOV headers from the
> NNTP server.  With those two set, scoring on the "extra" header works
> for me.
> 
> Perhaps the manual should mention those in that section -- it does
> mention the issue, but not how to work around it.  I'll make that change
> now...
> 

Works like a charm, thank you very much!



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-17 17:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14 22:56 Gnus: (documentation) bug? gnus-extra-headers D
2021-05-16 14:12 ` Lars Ingebrigtsen
2021-05-16 14:43   ` D
2021-05-17 13:51     ` Lars Ingebrigtsen
2021-05-17 13:56       ` Andreas Schwab
2021-05-17 14:27         ` Lars Ingebrigtsen
2021-05-17 17:43           ` D

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).