Tidy
This commit is contained in:
parent
694e5a4b2a
commit
c9468db32a
70
README.org
70
README.org
@ -222,15 +222,12 @@ The [[info:emacs#Init File][init file (info)]] does not load the ~custom-file~ a
|
|||||||
eglot ; Emacs polyGLOT LSP client
|
eglot ; Emacs polyGLOT LSP client
|
||||||
embark ; act on any buffer selection
|
embark ; act on any buffer selection
|
||||||
htmlize ; convert buffer contents to HTML
|
htmlize ; convert buffer contents to HTML
|
||||||
iedit ; simultaneous multi-entity editing
|
|
||||||
magit ; Git Text-based User Interface
|
magit ; Git Text-based User Interface
|
||||||
marginalia ; minibuffer margin notes
|
marginalia ; minibuffer margin notes
|
||||||
no-littering ; keep `user-emacs-directory' clean
|
no-littering ; keep `user-emacs-directory' clean
|
||||||
orderless ; Emacs completion style
|
orderless ; Emacs completion style
|
||||||
org ; plain text thought organizer
|
|
||||||
org-menu ; transient menu for org-mode
|
org-menu ; transient menu for org-mode
|
||||||
pdf-tools ; interactive docview replacement
|
pdf-tools ; interactive docview replacement
|
||||||
python ; mode to edit Python code
|
|
||||||
quelpa ; install Emacs packages from source
|
quelpa ; install Emacs packages from source
|
||||||
saveplace-pdf-view ; save pdf-view and doc-view places
|
saveplace-pdf-view ; save pdf-view and doc-view places
|
||||||
smartparens ; smart editing of character pairs
|
smartparens ; smart editing of character pairs
|
||||||
@ -313,14 +310,13 @@ the contents of packages and allows to update packages to the latest version.
|
|||||||
;; Install and require `no-littering'.
|
;; Install and require `no-littering'.
|
||||||
(package-install 'no-littering)
|
(package-install 'no-littering)
|
||||||
(require 'no-littering)
|
(require 'no-littering)
|
||||||
;; Install and shadow `org'.
|
;; Shadow built-in `org' by installing `org'.
|
||||||
;; https://emacs.stackexchange.com/a/45939 answers
|
;; https://emacs.stackexchange.com/a/45939 answers
|
||||||
;; "How to install a package automatically that will shadow a built-in package?"
|
;; "How to shadow automatically a built-in package by installing it?"
|
||||||
(defun shadow-built-in-package (pkg)
|
(defun shadow-builtin-by-install (pkg)
|
||||||
(when-let ((desc (or (when (package-desc-p pkg) pkg)
|
(when-let ((desc (cadr (assq pkg package-archive-contents))))
|
||||||
(cadr (assq pkg package-archive-contents)))))
|
|
||||||
(package-install desc 'dont-select)))
|
(package-install desc 'dont-select)))
|
||||||
(shadow-built-in-package 'org)
|
(shadow-builtin-by-install 'org)
|
||||||
;; Install `quelpa'.
|
;; Install `quelpa'.
|
||||||
(unless (package-installed-p 'quelpa)
|
(unless (package-installed-p 'quelpa)
|
||||||
(package-install 'quelpa))
|
(package-install 'quelpa))
|
||||||
@ -1340,9 +1336,9 @@ Listing [[lst:configure-nov]] configures [[https://depp.brause.cc/nov.el/][nov.e
|
|||||||
#+caption: Configure =nov=.
|
#+caption: Configure =nov=.
|
||||||
#+name: lst:configure-nov
|
#+name: lst:configure-nov
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(when (ensure-package-installation 'nov)
|
(when (and (ensure-package-installation 'nov)
|
||||||
(when (fboundp 'nov-mode)
|
(fboundp 'nov-mode))
|
||||||
(add-to-list 'auto-mode-alist `(,(rx ".epub" eos) . nov-mode))))
|
(add-to-list 'auto-mode-alist `(,(rx ".epub" eos) . nov-mode)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Reading PDF files
|
** Reading PDF files
|
||||||
@ -2664,9 +2660,9 @@ the [[https://github.com/gromnitsky/wordnut#readme][wordnut]] prerequisites.
|
|||||||
#+caption: System check for =wordnut=.
|
#+caption: System check for =wordnut=.
|
||||||
#+name: lst:check-wordnut
|
#+name: lst:check-wordnut
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(when (ensure-package-installation 'wordnut)
|
(when (and (ensure-package-installation 'wordnut)
|
||||||
(unless (executable-find "wn")
|
(executable-find "wn"))
|
||||||
(message "`wordnut' fails to find the `wn' executable")))
|
(message "`wordnut' fails to find the `wn' executable"))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** [[https://github.com/bnbeckwith/writegood-mode#readme][Writegood mode]]
|
*** [[https://github.com/bnbeckwith/writegood-mode#readme][Writegood mode]]
|
||||||
@ -2682,7 +2678,8 @@ Listing [[lst:configure-writegood-mode]] configures [[https://github.com/bnbeckw
|
|||||||
#+caption: Configure =writegood-mode=.
|
#+caption: Configure =writegood-mode=.
|
||||||
#+name: lst:configure-writegood-mode
|
#+name: lst:configure-writegood-mode
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(when (ensure-package-installation 'writegood-mode)
|
(when (and (ensure-package-installation 'writegood-mode)
|
||||||
|
(fboundp 'writegood-mode))
|
||||||
(global-set-key (kbd "C-c g") #'writegood-mode))
|
(global-set-key (kbd "C-c g") #'writegood-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@ -2709,10 +2706,9 @@ Listing [[lst:configure-format-all]]:
|
|||||||
;; https://github.com/lassik/emacs-format-all-the-code#readme
|
;; https://github.com/lassik/emacs-format-all-the-code#readme
|
||||||
;; https://ianyepan.github.io/posts/format-all/
|
;; https://ianyepan.github.io/posts/format-all/
|
||||||
;; https://jamesaimonetti.com/posts/formatting-tangled-output-in-org-mode/
|
;; https://jamesaimonetti.com/posts/formatting-tangled-output-in-org-mode/
|
||||||
(when (ensure-package-installation 'format-all)
|
(when (and (ensure-package-installation 'format-all)
|
||||||
(when (fboundp 'format-all-ensure-formatter)
|
(fboundp 'format-all-ensure-formatter))
|
||||||
(add-hook 'prog-mode-hook #'format-all-ensure-formatter))
|
(add-hook 'prog-mode-hook #'format-all-ensure-formatter)
|
||||||
|
|
||||||
(add-hook
|
(add-hook
|
||||||
'org-babel-post-tangle-hook
|
'org-babel-post-tangle-hook
|
||||||
(defun format-all-org-babel-post-tangle ()
|
(defun format-all-org-babel-post-tangle ()
|
||||||
@ -3208,14 +3204,14 @@ Listing [[lst:configure-blacken]] configures [[https://github.com/pythonic-emacs
|
|||||||
#+caption: Configure =blacken=.
|
#+caption: Configure =blacken=.
|
||||||
#+name: lst:configure-blacken
|
#+name: lst:configure-blacken
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(when (ensure-package-installation 'blacken)
|
(when (and (ensure-package-installation 'blacken)
|
||||||
(when (fboundp 'blacken-buffer)
|
(fboundp 'blacken-buffer))
|
||||||
(defun advice-derived-python-mode-p (fn &rest args)
|
(defun advice-derived-python-mode-p (fn &rest args)
|
||||||
(if (derived-mode-p 'python-mode)
|
(if (derived-mode-p 'python-mode)
|
||||||
(apply fn args)
|
(apply fn args)
|
||||||
(message "Refusal to run %S, since buffer is in %S." fn major-mode)))
|
(message "Refusal to run %S, since buffer is in %S." fn major-mode)))
|
||||||
|
|
||||||
(advice-add 'blacken-buffer :around #'advice-derived-python-mode-p)))
|
(advice-add 'blacken-buffer :around #'advice-derived-python-mode-p))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** [[https://jedi.readthedocs.io/en/latest/][Jedi]]
|
*** [[https://jedi.readthedocs.io/en/latest/][Jedi]]
|
||||||
@ -3394,8 +3390,8 @@ setup and requires no configuration.
|
|||||||
#+caption: Enable =iedit=.
|
#+caption: Enable =iedit=.
|
||||||
#+name: lst:enable-iedit
|
#+name: lst:enable-iedit
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(with-eval-after-load 'emacs
|
(when (ensure-package-installation 'iedit)
|
||||||
(require 'iedit nil 'noerror))
|
(require 'iedit nil 'noedit))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** [[https://github.com/lewang/ws-butler#readme][Unobtrusive whitespace trimming]]
|
** [[https://github.com/lewang/ws-butler#readme][Unobtrusive whitespace trimming]]
|
||||||
@ -3407,12 +3403,12 @@ setup and requires no configuration.
|
|||||||
#+caption: Configure =ws-butler=.
|
#+caption: Configure =ws-butler=.
|
||||||
#+name: lst:configure-ws-butler
|
#+name: lst:configure-ws-butler
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(when (ensure-package-installation 'ws-butler)
|
(when (and (ensure-package-installation 'ws-butler)
|
||||||
(when (require 'ws-butler nil 'noerror)
|
(require 'ws-butler nil 'noerror))
|
||||||
(custom-set-variables
|
(custom-set-variables
|
||||||
'(ws-butler-keep-whitespace-before-point nil))
|
'(ws-butler-keep-whitespace-before-point nil))
|
||||||
(add-hook 'prog-mode-hook #'ws-butler-mode)
|
(add-hook 'prog-mode-hook #'ws-butler-mode)
|
||||||
(add-hook 'text-mode-hook #'ws-butler-mode)))
|
(add-hook 'text-mode-hook #'ws-butler-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** [[https://countvajhula.com/2021/09/25/the-animated-guide-to-symex/][Structural editing]]
|
** [[https://countvajhula.com/2021/09/25/the-animated-guide-to-symex/][Structural editing]]
|
||||||
@ -3505,10 +3501,10 @@ code formatter for Python]].
|
|||||||
#+caption: Configure =electric-operator=.
|
#+caption: Configure =electric-operator=.
|
||||||
#+name: lst:configure-electric-operator
|
#+name: lst:configure-electric-operator
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(when (ensure-package-installation 'electric-operator)
|
(when (and (ensure-package-installation 'electric-operator)
|
||||||
(when (fboundp 'electric-operator-mode)
|
(fboundp 'electric-operator-mode))
|
||||||
(add-hook 'c-mode-common #'electric-operator-mode)
|
(add-hook 'c-mode-common #'electric-operator-mode)
|
||||||
(add-hook 'python-mode-hook #'electric-operator-mode)))
|
(add-hook 'python-mode-hook #'electric-operator-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** [[https://joaotavora.github.io/yasnippet/][Smart snippets]]
|
** [[https://joaotavora.github.io/yasnippet/][Smart snippets]]
|
||||||
@ -3656,8 +3652,8 @@ and names in buffers for debugging.
|
|||||||
#+caption: Enable =rainbow-mode=.
|
#+caption: Enable =rainbow-mode=.
|
||||||
#+name: lst:enable-rainbow-mode
|
#+name: lst:enable-rainbow-mode
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(when (ensure-package-installation 'rainbow-mode)
|
(when (and (ensure-package-installation 'rainbow-mode)
|
||||||
(when (fboundp 'rainbow-mode)
|
(fboundp 'rainbow-mode))
|
||||||
(custom-set-variables
|
(custom-set-variables
|
||||||
'(rainbow-x-colors-major-mode-list
|
'(rainbow-x-colors-major-mode-list
|
||||||
'(c++-mode
|
'(c++-mode
|
||||||
@ -3668,7 +3664,7 @@ and names in buffers for debugging.
|
|||||||
lisp-interaction-mode
|
lisp-interaction-mode
|
||||||
org-mode
|
org-mode
|
||||||
python-mode)))
|
python-mode)))
|
||||||
(rainbow-mode +1)))
|
(rainbow-mode +1))
|
||||||
#+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]]
|
||||||
@ -3863,9 +3859,9 @@ enable =emms=.
|
|||||||
#+caption: Configure =elfeed=.
|
#+caption: Configure =elfeed=.
|
||||||
#+name: lst:configure-elfeed
|
#+name: lst:configure-elfeed
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(when (ensure-package-installation 'elfeed)
|
(when (and (ensure-package-installation 'elfeed)
|
||||||
(when (fboundp 'elfeed)
|
(fboundp 'elfeed))
|
||||||
(global-set-key (kbd "C-x w") #'elfeed))
|
(global-set-key (kbd "C-x w") #'elfeed)
|
||||||
|
|
||||||
(with-eval-after-load 'elfeed
|
(with-eval-after-load 'elfeed
|
||||||
(custom-set-variables
|
(custom-set-variables
|
||||||
|
Loading…
x
Reference in New Issue
Block a user