Narrow to headers in gnus-registry before getting data
* lisp/gnus/gnus-registry.el (gnus-registry-spool-action): Narrow to the headers before getting data from them (bug#42029).
This commit is contained in:
parent
c77731e824
commit
42b33405c2
1 changed files with 15 additions and 13 deletions
|
@ -449,19 +449,21 @@ This is not required after changing `gnus-registry-cache-file'."
|
|||
to subject sender recipients)))
|
||||
|
||||
(defun gnus-registry-spool-action (id group &optional subject sender recipients)
|
||||
(let ((to (gnus-group-guess-full-name-from-command-method group))
|
||||
(recipients (or recipients
|
||||
(gnus-registry-sort-addresses
|
||||
(or (message-fetch-field "cc") "")
|
||||
(or (message-fetch-field "to") ""))))
|
||||
(subject (or subject (message-fetch-field "subject")))
|
||||
(sender (or sender (message-fetch-field "from"))))
|
||||
(when (and (stringp id) (string-match "\r$" id))
|
||||
(setq id (substring id 0 -1)))
|
||||
(gnus-message 7 "Gnus registry: article %s spooled to %s"
|
||||
id
|
||||
to)
|
||||
(gnus-registry-handle-action id nil to subject sender recipients)))
|
||||
(save-restriction
|
||||
(message-narrow-to-headers-or-head)
|
||||
(let ((to (gnus-group-guess-full-name-from-command-method group))
|
||||
(recipients (or recipients
|
||||
(gnus-registry-sort-addresses
|
||||
(or (message-fetch-field "cc") "")
|
||||
(or (message-fetch-field "to") ""))))
|
||||
(subject (or subject (message-fetch-field "subject")))
|
||||
(sender (or sender (message-fetch-field "from"))))
|
||||
(when (and (stringp id) (string-match "\r$" id))
|
||||
(setq id (substring id 0 -1)))
|
||||
(gnus-message 7 "Gnus registry: article %s spooled to %s"
|
||||
id
|
||||
to)
|
||||
(gnus-registry-handle-action id nil to subject sender recipients))))
|
||||
|
||||
(defun gnus-registry-handle-action (id from to subject sender
|
||||
&optional recipients)
|
||||
|
|
Loading…
Add table
Reference in a new issue