emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/consult df440be 3/4: README/CHANGELOG: Update with rega


From: ELPA Syncer
Subject: [elpa] externals/consult df440be 3/4: README/CHANGELOG: Update with regards to preview debouncing
Date: Sat, 12 Jun 2021 14:57:09 -0400 (EDT)

branch: externals/consult
commit df440be557358b2dae733440ca17f555230e583f
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    README/CHANGELOG: Update with regards to preview debouncing
---
 CHANGELOG.org |  2 ++
 README.org    | 33 ++++++++++++++++++++++++++-------
 2 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index c00d066..71f8970 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -5,6 +5,8 @@
 * Development version
 
 - Add =consult-preview-excluded-hooks=
+- =consult--read/consult--prompt=: Add =:inherit-input-method= argument
+- Add debouncing support for preview
 
 * Version 0.8 (2021-05-30)
 
diff --git a/README.org b/README.org
index f51d7b2..826fe2a 100644
--- a/README.org
+++ b/README.org
@@ -405,14 +405,19 @@ their descriptions.
  =consult-preview-key= variable. Furthermore it is possible to specify
  keybindings which trigger the preview manually as shown in the 
[[#use-package-example][example
  configuration]]. The default setting of =consult-preview-key= is =any= which
- means that the preview will be triggered on any keypress when the selected
- candidate changes. Each command can be configured individually with its own
- =:preview-key=, such that preview can be manual for some commands, for some
- commands automatic and for some commands completely disabled.
+ means that the preview will be triggered /immediately/ on any keypress when 
the
+ selected candidate changes. Each command can be configured individually with
+ its own =:preview-key=. The preview key can be configured to be:
 
- A safe recommendation is to leave automatic previews enabled in general and
- disable the automatic preview only for commands, where the preview may be
- expensive due to file loading.
+ - Automatic and immediate =any=
+ - Automatic and delayed =(:debounce 0.5 any)=
+ - Manual and immediate =(kbd "M-.")=
+ - Manual and delayed =(list :debounce 0.5 (kbd "M-."))=
+ - Disabled =nil=
+
+ A safe recommendation is to leave automatic immediate previews enabled in
+ general and disable the automatic preview only for commands, where the preview
+ may be expensive due to file loading.
 
  #+begin_src emacs-lisp
    (consult-customize
@@ -431,6 +436,20 @@ their descriptions.
  are previewed literally without syntax highlighting and without changing the
  major mode.
 
+ Delaying the preview is particularily useful for =consult-theme=, since the 
theme
+ preview is a little bit slow. The delay can result in a smoother UI.
+
+ #+begin_src emacs-lisp
+   ;; Preview on any key press, but delay 0.5s
+   (consult-customize consult-theme :preview-key '(:debounce 0.5 any))
+   ;; Preview immediately on M-., on up/down after 0.5s, on any other key 
after 1s
+   (consult-customize consult-theme
+                      :preview-key
+                      (list (kbd "M-.")
+                            :debounce 0.5 (kbd "<up>") (kbd "<down>")
+                            :debounce 1 any))
+ #+end_src
+
 ** Narrowing and grouping
    :properties:
    :description: Restricting the completion to a candidate group



reply via email to

[Prev in Thread] Current Thread [Next in Thread]