dotemacs

My Emacs configuration
git clone git://git.entf.net/dotemacs
Log | Files | Refs | LICENSE

commit 684877ad0b2fb383ac9942af057b3e1dc5b46944
parent edc686b3eb52155eb4bd7e89a083a60d51831578
Author: Lukas Henkel <lh@entf.net>
Date:   Sun, 13 Aug 2023 13:16:56 +0200

Fix ordering of files when flex completing

Diffstat:
Minit.el | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/init.el b/init.el @@ -266,6 +266,15 @@ (advice-add #'completion--replace :around #'lh/advice-fix-minibuffer-consult) +;; file-name-all-completions seems to return file names in whatever order the +;; filesystem feels like returning. This is super annoying with the flex +;; completion style. If the FS returns "barfoo" before "foobar", flex completion +;; will match "barfoo" first. This advice sorts the file name list. +(defun lh/advice-sort-file-name-all-completions (files) + (sort files #'string<)) + +(advice-add 'file-name-all-completions :filter-return 'lh/advice-sort-file-name-all-completions) + (setq completion-ignore-case t) (custom-set-variables