[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnorb a59dac2 317/449: Use hook for determining Gnorb s
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnorb a59dac2 317/449: Use hook for determining Gnorb summary minor mode |
Date: |
Fri, 27 Nov 2020 23:16:03 -0500 (EST) |
branch: externals/gnorb
commit a59dac222094c320ec95cb1234156d934008e029
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>
Use hook for determining Gnorb summary minor mode
* gnorb-gnus.el (gnorb-gnus-search-messages): Don't start the minor mode
from here, this is no longer the only entry point to Gnorb-generated
groups. Just identify our nnir groups as Gnorb-related.
(gnorb-gnus-summary-mode-hook): Check when entering all
groups if this is a Gnorb-generated group. If so, activate the minor
mode.
This is about as far as we're going to go down this road. Next up is
making nngnorb a proper backend, with real groups.
---
gnorb-gnus.el | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/gnorb-gnus.el b/gnorb-gnus.el
index 970bc74..38c8d90 100644
--- a/gnorb-gnus.el
+++ b/gnorb-gnus.el
@@ -679,7 +679,7 @@ work."
(concat "gnorb-" str))))
(setq method (if (version= "5.13" gnus-version-number)
(list 'nnir nnir-address)
- (list 'nnir "nnir")))
+ (list 'nnir "Gnorb")))
(setq spec
(list
(cons 'nnir-specs (list (cons 'nnir-query-spec `((query . ,str)))
@@ -690,8 +690,16 @@ work."
(switch-to-buffer gnus-group-buffer)
(gnus-group-make-group name method nil spec)
(gnus-group-select-group))
- (gnus-group-read-ephemeral-group name method nil ret nil nil spec))
- (gnorb-summary-minor-mode)))
+ (gnus-group-read-ephemeral-group name method nil ret nil nil spec))))
+
+(defun gnorb-gnus-summary-mode-hook ()
+ "Check if we've entered a Gnorb-generated group, and activate
+ `gnorb-summary-minor-mode', if so."
+ (let ((method (gnus-find-method-for-group gnus-newsgroup-name)))
+ (when (string-match-p "Gnorb" (cadr method))
+ (gnorb-summary-minor-mode))))
+
+(add-hook 'gnus-summary-mode-hook #'gnorb-gnus-summary-mode-hook)
;;; Automatic noticing of relevant messages
- [elpa] externals/gnorb bd4246d 344/449: Check for live Gnus before following a link, (continued)
- [elpa] externals/gnorb bd4246d 344/449: Check for live Gnus before following a link, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 0889540 348/449: Refine matching of user email address, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb aa8d041 350/449: Mention 'all option in gnorb-org-mail-scan-scope, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 06b0e09 351/449: Update to match new version of BBDB, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 16931d7 352/449: New utility function gnorb-select-from-list, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb c8521d4 156/449: gnorb-org-mail-todos should be nil by default, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb aedf0f2 169/449: Show status of relevant todo when hinting messages, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 67edd80 239/449: Use mail-header-references, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb dfa0043 300/449: Safer usage of cl-subseq, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 2d30b0c 310/449: Reset window conf after nnir-run-gnorb, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb a59dac2 317/449: Use hook for determining Gnorb summary minor mode,
Stefan Monnier <=
- [elpa] externals/gnorb 7fcde77 328/449: Handle renaming of Org variable, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb d754d2f 336/449: Fixing `gnorb-bbdb-postings-styles', Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 984d5e6 338/449: gnorb-org.el: Don't use nreverse, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 7ea06f9 339/449: Delete gnorb-prompt-for-bbdb-record, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb e2afc4b 355/449: Switch on lexical binding across the board, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 7d14112 358/449: Trying to fix issue #30., Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb c1014ac 359/449: Merge pull request #31 from berhoel/master, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 64e72d6 360/449: Use :package-version, not :version, on defcustom, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 3090162 361/449: Bump version to 1.1.4, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb c0b3090 362/449: Fix email subtree command, Stefan Monnier, 2020/11/27