emacs: remove back delete commands from completion-preview-commands

This commit is contained in:
Protesilaos 2026-09-03 21:44:26 +03:00
parent c31c524135
commit 4921e1c7f1
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA
2 changed files with 18 additions and 0 deletions

View file

@ -369,6 +369,12 @@ INDIVIDUAL-CAPFS to the list."
(setq completion-preview-idle-delay nil)
(setq completion-preview-ignore-case t)
(setq completion-preview-commands
(seq-remove
(lambda (command)
(memq command '(delete-backward-char backward-delete-char-untabify)))
completion-preview-commands))
(with-eval-after-load 'org
(add-to-list 'completion-preview-commands #'org-self-insert-command))

View file

@ -4976,6 +4976,12 @@ All we need to get started is to enable ~completion-preview-mode~ via
a relevant hook or ~global-completion-preview-mode~ to have it
available wherever possible.
I configure the ~completion-preview-commands~ to not have the commands
that delete text before the cursor. This is because I do not want to
be distracted by the preview while I am fixing a typo. In such a case,
I will normally type something else which will then give me a preview
I might benefit from.
#+begin_src emacs-lisp :tangle "prot-emacs-modules/prot-emacs-completion.el"
(when (eq prot-emacs-completion-in-buffer 'completion-preview)
(prot-emacs-configure
@ -4984,6 +4990,12 @@ available wherever possible.
(setq completion-preview-idle-delay nil)
(setq completion-preview-ignore-case t)
(setq completion-preview-commands
(seq-remove
(lambda (command)
(memq command '(delete-backward-char backward-delete-char-untabify)))
completion-preview-commands))
(with-eval-after-load 'org
(add-to-list 'completion-preview-commands #'org-self-insert-command))