Move key bindings section upwards

This commit is contained in:
Gerard Vermeulen 2022-01-18 07:26:09 +01:00
parent 42006f6ebc
commit 31379209f5

View File

@ -324,6 +324,34 @@ a path in my home directory to the places where =info= looks for files.
(expand-file-name "~/.local/share/info")))
#+end_src
* [[info:emacs#Key Bindings][Key bindings (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:key-bindings
:END:
** [[info:emacs#Disabling][Disabling Commands (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:enable-disabled-commands
:END:
Execute src_emacs-lisp{(find-library "novice")} to see how Emacs prevents new
users from shooting themselves in the feet. Listing
[[lst:configure-disabled-command-function]] enables [[https://www.emacswiki.org/emacs/DisabledCommands][disabled commands on the fly]].
#+caption[Configure the =disabled-command-function=]:
#+caption: Configure the =disabled-command-function=.
#+name: lst:configure-disabled-command-function
#+begin_src emacs-lisp
(setq disabled-command-function
(defun my-enable-this-command (&rest _args)
"Called when a disabled command is executed.
Enable it and re-execute it."
(put this-command 'disabled nil)
(message "You typed %s. %s was disabled until now."
(key-description (this-command-keys)) this-command)
(sit-for 0)
(call-interactively this-command)))
#+end_src
* [[info:emacs#Emacs Server][Using Emacs as a server (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:using-emacs-server
@ -2054,34 +2082,6 @@ instance [[https://numpy.org/][numpy]] and [[https://scipy.org/][scipy]].
*** TODO Look into: editing facilities
1. [[https://github.com/douglasdavis/numpydoc.el/blob/main/numpydoc.el][Emacs extension to insert numpy style docstrings in function definitions]]
* [[info:emacs#Key Bindings][Key Bindings (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:key-bindings
:END:
** [[info:emacs#Disabling][Disabling Commands (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:enable-disabled-commands
:END:
Execute src_emacs-lisp{(find-library "novice")} to see how Emacs prevents new
users from shooting themselves in the feet. Listing
[[lst:configure-disabled-command-function]] enables [[https://www.emacswiki.org/emacs/DisabledCommands][disabled commands on the fly]].
#+caption[Configure the =disabled-command-function=]:
#+caption: Configure the =disabled-command-function=.
#+name: lst:configure-disabled-command-function
#+begin_src emacs-lisp
(setq disabled-command-function
(defun my-enable-this-command (&rest _args)
"Called when a disabled command is executed.
Enable it and re-execute it."
(put this-command 'disabled nil)
(message "You typed %s. %s was disabled until now."
(key-description (this-command-keys)) this-command)
(sit-for 0)
(call-interactively this-command)))
#+end_src
* [[info:emacs#Minor Modes][Minor Modes (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:minor-modes
@ -2233,9 +2233,6 @@ code formatter for Python]].
:CUSTOM_ID: sec:display
:END:
This setup does not configure [[info:emacs#Custom Themes][custom themes (info)]] in order to prevent endless
useless tweaking.
** [[info:emacs#Narrowing][Narrowing]]
:PROPERTIES:
:CUSTOM_ID: sec:narrowing
@ -2292,8 +2289,9 @@ on tables by means of =org-narrow-to-table=.
:CUSTOM_ID: sec:text-faces-or-styles
:END:
See the [[https://protesilaos.com/codelog/2020-09-05-emacs-note-mixed-font-heights/][note on mixed font heights in Emacs]] for how to setup fonts properly. It
boils down to two rules:
This setup does not configure [[info:emacs#Custom Themes][custom themes (info)]] in order to prevent endless
useless tweaking. See the [[https://protesilaos.com/codelog/2020-09-05-emacs-note-mixed-font-heights/][note on mixed font heights in Emacs]] for how to setup
fonts properly. It boils down to two rules:
1. The height of the default face must be an integer number to make the height a
physical quantity.
2. The heights of all other faces must be real numbers to scale those heights