Minor edits
This commit is contained in:
parent
b5b41cc337
commit
90af81edad
68
README.org
68
README.org
@ -12,9 +12,9 @@
|
|||||||
|
|
||||||
Backup your =user-emacs-directory= (defaults often to =~/.emacs.d= on =Linux=,
|
Backup your =user-emacs-directory= (defaults often to =~/.emacs.d= on =Linux=,
|
||||||
=Unix=, or =Darwin=) directory and execute the commands in listing
|
=Unix=, or =Darwin=) directory and execute the commands in listing
|
||||||
[[lst:prepare-user-emacs-directory]]. After normal (interactive mode, no batch
|
[[lst:prepare-user-emacs-directory]]. After invoking Emacs interactively (in
|
||||||
mode, neither server mode), Emacs will ask you to install a selected set of
|
interactive mode, neither in batch mode, nor in server mode), Emacs will ask you
|
||||||
packages. Quit Emacs and invoke Emacs again.
|
to install a selected set of packages. Quit Emacs and invoke Emacs again.
|
||||||
|
|
||||||
#+caption[Prepare the user-emacs-directory]:
|
#+caption[Prepare the user-emacs-directory]:
|
||||||
#+caption: Clone and initialize the user-emacs-directory.
|
#+caption: Clone and initialize the user-emacs-directory.
|
||||||
@ -39,7 +39,7 @@ format of the presentations is [[https://www.latex-project.org/][LaTeX]].
|
|||||||
This [[info:org#Top][org]] file (more precisely the original [[info:org#Top][org]] source file of this file)
|
This [[info:org#Top][org]] file (more precisely the original [[info:org#Top][org]] source file of this file)
|
||||||
illustrates three methods in my work-flow:
|
illustrates three methods in my work-flow:
|
||||||
1. How to tangle (or export) source blocks from [[info:org#Top][org]] files. This file contains
|
1. How to tangle (or export) source blocks from [[info:org#Top][org]] files. This file contains
|
||||||
source blocks to produce the files =early-init.el=, =init.el=, =latexmkrc=,
|
source blocks to produce the files =early-init.el=, =init.el=, =latexmkrc=,
|
||||||
=org-store-link=, and =example.py= by tangling.
|
=org-store-link=, and =example.py= by tangling.
|
||||||
2. How to export [[info:org#Top][org]] files to other formats such as [[https://en.wikipedia.org/wiki/HTML][HTML]], [[https://www.latex-project.org/][LaTeX]], and [[https://en.wikipedia.org/wiki/PDF][PDF]].
|
2. How to export [[info:org#Top][org]] files to other formats such as [[https://en.wikipedia.org/wiki/HTML][HTML]], [[https://www.latex-project.org/][LaTeX]], and [[https://en.wikipedia.org/wiki/PDF][PDF]].
|
||||||
3. How [[info:org#Hyperlinks][org hyperlinks (info)]] allow to link inside and outside [[info:org#Top][Org Mode]]: hover
|
3. How [[info:org#Hyperlinks][org hyperlinks (info)]] allow to link inside and outside [[info:org#Top][Org Mode]]: hover
|
||||||
@ -116,8 +116,8 @@ Try to load [[https://github.com/emacscollective/no-littering][no-littering]] as
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
In order to get help in understanding the code block above in a buffer showing
|
In order to get help in understanding the code block above in a buffer showing
|
||||||
the original [[info:org#Top][Org]] source file, type {{{kbd(C-c C-c)}}} after moving point (or
|
the original [[info:org#Top][Org]] source file, type {{{kbd(C-c C-c)}}} after moving
|
||||||
cursor) to one of the items of the list:
|
point (or cursor) to one of the items of the list:
|
||||||
1. src_emacs-lisp{(describe-variable #'load-prefer-newer t)}
|
1. src_emacs-lisp{(describe-variable #'load-prefer-newer t)}
|
||||||
2. src_emacs-lisp{(apropos-library "no-littering")}
|
2. src_emacs-lisp{(apropos-library "no-littering")}
|
||||||
3. src_emacs-lisp{(find-function #'hack-local-variables)}
|
3. src_emacs-lisp{(find-function #'hack-local-variables)}
|
||||||
@ -1924,6 +1924,9 @@ instance [[https://numpy.org/][numpy]] and [[https://scipy.org/][scipy]].
|
|||||||
1. [[https://github.com/douglasdavis/numpydoc.el/blob/main/numpydoc.el][Emacs extension to insert numpy style docstrings in function definitions]]
|
1. [[https://github.com/douglasdavis/numpydoc.el/blob/main/numpydoc.el][Emacs extension to insert numpy style docstrings in function definitions]]
|
||||||
|
|
||||||
* Editing
|
* Editing
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: sec:editing
|
||||||
|
:END:
|
||||||
|
|
||||||
** [[https://www.emacswiki.org/emacs/DisabledCommands][Enable disabled commands and inform]]
|
** [[https://www.emacswiki.org/emacs/DisabledCommands][Enable disabled commands and inform]]
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
@ -2000,7 +2003,10 @@ on tables by means of =org-narrow-to-table=.
|
|||||||
(define-key ctl-x-map (kbd "C-n") #'narrow-or-widen-dwim)
|
(define-key ctl-x-map (kbd "C-n") #'narrow-or-widen-dwim)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Synchronal multiple-region editing
|
** [[https://github.com/victorhge/iedit#readme][Synchronal multiple-region editing]]
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: sec:synchronal-multiple-region-editing
|
||||||
|
:END:
|
||||||
|
|
||||||
#+caption[Enable =iedit=]:
|
#+caption[Enable =iedit=]:
|
||||||
#+caption: Enable =iedit=.
|
#+caption: Enable =iedit=.
|
||||||
@ -2010,7 +2016,10 @@ on tables by means of =org-narrow-to-table=.
|
|||||||
(require 'iedit nil 'noerror))
|
(require 'iedit nil 'noerror))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Extraneous whitespace trimming
|
** [[https://github.com/lewang/ws-butler#readme][Unobtrusive whitespace trimming]]
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: sec:unobtrusive-whitespace-trimming
|
||||||
|
:END:
|
||||||
|
|
||||||
#+caption[Configure =ws-butler=]:
|
#+caption[Configure =ws-butler=]:
|
||||||
#+caption: Configure =ws-butler=.
|
#+caption: Configure =ws-butler=.
|
||||||
@ -2102,7 +2111,7 @@ LaTeX, Org, and Python.
|
|||||||
(show-smartparens-global-mode +1)))
|
(show-smartparens-global-mode +1)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Electric operators
|
** [[https://github.com/davidshepherd7/electric-operator#readme][Electric operators]]
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: sec:electric-operators
|
:CUSTOM_ID: sec:electric-operators
|
||||||
:END:
|
:END:
|
||||||
@ -2120,7 +2129,7 @@ code formatter for Python]].
|
|||||||
(add-hook 'python-mode-hook #'electric-operator-mode))
|
(add-hook 'python-mode-hook #'electric-operator-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Smart snippets
|
** [[https://joaotavora.github.io/yasnippet/][Smart snippets]]
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: sec:smart-snippets
|
:CUSTOM_ID: sec:smart-snippets
|
||||||
:END:
|
:END:
|
||||||
@ -2136,8 +2145,14 @@ code formatter for Python]].
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* [[https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00775.html][Appearance]]
|
* [[https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00775.html][Appearance]]
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: sec:appearance
|
||||||
|
:END:
|
||||||
|
|
||||||
** [[info:emacs#Faces][Text faces (or styles)]]
|
** [[info:emacs#Faces][Text faces (or styles)]]
|
||||||
|
:PROPERTIES:
|
||||||
|
: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
|
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:
|
boils down to two rules:
|
||||||
@ -2146,8 +2161,11 @@ boils down to two rules:
|
|||||||
2. The heights of all other faces must be real numbers to scale those heights
|
2. The heights of all other faces must be real numbers to scale those heights
|
||||||
with respect to the height of the face (those heights default to 1.0 for no
|
with respect to the height of the face (those heights default to 1.0 for no
|
||||||
scaling).
|
scaling).
|
||||||
|
|
||||||
The code in listing [[lst:configure-face-attributes]] source implements those rules.
|
The code in listing [[lst:configure-face-attributes]] source implements those rules.
|
||||||
|
In case of proper initialization of all face heigths, font scaling is easy as
|
||||||
|
listing [[lst:my-set-default-face-height]] shows. Finally, the code in listing
|
||||||
|
[[lst:my-invert-default-face]] allows swapping the foreground and background colors
|
||||||
|
of the default face on all frames.
|
||||||
|
|
||||||
#+caption[Configure =face-attributse=]:
|
#+caption[Configure =face-attributse=]:
|
||||||
#+caption: Configure =face-attributes=.
|
#+caption: Configure =face-attributes=.
|
||||||
@ -2170,9 +2188,6 @@ The code in listing [[lst:configure-face-attributes]] source implements those ru
|
|||||||
(set-face-attribute 'variable-pitch nil :family "DejaVu Sans"))))
|
(set-face-attribute 'variable-pitch nil :family "DejaVu Sans"))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
In case of proper initialization of all face heigths, font scaling is easy as
|
|
||||||
the the code in [[lst:my-set-default-face-height]] shows.
|
|
||||||
|
|
||||||
#+caption[Implement =my-set-default-face-height=]:
|
#+caption[Implement =my-set-default-face-height=]:
|
||||||
#+caption: Implement =my-set-default-face-height=.
|
#+caption: Implement =my-set-default-face-height=.
|
||||||
#+name: lst:my-set-default-face-height
|
#+name: lst:my-set-default-face-height
|
||||||
@ -2193,9 +2208,6 @@ the the code in [[lst:my-set-default-face-height]] shows.
|
|||||||
(set-face-attribute 'default nil :height height))))
|
(set-face-attribute 'default nil :height height))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Listing [[lst:my-invert-default-face]] allows swapping the foreground and background
|
|
||||||
colors of the default face on all frames.
|
|
||||||
|
|
||||||
#+caption[Implement =my-invert-default-face=]:
|
#+caption[Implement =my-invert-default-face=]:
|
||||||
#+caption: Implement =my-invert-default-face=.
|
#+caption: Implement =my-invert-default-face=.
|
||||||
#+name: lst:my-invert-default-face
|
#+name: lst:my-invert-default-face
|
||||||
@ -2208,6 +2220,9 @@ colors of the default face on all frames.
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** [[https://jblevins.org/log/rainbow-mode][Visualize color codes and names]]
|
** [[https://jblevins.org/log/rainbow-mode][Visualize color codes and names]]
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: sec:rainbow-mode
|
||||||
|
:END:
|
||||||
|
|
||||||
Listing [[lst:enable-rainbow-mode]] enables =rainbow-mode= to colorize color codes
|
Listing [[lst:enable-rainbow-mode]] enables =rainbow-mode= to colorize color codes
|
||||||
and names in buffers for debugging.
|
and names in buffers for debugging.
|
||||||
@ -2231,6 +2246,9 @@ and names in buffers for debugging.
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** [[info:emacs#Custom Themes][Custom Themes (info)]]
|
** [[info:emacs#Custom Themes][Custom Themes (info)]]
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: sec:custom-themes
|
||||||
|
:END:
|
||||||
|
|
||||||
This setup prefers the ~leuven~ and ~leuven-dark~ themes because the
|
This setup prefers the ~leuven~ and ~leuven-dark~ themes because the
|
||||||
~modus-operandi~ and ~modus-vivendi~ themes feel quirky: for instance those
|
~modus-operandi~ and ~modus-vivendi~ themes feel quirky: for instance those
|
||||||
@ -2282,6 +2300,9 @@ themes fail to display ~hl-line-mode~ properly with Emacs-27.2 on Darwin.
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** [[https://karthinks.com/software/batteries-included-with-emacs/][Flash the line around point for visual feedback]]
|
** [[https://karthinks.com/software/batteries-included-with-emacs/][Flash the line around point for visual feedback]]
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: sec:flash-line-around-point
|
||||||
|
:END:
|
||||||
|
|
||||||
#+caption[Implement =my-pulse-one-line=]:
|
#+caption[Implement =my-pulse-one-line=]:
|
||||||
#+caption: Implement =my-pulse-one-line=.
|
#+caption: Implement =my-pulse-one-line=.
|
||||||
@ -2303,8 +2324,14 @@ themes fail to display ~hl-line-mode~ properly with Emacs-27.2 on Darwin.
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Applications
|
* Applications
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: sec:applications
|
||||||
|
:END:
|
||||||
|
|
||||||
** Feed reader
|
** [[https://github.com/skeeto/elfeed#readme][Elfeed: Emacs web feed reader]]
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: sec:emacs-web-feed-reader
|
||||||
|
:END:
|
||||||
|
|
||||||
#+caption[Enable =elfeed=]:
|
#+caption[Enable =elfeed=]:
|
||||||
#+caption: Enable =elfeed=.
|
#+caption: Enable =elfeed=.
|
||||||
@ -2335,7 +2362,10 @@ themes fail to display ~hl-line-mode~ properly with Emacs-27.2 on Darwin.
|
|||||||
("https://www.lemonde.fr/blog/huet/feed/" sciences)))))
|
("https://www.lemonde.fr/blog/huet/feed/" sciences)))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Multi-media system
|
** [[info:emms#Top][Emacs Multimedia System (info)]]
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: sec:emacs-multimedia-system
|
||||||
|
:END:
|
||||||
|
|
||||||
#+caption[Enable =emms=]:
|
#+caption[Enable =emms=]:
|
||||||
#+caption: Enable =emms=.
|
#+caption: Enable =emms=.
|
||||||
|
Loading…
Reference in New Issue
Block a user