Commit 1af0e95f authored by Tassilo Horn's avatar Tassilo Horn
Browse files

Gnus nnir-summary-line-format has no effect

* lisp/gnus/nnir.el (nnir-mode): Update summary format specs if
nnir-summary-line-format is set and different from
(nnir-open-server): Run nnir-mode in gnus-summary-generate-hook
instead of gnus-summary-prepared-hook.
parent dd366b5d
Pipeline #5788 failed with stage
in 12 seconds
......@@ -662,7 +662,7 @@ A non-nil `specs' arg must be an alist with `nnir-query-spec' and
(let ((backend (car (gnus-server-to-method server))))
(if backend
(nnoo-change-server backend server definitions)
(add-hook 'gnus-summary-prepared-hook 'nnir-mode)
(add-hook 'gnus-summary-generate-hook 'nnir-mode)
(nnoo-change-server 'nnir server definitions))))
(deffoo nnir-request-group (group &optional server dont-check _info)
......@@ -1849,8 +1849,11 @@ is also searched."
(defun nnir-mode ()
(when (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnir)
(setq gnus-summary-line-format
(or nnir-summary-line-format gnus-summary-line-format))
(when (and nnir-summary-line-format
(not (string= nnir-summary-line-format
(setq gnus-summary-line-format nnir-summary-line-format)
(gnus-update-format-specifications nil 'summary))
(when (bound-and-true-p gnus-registry-enabled)
(remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t)
(remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment