From 1af0e95fec0d9c63b92ea081d6ca15ecd82d1ade Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Sun, 7 Jun 2020 10:01:41 +0200 Subject: [PATCH] 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 gnus-summary-line-format. (nnir-open-server): Run nnir-mode in gnus-summary-generate-hook instead of gnus-summary-prepared-hook. --- lisp/gnus/nnir.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index 823bc2b423e..f1e31a0cd10 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el @@ -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 + gnus-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) -- 2.39.2