[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/notmuch-indicator 783158f171: Add notmuch-indicator-tab
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/notmuch-indicator 783158f171: Add notmuch-indicator-tab-bar-format |
|
Date: |
Wed, 22 Nov 2023 06:58:14 -0500 (EST) |
branch: externals/notmuch-indicator
commit 783158f171098385c0a4ee81d0851c58cc04891f
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Add notmuch-indicator-tab-bar-format
In the past, we were adding the indicator to the global-mode-string,
so it was showing up on the tab-bar via tab-bar-format-global. But now
I prefer to place the indicator in the mode-line-misc-info and make it
easier for users to place it wherever they prefer (I do that with my
own mode-line-format).
---
README.org | 28 ++++++++++++++++++++++++++++
notmuch-indicator.el | 4 ++++
2 files changed, 32 insertions(+)
diff --git a/README.org b/README.org
index 40f3b275a3..0d03708233 100644
--- a/README.org
+++ b/README.org
@@ -235,6 +235,34 @@ Everything is in place to set up the package.
notmuch-indicator-force-refresh-commands '(notmuch-refresh-this-buffer))
#+end_src
+** Place the notmuch-indicator on the tab-bar
+:PROPERTIES:
+:CUSTOM_ID: h:9deb5f28-2d0e-4e50-8a57-a65003f40967
+:END:
+
+[ This information is relevant as part of {{{development-version}}}. ]
+
+#+findex: notmuch-indicator-tab-bar-format
+The built-in ~tab-bar-mode~ provides the ~tab-bar-format~ option to
+display additional information on the tab bar instead of showing it on
+each mode line. Add the ~notmuch-indicator-tab-bar-format~ to the
+list, such as with this arrangement:
+
+#+begin_src emacs-lisp
+(setq tab-bar-format
+ '( tab-bar-format-history
+ tab-bar-format-tabs
+ tab-bar-separator
+ tab-bar-format-add-tab
+ tab-bar-format-align-right
+ notmuch-indicator-tab-bar-format ; here it is
+ tab-bar-separator
+ tab-bar-format-global))
+#+end_src
+
+Note that unlike the mode line, the indicator on the tab-line is not
+clickable. This is not something we control.
+
* Acknowledgements
:PROPERTIES:
:CUSTOM_ID: h:399afb8b-7bb3-40b4-b10f-3123714d9614
diff --git a/notmuch-indicator.el b/notmuch-indicator.el
index bfcb31cc3e..9f5c58d554 100644
--- a/notmuch-indicator.el
+++ b/notmuch-indicator.el
@@ -282,6 +282,10 @@ Do it when `notmuch-indicator-mode' is enabled. Also see
(put 'notmuch-indicator-mode-line-construct 'risky-local-variable t)
+(defun notmuch-indicator-tab-bar-format ()
+ "Notmuch indicator construct suitable for `tab-bar-format'."
+ `((global menu-item ,(format-mode-line
notmuch-indicator-mode-line-construct) ignore)))
+
(defun notmuch-indicator--running-p ()
"Return non-nil if `notmuch-indicator--indicator' is running."
(when (and notmuch-indicator-notmuch-config-file
notmuch-indicator-notmuch-binary)
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/notmuch-indicator 783158f171: Add notmuch-indicator-tab-bar-format,
ELPA Syncer <=