From: Tassilo Horn <tsdh@gnu.org>
To: ding@gnus.org
Subject: nnir-summary-line-format doesn't work
Date: Sat, 06 Jun 2020 11:21:29 +0200 [thread overview]
Message-ID: <87a71gsg6e.fsf@gnu.org> (raw)
Hi all,
it seems like `nnir-summary-line-format' doesn't work in the current
Emacs master (and probably hasn't worked for ages). It gets set as
`gnus-summary-line-format' in `nnir-mode' which is called in
`gnus-summary-prepared-hook'. However, at that point, the summary
buffer is already built using the original `gnus-summary-line-format'
value.
The patch below fixes this problem. Could someone with a bit more Gnus
knowledge have a look at it and tell me if IDRT?
--8<---------------cut here---------------start------------->8---
1 file changed, 7 insertions(+), 2 deletions(-)
lisp/gnus/nnir.el | 9 +++++++--
modified lisp/gnus/nnir.el
@@ -663,6 +663,7 @@ nnir-open-server
(let ((backend (car (gnus-server-to-method server))))
(if backend
(nnoo-change-server backend server definitions)
+ (add-hook 'gnus-summary-generate-hook 'nnir-summary-generate-setup)
(add-hook 'gnus-summary-prepared-hook 'nnir-mode)
(nnoo-change-server 'nnir server definitions))))
@@ -1848,10 +1849,14 @@ nnir-registry-action
to
method))
+(defun nnir-summary-generate-setup ()
+ (when (and (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnir)
+ nnir-summary-line-format)
+ (setq gnus-summary-line-format nnir-summary-line-format)
+ (gnus-update-format-specifications nil 'summary)))
+
(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 (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)
--8<---------------cut here---------------end--------------->8---
Bye,
Tassilo
next reply other threads:[~2020-06-06 9:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-06 9:21 Tassilo Horn [this message]
2020-06-06 20:10 ` Eric Abrahamsen
2020-06-07 8:04 ` Tassilo Horn
2020-06-07 15:36 ` Eric Abrahamsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a71gsg6e.fsf@gnu.org \
--to=tsdh@gnu.org \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).