Compare commits
4 Commits
3bee5ba2a4
...
52e5e50ad0
Author | SHA1 | Date | |
---|---|---|---|
52e5e50ad0 | |||
65f01b03c0 | |||
47c25f53ee | |||
c3ac03da92 |
121
README.org
121
README.org
@ -209,6 +209,7 @@ of [[info:emacs#Saving Customizations][saving customizations (info)]].
|
||||
;; Known problem: EasyPG fails to save files encrypted with GnuPG v2.4.1.
|
||||
;; Darwin: brew install gnupg@2.2
|
||||
epg-pinentry-mode 'loopback
|
||||
fido-mode t
|
||||
global-hl-line-mode t
|
||||
global-hl-line-sticky-flag t
|
||||
history-delete-duplicates t
|
||||
@ -216,7 +217,6 @@ of [[info:emacs#Saving Customizations][saving customizations (info)]].
|
||||
indent-tabs-mode nil
|
||||
inhibit-startup-buffer-menu t
|
||||
inhibit-startup-screen t
|
||||
initial-buffer-choice t
|
||||
initial-scratch-message ""
|
||||
isearch-lazy-count t
|
||||
kill-ring-max 300
|
||||
@ -1520,19 +1520,17 @@ configures =company= after ensuring the =company= installation.
|
||||
#+caption: Setup =company=.
|
||||
#+name: lst:setup-company
|
||||
#+begin_src emacs-lisp -n :results silent
|
||||
(when (and (ensure-package-installation 'company)
|
||||
(fboundp 'company-mode))
|
||||
(when (ensure-package-installation 'company)
|
||||
;; https://github.com/purcell/emacs.d/issues/778
|
||||
(setopt company-transformers '(company-sort-by-occurrence))
|
||||
(dolist (symbol '(LaTeX-mode-hook
|
||||
org-mode-hook
|
||||
emacs-lisp-mode-hook
|
||||
lisp-interaction-mode-hook
|
||||
lisp-mode-hook
|
||||
python-mode-hook
|
||||
ielm-mode-hook
|
||||
sly-mrepl-mode-hook))
|
||||
(add-hook symbol #'company-mode)))
|
||||
(add-hook 'LaTeX-mode-hook #'company-mode)
|
||||
(add-hook 'org-mode-hook #'company-mode)
|
||||
(add-hook 'emacs-lisp-mode-hook #'company-mode)
|
||||
(add-hook 'lisp-interaction-mode-hook #'company-mode)
|
||||
(add-hook 'lisp-mode-hook #'company-mode)
|
||||
(add-hook 'python-mode-hook #'company-mode)
|
||||
(add-hook 'ielm-mode-hook #'company-mode)
|
||||
(add-hook 'sly-mrepl-mode-hook #'company-mode))
|
||||
#+end_src
|
||||
|
||||
* [[info:emacs#Search][Search and replace (info)]]
|
||||
@ -1705,7 +1703,7 @@ regexp strings.
|
||||
#+caption: Ensure =xr= installation.
|
||||
#+name: lst:ensure-xr-installation
|
||||
#+begin_src emacs-lisp -n :results silent
|
||||
(when (ensure-package-installation 'xr) t)
|
||||
(ensure-package-installation 'xr)
|
||||
#+end_src
|
||||
|
||||
* [[info:emacs#Version Control][Version Control (info)]]
|
||||
@ -1857,8 +1855,7 @@ Listing [[lst:configure-nov]] configures [[https://depp.brause.cc/nov.el/][nov.e
|
||||
#+caption: Configure =nov=.
|
||||
#+name: lst:configure-nov
|
||||
#+begin_src emacs-lisp -n :results silent
|
||||
(when (and (ensure-package-installation 'nov)
|
||||
(fboundp 'nov-mode))
|
||||
(when (ensure-package-installation 'nov)
|
||||
(add-to-list 'auto-mode-alist `(,(rx ".epub" eos) . nov-mode)))
|
||||
#+end_src
|
||||
|
||||
@ -1881,8 +1878,7 @@ file.
|
||||
#+caption: Setup =pdf-tools=.
|
||||
#+name: lst:setup-pdf-tools
|
||||
#+begin_src emacs-lisp -n :results silent
|
||||
(when (and (ensure-package-installation 'pdf-tools)
|
||||
(fboundp 'pdf-loader-install))
|
||||
(when (ensure-package-installation 'pdf-tools)
|
||||
;; Use `pdf-loader-install' for faster startup than with `pdf-tools-install'.
|
||||
(pdf-loader-install)
|
||||
|
||||
@ -2149,9 +2145,7 @@ list detailing and motivating each listing:
|
||||
"\\documentclass[preview]{standalone}\n")))
|
||||
|
||||
(with-eval-after-load 'ob-lisp
|
||||
;; Default to `sly-eval' whenever feasible:
|
||||
(when (and (package-installed-p 'sly)
|
||||
(fboundp 'sly-eval))
|
||||
(when (package-installed-p 'sly)
|
||||
(setopt org-babel-lisp-eval-fn #'sly-eval)))
|
||||
#+end_src
|
||||
|
||||
@ -3889,9 +3883,7 @@ it for this buffer is by typing {{{kbd(C-c C-e t U)}}} to export the it to a
|
||||
#+caption: Configure =writegood-mode=.
|
||||
#+name: lst:configure-writegood-mode
|
||||
#+begin_src emacs-lisp -n :results silent
|
||||
(when (and (ensure-package-installation 'writegood-mode)
|
||||
(fboundp 'writegood-mode))
|
||||
|
||||
(when (ensure-package-installation 'writegood-mode)
|
||||
(add-hook 'after-init-hook
|
||||
(defun on-after-change-mode-hook-enable-writegood-mode ()
|
||||
(add-hook 'after-change-major-mode-hook
|
||||
@ -3921,15 +3913,7 @@ true in case document headlines contain links. The code in listing
|
||||
#+name: lst:setup-which-function-mode
|
||||
#+begin_src emacs-lisp -n :results silent
|
||||
(with-eval-after-load 'which-func
|
||||
(setopt which-func-modes
|
||||
'(emacs-lisp-mode org-mode pdf-view-mode)))
|
||||
|
||||
;; It looks like `python-mode' does nothing when it is an element of
|
||||
;; `which-func-modes'.
|
||||
|
||||
;; (setopt which-func-modes t)
|
||||
|
||||
;; (setopt which-func-display 'header) ;; AFAIU, fails on my system.
|
||||
(setopt which-func-modes '(emacs-lisp-mode org-mode pdf-view-mode)))
|
||||
#+end_src
|
||||
|
||||
#+caption[Define functions for ~which-func-functions~]:
|
||||
@ -4114,79 +4098,6 @@ Call `widen' after an `user-error'."
|
||||
(widen))))
|
||||
#+end_src
|
||||
|
||||
#+caption: Real sessions for ~eval-buffer~ in ~org-src~ buffers.
|
||||
#+begin_src org -n :tangle eval-buffer-in-org-src-buffers.org
|
||||
,#+title: Sessions for ~eval-buffer~ in ~org-src~ buffers
|
||||
,#+property: :tangle none
|
||||
|
||||
,* Real sessions in ~org-src-mode~ buffers
|
||||
|
||||
,#+header: :wrap "src text"
|
||||
,#+begin_src python :results output :session
|
||||
print("Hello *Python*!")
|
||||
,#+end_src
|
||||
|
||||
,#+RESULTS:
|
||||
,#+begin_src text
|
||||
Hello *Python*!
|
||||
,#+end_src
|
||||
|
||||
,#+header: :wrap "src text"
|
||||
,#+begin_src python :results output :session Python
|
||||
print("Hello *Python*!")
|
||||
,#+end_src
|
||||
|
||||
,#+RESULTS:
|
||||
,#+begin_src text
|
||||
Hello *Python*!
|
||||
,#+end_src
|
||||
|
||||
,#+header: :wrap "src text"
|
||||
,#+begin_src python :results output :session snake
|
||||
print("Hello *snake*!")
|
||||
,#+end_src
|
||||
|
||||
,#+RESULTS:
|
||||
,#+begin_src text
|
||||
Hello *snake*!
|
||||
,#+end_src
|
||||
#+end_src
|
||||
|
||||
#+caption: Fake sessions for ~eval-buffer~ in ~org-src~ buffers.
|
||||
#+begin_src org -n :tangle eval-buffer-in-org-src-buffers.org
|
||||
,* Fake sessions in ~org-src-mode~ buffers
|
||||
|
||||
,#+header: :wrap "src text"
|
||||
,#+begin_src python :results output :session none
|
||||
print("Hello *none*!")
|
||||
,#+end_src
|
||||
|
||||
,#+RESULTS:
|
||||
,#+begin_src text
|
||||
Hello *none*!
|
||||
,#+end_src
|
||||
|
||||
,#+header: :wrap "src text"
|
||||
,#+begin_src python :results output :session :default
|
||||
print("Hello *Python* with `:default' unseen!")
|
||||
,#+end_src
|
||||
|
||||
,#+RESULTS:
|
||||
,#+begin_src text
|
||||
Hello *Python* with `:default' unseen!
|
||||
,#+end_src
|
||||
|
||||
,#+header: :wrap "src text"
|
||||
,#+begin_src python :results output :session ":default"
|
||||
print("Hello *Python* with `*:default*' seen!")
|
||||
,#+end_src
|
||||
|
||||
,#+RESULTS:
|
||||
,#+begin_src text
|
||||
Hello *Python* with `*:default*' seen!
|
||||
,#+end_src
|
||||
#+end_src
|
||||
|
||||
** [[https://github.com/lassik/emacs-format-all-the-code#readme][Format-all]]
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: sec:format-all
|
||||
|
Loading…
Reference in New Issue
Block a user