]> git.eshelyaron.com Git - emacs.git/commitdiff
; Provide documentation example for gnus-alter-header-function
authorAndrew G Cohen <cohen@andy.bu.edu>
Thu, 9 May 2024 08:44:21 +0000 (16:44 +0800)
committerEshel Yaron <me@eshelyaron.com>
Fri, 10 May 2024 13:37:32 +0000 (15:37 +0200)
* doc/misc/gnus.texi (Low-Level Threading): Provide an example of using
gnus-alter-header-function to remove unwanted items in References
header.

(cherry picked from commit 1b8613063cf6a3b9a1f484e1179877e36ba4b5e0)

doc/misc/gnus.texi

index 8aa7f855aea9ebbbd174330a88451ae586bf293e..c5e4c885ccf92ea3093941f3fc96defee41e99bb 100644 (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