[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/embark a3e2a186ec 8/9: Make the group title format conf
From: |
ELPA Syncer |
Subject: |
[elpa] externals/embark a3e2a186ec 8/9: Make the group title format configurable (fix #497) |
Date: |
Mon, 2 May 2022 09:57:33 -0400 (EDT) |
branch: externals/embark
commit a3e2a186ec1f530ae7a813ad61b2dfd5cffb4a34
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>
Make the group title format configurable (fix #497)
---
embark.el | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/embark.el b/embark.el
index f207730ec8..df10d1d303 100644
--- a/embark.el
+++ b/embark.el
@@ -2427,11 +2427,24 @@ The commands that prompt for a string separator are
`embark-insert' and `embark-copy-as-kill'.")
(defface embark-collect-candidate '((t :inherit default))
- "Face for candidates in Embark Collect.")
+ "Face for candidates in Embark Collect buffers.")
(defface embark-collect-group-title
'((t :inherit shadow :slant italic :height 1.1))
- "Face for candidates in Embark Collect.")
+ "Face for group titles in Embark Collect buffers.")
+
+(defface embark-collect-group-separator
+ '((t :inherit shadow :strike-through t italic :height 1.1))
+ "Face for group titles in Embark Collect buffers.")
+
+(defcustom embark-collect-group-format
+ (concat
+ (propertize " " 'face 'embark-collect-group-separator)
+ (propertize " %s " 'face 'embark-collect-group-title)
+ (propertize " " 'face 'completions-group-separator
+ 'display '(space :align-to right)))
+ "Format string used for the group title in Embark Collect buffers."
+ :type 'string)
(defface embark-collect-zebra-highlight
'((default :extend t)
@@ -2688,6 +2701,10 @@ If NESTED is non-nil subkeymaps are not flattened."
([remap backward-paragraph] 'outline-previous-heading)
("{" 'outline-previous-heading))
+(defconst embark-collect--outline-string (string #x210000)
+ "Special string used for outine headings in Embark Collect buffers.
+Chosen to be extremely unlikely to appear in a candidate.")
+
(define-derived-mode embark-collect-mode tabulated-list-mode "Embark Collect"
"List of candidates to be acted on.
The command `embark-act' is bound `embark-collect-mode-map', but
@@ -2705,7 +2722,7 @@ opened the minibuffer is run again and the minibuffer
contents
restored. You can then interact normally with the command,
perhaps editing the minibuffer contents, and, if you wish, you
can rerun `embark-collect' to get an updated buffer."
- (setq-local outline-regexp "● ")
+ (setq-local outline-regexp embark-collect--outline-string)
(outline-minor-mode))
(defun embark-collect--remove-zebra-stripes ()
@@ -2845,7 +2862,10 @@ example)."
(mapcan
(lambda (group)
(cons
- `(nil [(,(concat "● " (car group)) type embark-collect-group)
+ `(nil [(,(concat (propertize embark-collect--outline-string
+ 'invisible t)
+ (format embark-collect-group-format (car
group)))
+ type embark-collect-group)
("" skip t)])
(mapcar
(pcase-lambda (`(,cand ,prefix ,annotation))
- [elpa] externals/embark updated (7a2487f5bb -> a8bc5d602d), ELPA Syncer, 2022/05/02
- [elpa] externals/embark a26044888e 1/9: Fix doc string warnings, ELPA Syncer, 2022/05/02
- [elpa] externals/embark a3f418154d 3/9: Use a more localized advice only for embark-collect--metadatum, ELPA Syncer, 2022/05/02
- [elpa] externals/embark 25217ccddf 2/9: outline-minor-mode is autoloaded, ELPA Syncer, 2022/05/02
- [elpa] externals/embark 2d017739a0 4/9: Remap paragraph commands to outline heading commands, ELPA Syncer, 2022/05/02
- [elpa] externals/embark e6a991c322 5/9: Let's not be embarrased about advising an internal Embark function, ELPA Syncer, 2022/05/02
- [elpa] externals/embark 4f2770a4b3 7/9: Merge pull request #498 from minad/outline-review, ELPA Syncer, 2022/05/02
- [elpa] externals/embark a3e2a186ec 8/9: Make the group title format configurable (fix #497),
ELPA Syncer <=
- [elpa] externals/embark a8bc5d602d 9/9: Make the collect group headers normal-sized, ELPA Syncer, 2022/05/02
- [elpa] externals/embark fa0ef92a96 6/9: Add {, } for outline navigation in collect buffers, ELPA Syncer, 2022/05/02