summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-05-20 03:07:03 +0100
committerjao <jao@gnu.org>2022-05-20 03:07:03 +0100
commit8a272e686074b41dcf3f336932681b4ac3e56e69 (patch)
tree6a9425cdad1ce6451703e355f0b606cded7b5bdd
parent2910ff2dea911765c3b89e1bb473d1cf546d1950 (diff)
downloadelibs-8a272e686074b41dcf3f336932681b4ac3e56e69.tar.gz
elibs-8a272e686074b41dcf3f336932681b4ac3e56e69.tar.bz2
completion: trying vertico for completion-in-region for a while
-rw-r--r--completion.org16
-rw-r--r--notmuch.org6
2 files changed, 14 insertions, 8 deletions
diff --git a/completion.org b/completion.org
index 8d7467a..c1fd686 100644
--- a/completion.org
+++ b/completion.org
@@ -171,9 +171,8 @@
(bound-and-true-p vertico--input))
(corfu-mode 1)))
- (add-hook 'minibuffer-setup-hook #'corfu-in-minibuffer 1)
-
- (global-corfu-mode 1)
+ ;; (add-hook 'minibuffer-setup-hook #'corfu-in-minibuffer 1)
+ ;; (global-corfu-mode 1)
#+end_src
* vertico
@@ -187,6 +186,14 @@
org-refile-use-outline-path t)
:config
+ ;; Use `consult-completion-in-region' if Vertico is enabled.
+ ;; Otherwise use the default `completion--in-region' function.
+ (setq completion-in-region-function
+ (lambda (&rest args)
+ (apply (if vertico-mode
+ #'consult-completion-in-region
+ #'completion--in-region)
+ args)))
(defun jao-vertico--display-candidates (lines)
(move-overlay vertico--candidates-ov (point-min) (point-min))
@@ -201,8 +208,7 @@
:bind (:map vertico-map (("RET" . vertico-directory-enter)
("M-<backspace>" . vertico-directory-delete-word)
("<backspace>" . vertico-directory-delete-char))))
-
- (vertico-mode)
+ (vertico-mode)
#+end_src
* consult
diff --git a/notmuch.org b/notmuch.org
index 971f53c..340a114 100644
--- a/notmuch.org
+++ b/notmuch.org
@@ -63,7 +63,7 @@
(defvar jao-notmuch--shared-tags
'("new" "unread" "flagged" "signed" "sent" "attachment" "forwarded"
- "encrypted" "gmane" "feeds" "rss" "mce" "trove" "prog" "emacs"))
+ "encrypted" "gmane" "gnus" "feeds" "rss" "mce" "trove" "prog" "emacs"))
(defun jao-notmuch--subtags (tag &rest excl)
(let* ((cmd (concat "notmuch search --output=tags tag:" tag))
@@ -132,11 +132,11 @@
'("tag:jao" "date:24h.."
"not tag:\"/(feeds|spam|local)/\""))
,(jao-notmuch--q "jao" "flagged" "rj" '("tag:flagged" "tag:jao"))
- ,(jao-notmuch--q "jao" "drafts" "d" '("tag:draft"))
,(jao-notmuch--q "feeds" "flagged" "rf" '("tag:flagged" "tag:feeds"))))
(defvar jao-notmuch-new-searches
- `(,(jao-notmuch--q "new" nil "nn" '("tag:new" "not tag:draft"))
+ `(,(jao-notmuch--q "jao" "drafts" "d" '("tag:draft"))
+ ,(jao-notmuch--q "new" nil "nn" '("tag:new" "not tag:draft"))
,(jao-notmuch--q "unread" nil "nu" '("tag:unread"))
(:query "*" :name "messages")))