From 157a6c5c4b2b56b5e8ceaa07194e5c121c1209c4 Mon Sep 17 00:00:00 2001 From: "Itai Y. Efrat" Date: Mon, 17 May 2021 13:20:02 +0300 Subject: [PATCH] selectrum: partially fix selectrum-repeat issue - doesn't restore selection upon repeat, might be upstream issue - document some bugs/todos --- modules/completion/selectrum/TODO.org | 15 ++++++++++++--- .../completion/selectrum/autoload/selectrum.el | 3 +-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/modules/completion/selectrum/TODO.org b/modules/completion/selectrum/TODO.org index 430bb1687..ca51cc3c8 100644 --- a/modules/completion/selectrum/TODO.org +++ b/modules/completion/selectrum/TODO.org @@ -26,9 +26,18 @@ https://github.com/raxod502/selectrum/issues/491 ** TODO ~(defadvice! +orderless-match-with-one-face..~ causes lexical error probably caused by some doomism https://github.com/oantolin/orderless/issues/41 -** TODO =SPC '= doesn't work on =SPC /= -Something in the ~selectrum-last-command~ logic breaks down. Maybe the fact that -~+selectrum-file-search~ is defined with ~cl-defun~? +** TODO ~selectrum-repeat~ Issues +Unlike Ivy, ~selectrum-repeat~ doesn't restore the position of the selection in +the completion buffer. Seems to be reproduced in ~emacs -Q~. If so, create +upstream selectrum issue. +** TODO go over definition of ~+selectrum-file-search~ +check if anything else there needs to be cleaned up. +** TODO Embark export window buffer switching logic +If we export bookmarks, grep session, or ~find-file~ session, when pressing +enter, it opens the new buffer in another window rather than the main one, even +though at least the bookmark function ostensibly uses +~pop-to-buffer-same-window~. Ivy gets the window switched in the bookmarks and +grep case due to a custom ivy occur window switching function. ** TODO ~orderless+initialism~ doesn't work for some reason See https://github.com/oantolin/orderless/issues/54. Narrowed it down to the fact that it works if ~selectrum-mode~ is off, but diff --git a/modules/completion/selectrum/autoload/selectrum.el b/modules/completion/selectrum/autoload/selectrum.el index 071538145..1c683dae5 100644 --- a/modules/completion/selectrum/autoload/selectrum.el +++ b/modules/completion/selectrum/autoload/selectrum.el @@ -23,8 +23,7 @@ one face." (user-error "Couldn't find ripgrep in your PATH")) (require 'consult) (setq deactivate-mark t) - (let* ((this-command 'consult--grep) - (project-root (or (doom-project-root) default-directory)) + (let* ((project-root (or (doom-project-root) default-directory)) (directory (or in project-root)) (args (split-string (string-trim