[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/nano-modeline a4e72d1486 11/18: Added handling of indir
From: |
ELPA Syncer |
Subject: |
[elpa] externals/nano-modeline a4e72d1486 11/18: Added handling of indirect buffer |
Date: |
Thu, 12 May 2022 07:57:49 -0400 (EDT) |
branch: externals/nano-modeline
commit a4e72d1486307879b10cf6fd78a895ad7fdbcc38
Author: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
Commit: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
Added handling of indirect buffer
---
nano-modeline.el | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/nano-modeline.el b/nano-modeline.el
index cb383c17bc..31f7580687 100644
--- a/nano-modeline.el
+++ b/nano-modeline.el
@@ -1022,7 +1022,22 @@ depending on the version of mu4e."
(plist-get (cdr (assoc 'text-mode nano-modeline-mode-formats)) :icon)))
(defun nano-modeline-default-mode (&optional icon)
- (let ((buffer-name (format-mode-line "%b"))
+ (let ((icon (or icon
+ (plist-get (cdr (assoc 'text-mode
nano-modeline-mode-formats)) :icon)))
+ ;; We take into account the case of narrowed buffers
+ (buffer-name (cond
+ ((and (derived-mode-p 'org-mode)
+ (buffer-narrowed-p)
+ (buffer-base-buffer))
+ (format"%s [%s]" (buffer-base-buffer)
+ (substring-no-properties (or (org-get-heading
'no-tags)
+ "-"))))
+ ((and (buffer-narrowed-p)
+ (buffer-base-buffer))
+ (format"%s [narrow]" (buffer-base-buffer)))
+ (t
+ (format-mode-line "%b"))))
+
(mode-name (nano-modeline-mode-name))
(branch (nano-modeline-vc-branch))
(position (format-mode-line "%l:%c")))
- [elpa] externals/nano-modeline fee1f3c1e0 12/18: Changed default option to status, (continued)
- [elpa] externals/nano-modeline fee1f3c1e0 12/18: Changed default option to status, ELPA Syncer, 2022/05/12
- [elpa] externals/nano-modeline ce924479de 05/18: Moved dedcited/modified status at end of modeline., ELPA Syncer, 2022/05/12
- [elpa] externals/nano-modeline f75b90da5d 09/18: Read status from base buffer in case buffer is indirect, ELPA Syncer, 2022/05/12
- [elpa] externals/nano-modeline 5948e191f1 06/18: Bugfix: uncommented text mode, ELPA Syncer, 2022/05/12
- [elpa] externals/nano-modeline 5956e5a4fe 14/18: Fixed and simplified custom format for modes, ELPA Syncer, 2022/05/12
- [elpa] externals/nano-modeline cdedb79ab5 17/18: Fixed imenu list mode (faulty code), ELPA Syncer, 2022/05/12
- [elpa] externals/nano-modeline 960ff4f01a 16/18: Version 0.7, ELPA Syncer, 2022/05/12
- [elpa] externals/nano-modeline d37ff5b014 18/18: Merge branch 'no-prefix', ELPA Syncer, 2022/05/12
- [elpa] externals/nano-modeline acd020a045 10/18: Added imenu-list mode, ELPA Syncer, 2022/05/12
- [elpa] externals/nano-modeline 6ab5d5b94d 15/18: Better display format for org headings, ELPA Syncer, 2022/05/12
- [elpa] externals/nano-modeline a4e72d1486 11/18: Added handling of indirect buffer,
ELPA Syncer <=
- [elpa] externals/nano-modeline 532f557c08 13/18: Space computation now takes right margin into account, ELPA Syncer, 2022/05/12