From d4b4b7c188037baa5ee41fb0a921ff9e6a8c3d33 Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Tue, 1 Feb 2022 07:57:33 +0100 Subject: [PATCH] Add links on how to use Emacs and Elisp and get rid off which-key * Adhere to https://protesilaos.com/codelog/2022-01-31-learning-emacs. * Uninstall which-key. * Enable embark-prefix-help-command. --- README.org | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/README.org b/README.org index 6301019..e26af17 100644 --- a/README.org +++ b/README.org @@ -88,6 +88,13 @@ Here follows a list of interesting Emacs configurations: as well helpful commit and issue histories. See for instance the discussion on [[https://github.com/purcell/emacs.d/issues/778][the correctness of order of company candidates in Emacs lisp mode]]. +Here follows a list of links on how to use Emacs and Elisp: +1. [[https://protesilaos.com/codelog/2022-01-31-learning-emacs/][Learning Emacs and Elisp]] is a link to a video tutorial with a transcript on + the best approach to learn Emacs and Elisp. +2. [[https://www.masteringemacs.org/][Mastering Emacs]] is a link to a blog with many interesting posts that promotes + a book on how to become a proficient Emacs user. +3. [[https://endlessparentheses.com/][Endless Parentheses]] is a blog with many mindblowing code snippets. + * [[info:emacs#Early Init File][Early Init File (info)]] :PROPERTIES: :CUSTOM_ID: sec:early-init-file @@ -221,7 +228,6 @@ the ~custom-file~ as [[info:emacs#Saving Customizations][saving customizations ( undo-tree ; more advanced yet simpler undo system vertico ; VERTical Interactive Completion wgrep ; open a writable grep buffer - which-key ; on the fly key-binding help wordnut ; WordNet lexical database writegood-mode ; bullshit and weasel-word detector ws-butler ; remove trailing whitespace @@ -636,7 +642,10 @@ Listing [[lst:configure-orderless]] enables =orderless=. :CUSTOM_ID: sec:embark-configuration :END: -Listing [[lst:configure-embark]] configures =embark=. +Listing [[lst:configure-embark]] configures =embark= key bindings: type for instance +{{{kbd(C-x C-h)}}} or {{{kbd(C-c C-h)}}} that the initialization +src_emacs-lisp{(setq prefix-help-command #'embark-prefix-help-command)} enables +minibuffer help after a prefix key. #+caption[Configure =embark=]: #+caption: Configure =embark=. @@ -646,7 +655,8 @@ Listing [[lst:configure-embark]] configures =embark=. (when (cl-every #'fboundp '(embark-act embark-bindings embark-dwim)) (global-set-key (kbd "C-,") #'embark-act) (global-set-key (kbd "C-:") #'embark-dwim) - (global-set-key (kbd "C-h B") #'embark-bindings))) + (global-set-key (kbd "C-h B") #'embark-bindings) + (setq prefix-help-command #'embark-prefix-help-command))) #+end_src ** [[info:marginalia#Top][Marginalia (info)]] @@ -827,28 +837,6 @@ previous input in the minibuffer. Listing (define-key minibuffer-local-map (kbd "C-") #'minibuffer-complete-history) #+end_src -** [[https://github.com/justbur/emacs-which-key#readme][Prefix key-binding help]] -:PROPERTIES: -:CUSTOM_ID: sec:prefix-key-binding-help -:END: - -Configure ~which-key-mode~ so that typing =C-h= after a prefix key displays all -keys available after the prefix key. Listing [[lst:enable-which-key-mode]] enables -[[https://github.com/justbur/emacs-which-key#manual-activation][manual activation]] of =which-key-mode=. This uses =prefix-help-command= behind -the scenes and is therefore incompatible with straightforward use of [[info:embark#Quick - start][=embark-prefix-help-command= (info)]]. - -#+caption[Enable =which-key-mode=]: -#+caption: Enable =which-key-mode=. -#+name: lst:enable-which-key-mode -#+begin_src emacs-lisp - (when (fboundp 'which-key-mode) - (custom-set-variables - '(which-key-idle-delay 10000) - '(which-key-idle-secondary-delay 0.05) - '(which-key-show-early-on-C-h t)) - (which-key-mode +1)) -#+end_src * Reading :PROPERTIES: