Take advantage of Emacs 28 features

Including the ability to jump directly to an Info manual.
This commit is contained in:
Howard Abrams 2022-04-09 09:02:37 -07:00
parent 35e41b1ee9
commit 093a6d7ee1
2 changed files with 23 additions and 5 deletions

View file

@ -52,7 +52,8 @@ Or leave them in the current directory, but create an alias to =ls= to normally
I'm leaving them side-by-side, but I am keeping some extra copies:
#+BEGIN_SRC emacs-lisp
(setq auto-save-default t
(setq create-lockfiles nil ; Having .# files around ain't helpful
auto-save-default t
delete-old-versions t
kept-new-versions 6
kept-old-versions 2
@ -60,6 +61,13 @@ I'm leaving them side-by-side, but I am keeping some extra copies:
#+END_SRC
The [[help:version-control][version-control]] variable affect backups (not some sort of global VC setting), this makes numeric backups.
Changes and settings I like introduced in Emacs 28:
#+BEGIN_SRC emacs-lisp
(setq use-short-answers t
describe-bindings-outline t
completions-detailed t)
#+END_SRC
As [[https://tecosaur.github.io/emacs-config/config.html][tec wrote]], I want to use =~/.authsource.gpg= as I dont want to accidentaly purge this file cleaning =~/.emacs.d=, and let's cache as much as possible, as my home machine is pretty safe, and my laptop is shutdown a lot. Also, as [[https://www.bytedude.com/gpg-in-emacs/][bytedude]] mentions, I need to se the =epa-pineentry-mode= to =loopback= to actually get a prompt for the password, instead of an error.
#+BEGIN_SRC emacs-lisp
@ -358,6 +366,7 @@ Can we change Evil at this point? Some tips:
(use-package evil
:init
(setq evil-undo-system 'undo-fu
evil-want-fine-undo t ; Be more like Emacs
evil-disable-insert-state-bindings t
evil-want-keybinding nil
evil-want-integration t
@ -391,7 +400,7 @@ Using the key-chord project allows me to make Escape be on two key combo presses
(key-chord-define-global "jk" 'evil-normal-state)
(key-chord-define-global "JK" 'evil-normal-state))
#+END_SRC
** Evil Collection
*** Evil Collection
Dropping into Emacs state is better than pure Evil state for applications, however, [[https://github.com/emacs-evil/evil-collection][the evil-collection package]] creates a hybrid between the two, that I like.
#+BEGIN_SRC emacs-lisp
@ -829,26 +838,33 @@ Or simply connect the =help-map= (not that we wants it /value/):
(ha-leader "'" `("help" . ,help-map))
#+END_SRC
But I decided to tweak the help menu, so I craft my own:
Since I decided to tweak the help menu, so I craft my own:
#+BEGIN_SRC emacs-lisp
(ha-leader
"h" '(:ignore t :which-key "help")
"h a" '("apropos" . apropos-command)
"h c" '("elisp cheatsheet" . shortdoc-display-group)
"h e" '("errors" . view-echo-area-messages)
"h E" '("emacs-lisp" . (lambda () (interactive) (info "elisp")))
"h f" '("function" . describe-function)
"h F" '("font" . describe-font)
"h =" '("face" . describe-face)
"h k" '("key binding" . describe-key)
"h K" '("key map" . describe-keymap)
"h m" '("mode" . describe-mode)
"h p" '("package" . describe-package)
"h s" '("symbol" . info-lookup-symbol)
"h v" '("variable" . describe-variable)
"h B" '("embark" . embark-bindings)
"h i" '("info" . info)
"h I" '("info jump" . info-apropos))
"h I" '("info manual" . info-display-manual)
"h j" '("info jump" . info-apropos))
#+END_SRC
Remember these keys in the *Help* buffer:
- ~s~ :: view source of the function
- ~i~ :: view info manual of the function
Let's make Info behave a little more VI-like:
#+BEGIN_SRC emacs-lisp
(use-package info

View file

@ -47,7 +47,9 @@ Oh, and as I indent lists, they should change the /bulleting/ in a particular se
The =org-indent-indentation-per-level=, which defaults to =2= doesnt really work well with variable-width fonts, so lets make the spaces at the beginning of the line fixed:
#+BEGIN_SRC emacs-lisp
(set-face-attribute 'org-indent nil :inherit 'fixed-pitch)
(use-package org
:config
(set-face-attribute 'org-indent nil :inherit 'fixed-pitch))
#+END_SRC
** Typographic Quotes
According to [[http://endlessparentheses.com/prettify-your-quotation-marks.html][Artur Malabarba]] of [[http://endlessparentheses.com/prettify-you-apostrophes.html][Endless Parenthesis]] blog, I type a /straight quote/, ", Emacs actually inserts Unicode rounded quotes, like “this”. This idea isnt how a file is /displayed/, but actually how the file is /made/. Time will tell if this idea works with my auxiliary functions on my phone, like [[https://play.google.com/store/apps/details?id=com.orgzly&hl=en_US&gl=US][Orgzly]] and [[https://github.com/amake/orgro][Orgro]].