; Provide documentation example for gnus-alter-header-function

* doc/misc/gnus.texi (Low-Level Threading): Provide an example of using
gnus-alter-header-function to remove unwanted items in References
header.
This commit is contained in:
Andrew G Cohen 2024-05-09 16:44:21 +08:00
parent 082666e528
commit 1b8613063c

View file

@ -7423,6 +7423,22 @@ meaningful. Here's one example:
header))))
@end lisp
And another example: the protonmail bridge adds fake message-ids to
@code{References} in message headers, which can confuse threading. To
remove these spurious ids
@lisp
(setq gnus-alter-header-function 'fix-protonmail-references)
(defun fix-protonmail-references (header)
(setf (mail-header-references header)
(mapconcat
#'(lambda (x) (if (string-search "protonmail.internalid" x) "" x))
(gnus-split-references (mail-header-references header)) " "))
header)
@end lisp
@end table