Simplify text and setting up `which-key' with "lst:setup-which-key"

This commit is contained in:
Gerard Vermeulen 2024-06-20 17:24:10 +02:00
parent 5b7ffbd6f2
commit c4d5380fd8

View File

@ -223,7 +223,6 @@ of [[info:emacs#Saving Customizations][saving customizations (info)]].
lazy-count-prefix-format nil lazy-count-prefix-format nil
lazy-count-suffix-format " (%s/%s)" lazy-count-suffix-format " (%s/%s)"
lazy-highlight-initial-delay 1.0 lazy-highlight-initial-delay 1.0
max-mini-window-height 20 ; Prevent `which-key-mode' paging (try `C-x')!
mode-line-compact t mode-line-compact t
next-error-message-highlight t next-error-message-highlight t
recentf-max-saved-items 100 recentf-max-saved-items 100
@ -1028,20 +1027,15 @@ looks for files.
:END: :END:
Table [[tab:basic-key-bindings]] lists basic key bindings. Enabling Table [[tab:basic-key-bindings]] lists basic key bindings. Enabling
=which-key-mode= is another way of associating key bindings with commands. =which-key-mode= is another way of associating key bindings with commands. This
Execute src_emacs-lisp[:results none]{(find-library "which-key")} to check setup assumes that =which-key= is a builtin package or an installed external
whether this library is builtin. Notes: package. Notes:
1. This setup does not enable =which-key-mode= because of rare interference with 1. This setup does not enable =which-key-mode= because of rare interference with
for instance a process that the =compile= command launches. for instance a process that the =compile= command launches.
2. ChatGPT bullshits on "How to page in =which-key-mode= on Emacs". 2. ChatGPT bullshits on "How to page in =which-key-mode= on Emacs". Anyhow, it
3. Execute src_emacs-lisp[:results none]{(setopt max-mini-window-height 0.5)} to is easier to bypass paging.
make =which-key-mode= display all keys without paging (try "C-x"). 3. The *easiest* solution to bypass paging in =which-key-mode= as listing
4. Execute src_emacs-lisp[:results none]{(which-key-setup-side-window-right)} to [[lst:setup-which-key]] implements.
*enable* =which-key= paging support (use fn-F1 on Darwin). Setting
=max-mini-window-height= is the easiest solution.
5. Execute src_emacs-lisp[:results none]{(which-key-setup-minibuffer)} to
*disable* =which-key= paging support (and display the first =which-key-mode=
page in the minibuffer).
#+attr_latex: :booktabs yes :float table #+attr_latex: :booktabs yes :float table
#+caption[Basic key bindings]: #+caption[Basic key bindings]:
@ -1060,6 +1054,15 @@ whether this library is builtin. Notes:
| *forward-sentence* | global-map | {{{kbd(M-e)}}} | | *forward-sentence* | global-map | {{{kbd(M-e)}}} |
|----------------------+------------+------------------------| |----------------------+------------+------------------------|
#+caption[Setup =which-key=]:
#+caption: Setup =which-key=.
#+name: lst:setup-which-key
#+begin_src emacs-lisp -n :results silent
(when (package-installed-p 'which-key)
(setopt max-mini-window-height 20)
(which-key-setup-minibuffer))
#+end_src
** [[https://github.com/michael-heerdegen/interaction-log.el#readme][Interaction-log]] ** [[https://github.com/michael-heerdegen/interaction-log.el#readme][Interaction-log]]
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: sec:interaction-log :CUSTOM_ID: sec:interaction-log