Ensure electric-operator, nov, and sly installation in sections
This commit is contained in:
parent
99c82b0fc1
commit
e6be2d9502
83
README.org
83
README.org
@ -212,7 +212,6 @@ The [[info:emacs#Init File][init file (info)]] does not load the ~custom-file~ a
|
|||||||
consult ; consult completing-read
|
consult ; consult completing-read
|
||||||
deadgrep ; use ripgrep from Emacs
|
deadgrep ; use ripgrep from Emacs
|
||||||
eglot ; Emacs polyGLOT LSP client
|
eglot ; Emacs polyGLOT LSP client
|
||||||
electric-operator ; automatic spacing around operators
|
|
||||||
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
|
iedit ; simultaneous multi-entity editing
|
||||||
@ -220,7 +219,6 @@ The [[info:emacs#Init File][init file (info)]] does not load the ~custom-file~ a
|
|||||||
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
|
||||||
nov ; EPUB reader
|
|
||||||
orderless ; Emacs completion style
|
orderless ; Emacs completion style
|
||||||
org ; plain text thought organizer
|
org ; plain text thought organizer
|
||||||
org-menu ; transient menu for org-mode
|
org-menu ; transient menu for org-mode
|
||||||
@ -228,7 +226,6 @@ The [[info:emacs#Init File][init file (info)]] does not load the ~custom-file~ a
|
|||||||
python ; mode to edit Python code
|
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
|
||||||
sly ; Sylvester the Cat's Common Lisp IDE
|
|
||||||
smartparens ; smart editing of character pairs
|
smartparens ; smart editing of character pairs
|
||||||
vertico ; VERTical Interactive Completion
|
vertico ; VERTical Interactive Completion
|
||||||
wgrep ; open a writable grep buffer
|
wgrep ; open a writable grep buffer
|
||||||
@ -1209,14 +1206,16 @@ the command line [[https://en.wikipedia.org/wiki/DjVu][DjVu]] decoder =ddjvu= fr
|
|||||||
:CUSTOM_ID: sec:reading-epub-files
|
:CUSTOM_ID: sec:reading-epub-files
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
Listing [[lst:enable-nov-mode]] enables =nov-mode=.
|
The package [[https://depp.brause.cc/nov.el/][nov.el]] provides a major mode for reading EPUB files in Emacs.
|
||||||
|
Listing [[lst:configure-nov]] configures [[https://depp.brause.cc/nov.el/][nov.el]].
|
||||||
|
|
||||||
#+caption[Enable =nov-mode=]:
|
#+caption[Configure =nov=]:
|
||||||
#+caption: Enable =nov-mode=.
|
#+caption: Configure =nov=.
|
||||||
#+name: lst:enable-nov-mode
|
#+name: lst:configure-nov
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(when (fboundp 'nov-mode)
|
(when (ensure-package-installation 'nov)
|
||||||
(add-to-list 'auto-mode-alist `(,(rx ".epub" eos) . nov-mode)))
|
(when (fboundp 'nov-mode)
|
||||||
|
(add-to-list 'auto-mode-alist `(,(rx ".epub" eos) . nov-mode))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Reading PDF files
|
** Reading PDF files
|
||||||
@ -2525,34 +2524,35 @@ Listing [[lst:sbcl-core-for-sly]] tangles to a script to dump such a [[http://ww
|
|||||||
#+caption: Configure =sly=.
|
#+caption: Configure =sly=.
|
||||||
#+name: lst:configure-sly
|
#+name: lst:configure-sly
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(with-eval-after-load 'sly
|
(when (ensure-package-installation 'sly)
|
||||||
(custom-set-variables
|
(with-eval-after-load 'sly
|
||||||
;; Customize `sly-default-lisp' instead of `inferior-lisp-program',
|
(custom-set-variables
|
||||||
;; because `sly' uses `inferior-lisp-program' only as a backwards
|
;; Customize `sly-default-lisp' instead of `inferior-lisp-program',
|
||||||
;; compatibility fallback option.
|
;; because `sly' uses `inferior-lisp-program' only as a backwards
|
||||||
'(sly-default-lisp 'sbcl)
|
;; compatibility fallback option.
|
||||||
`(sly-lisp-implementations
|
'(sly-default-lisp 'sbcl)
|
||||||
'((sbcl (,(executable-find "sbcl")
|
`(sly-lisp-implementations
|
||||||
"--core"
|
'((sbcl (,(executable-find "sbcl")
|
||||||
,(no-littering-expand-var-file-name "sbcl.core-for-sly"))))))
|
"--core"
|
||||||
|
,(no-littering-expand-var-file-name "sbcl.core-for-sly"))))))
|
||||||
|
|
||||||
(add-hook 'sly-mode-hook
|
(add-hook 'sly-mode-hook
|
||||||
(defun on-sly-mode-hook ()
|
(defun on-sly-mode-hook ()
|
||||||
(unless (sly-connected-p)
|
(unless (sly-connected-p)
|
||||||
(save-excursion (sly)))))
|
(save-excursion (sly)))))
|
||||||
|
|
||||||
(cond
|
(cond
|
||||||
((eq system-type 'darwin)
|
((eq system-type 'darwin)
|
||||||
(setq common-lisp-hyperspec-root
|
(setq common-lisp-hyperspec-root
|
||||||
"file:///usr/local/share/doc/hyperspec/HyperSpec/")
|
"file:///usr/local/share/doc/hyperspec/HyperSpec/")
|
||||||
(setq common-lisp-hyperspec-symbol-table
|
(setq common-lisp-hyperspec-symbol-table
|
||||||
(concat common-lisp-hyperspec-root "Data/Map_Sym.txt")))
|
(concat common-lisp-hyperspec-root "Data/Map_Sym.txt")))
|
||||||
((eq system-type 'gnu/linux)
|
((eq system-type 'gnu/linux)
|
||||||
(setq common-lisp-hyperspec-root
|
(setq common-lisp-hyperspec-root
|
||||||
"file:///usr/share/doc/hyperspec-7.0/HyperSpec/"))
|
"file:///usr/share/doc/hyperspec-7.0/HyperSpec/"))
|
||||||
(t (message "Default Common Lisp HyperSpec access")))
|
(t (message "Default Common Lisp HyperSpec access")))
|
||||||
|
|
||||||
(define-key sly-prefix-map (kbd "M-h") #'sly-documentation-lookup))
|
(define-key sly-prefix-map (kbd "M-h") #'sly-documentation-lookup)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+caption[Script to dump a SBCL core for the Sly Common Lisp IDE]:
|
#+caption[Script to dump a SBCL core for the Sly Common Lisp IDE]:
|
||||||
@ -3278,17 +3278,18 @@ contrary to for instance [[https://github.com/Fanael/rainbow-delimiters#readme][
|
|||||||
:CUSTOM_ID: sec:electric-operators
|
:CUSTOM_ID: sec:electric-operators
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
Listing [[lst:configure-electric-operator-mode]] configures =electric-operator-mode=
|
Listing [[lst:configure-electric-operator]] configures =electric-operator-mode=
|
||||||
to add spaces around operators for compatibility with for instance the [[https://black.readthedocs.io/en/stable/][Black
|
to add spaces around operators for compatibility with for instance the [[https://black.readthedocs.io/en/stable/][Black
|
||||||
code formatter for Python]].
|
code formatter for Python]].
|
||||||
|
|
||||||
#+caption[Configure =electric-operator-mode=]:
|
#+caption[Configure =electric-operator=]:
|
||||||
#+caption: Configure =electric-operator-mode=.
|
#+caption: Configure =electric-operator=.
|
||||||
#+name: lst:configure-electric-operator-mode
|
#+name: lst:configure-electric-operator
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(when (fboundp 'electric-operator-mode)
|
(when (ensure-package-installation 'electric-operator)
|
||||||
(add-hook 'c-mode-common #'electric-operator-mode)
|
(when (fboundp 'electric-operator-mode)
|
||||||
(add-hook 'python-mode-hook #'electric-operator-mode))
|
(add-hook 'c-mode-common #'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]]
|
||||||
|
Loading…
Reference in New Issue
Block a user