summaryrefslogtreecommitdiff
path: root/itches/emacs/tracker.org
diff options
context:
space:
mode:
Diffstat (limited to 'itches/emacs/tracker.org')
-rw-r--r--itches/emacs/tracker.org38
1 files changed, 38 insertions, 0 deletions
diff --git a/itches/emacs/tracker.org b/itches/emacs/tracker.org
index 33f1ce1..f6e80f7 100644
--- a/itches/emacs/tracker.org
+++ b/itches/emacs/tracker.org
@@ -125,6 +125,44 @@ Unfortunately, Symbola now comes with a [[https://dn-works.com/wp-content/upload
Cf. [[https://bugs.archlinux.org/task/58886][Arch Linux]], [[https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897047][Debian]], [[https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/EC6I35ILFICKY5W5XTHYJC6UH36B2UQS/][Fedora]], [[https://www.mail-archive.com/gentoo-dev@lists.gentoo.org/msg88799.html][Gentoo]], [[https://github.com/NixOS/nixpkgs/pull/79679][NixOS]] and [[https://bugs.launchpad.net/ubuntu/+source/ttf-ancient-fonts/+bug/1824065][Ubuntu]] threads; also
[[https://en.wikipedia.org/wiki/Talk:Open-source_Unicode_typefaces#Symbola_font][Wikipedia]] thread.
+*** imenu
+**** TODO Add grouping/sorting predicates to ~imenu~ completion
+So that ~imenu~ + ~icomplete-vertical-mode~ becomes a built-in,
+buffer-less equivalent of ~imenu-list~.
+
+Simple example of these predicates in action:
+
+#+begin_src elisp
+(completing-read
+ "bleh? "
+ (lambda (string pred action)
+ (if (eq action 'metadata)
+ (let ((sort-fn
+ (lambda (candidates)
+ (let* ((numbers (sort (mapcar 'string-to-number candidates) '<))
+ (evens (seq-filter 'cl-evenp numbers))
+ (odds (seq-difference numbers evens)))
+ (mapcar 'number-to-string
+ (if (and (car evens) (< (car evens) (car odds)))
+ (append evens odds)
+ (append odds evens)))))))
+ `(metadata
+ (cycle-sort-function . ,sort-fn)
+ (display-sort-function . ,sort-fn)
+ (group-function
+ . (lambda (candidate transform)
+ (if transform
+ candidate
+ (if (cl-evenp (string-to-number candidate))
+ "even"
+ "odd"))))))
+ (complete-with-action action
+ (mapcar 'number-to-string
+ (number-sequence 1 10))
+ string
+ pred))))
+#+end_src
+
*** project
**** DONE [[bug:45765]] Change default-directory before prompting in project-compile
:PROPERTIES: