Ignoring my theme for my website and writing the style myself.

Plus a bug fix for mail.
This commit is contained in:
Howard Abrams 2024-10-20 21:40:36 -07:00
parent f1ddcec3ab
commit de7770280a
3 changed files with 39 additions and 23 deletions

View file

@ -351,7 +351,7 @@ The [[https://gitlab.com/ideasman42/emacs-undo-fu][undo-fu]] isnt much to the
(global-set-key (kbd "s-S-z") 'undo-fu-only-redo))
#+end_src
While I usually use ~C-/~ for [[help:undo][undo]] (and ~C-?~ for [[help:undo-redo][redo]]), when Im on the Mac, I need to cover my bases.
While I generally use ~C-/~ for [[help:undo][undo]] (and ~C-?~ for [[help:undo-redo][redo]]), when Im on the Mac, I need to cover my bases.
** Leader Sequences
Pressing the ~SPACE~ can activate a /leader key sequence/ I define in my [[file:ha-leader.org][ha-leader]] file.
@ -367,16 +367,20 @@ Since I seldom remember keybindings, or even function names, for major-modes, I
(global-set-key (kbd "s-,") 'major-mode-hydra)
(setq major-mode-hydra-title-generator
'(lambda (mode)
(let ((title (thread-last mode
(symbol-name)
(string-replace "-" " ")
(string-replace " mode" "")
(s-titleize))))
(concat "ϻ " title " Commands")))))
'(lambda (mode)
(if (symbolp mode)
(setq mode (symbol-name mode))
(setq mode (pp-to-string mode)))
(let ((title (thread-last mode
(string-replace "-" " ")
(string-replace " mode" "")
(s-titleize))))
(concat "ϻ " title " Commands")))))
#+end_src
For this feature, I may want to pull it out into its own file, so as to keep all of its features together... however, those feature often /depend/ of the functions they are calling. If so, we would have a series like this:
Scattered throughout my configuration, I use =major-mode-hydra-define= where Im configuring that mode. For instance, for the built-in Info, I can make:
#+begin_src emacs-lisp
(use-package major-mode-hydra
:config
@ -464,7 +468,7 @@ In the shell, IDEs and other systems, the key binding is typically ~TAB~. In mod
*** Corfu
The default completion system either inserts the first option directly in the text (without cycling, so lets hope it gets it right the first time), or presents choices in another buffer (who wants to hop to it to select an expansion).
After using [[http://company-mode.github.io/][company]] for my completion back-end, I switch to [[https://github.com/minad/corfu][corfu]] as it works with the variable-spaced font of my org files (also see [[https://takeonrules.com/2022/01/17/switching-from-company-to-corfu-for-emacs-completion/][this essay]] for my initial motivation).
After using [[http://company-mode.github.io/][company]] for my completion back-end, I switched to [[https://github.com/minad/corfu][corfu]] as it works with the variable-spaced font of my org files (also see [[https://takeonrules.com/2022/01/17/switching-from-company-to-corfu-for-emacs-completion/][this essay]] for my initial motivation).
#+begin_src emacs-lisp
(use-package corfu
:custom

View file

@ -40,7 +40,12 @@ While the following packages come with Emacs, they aren't necessarily loaded:
Render my code with my font colors:
#+begin_src emacs-lisp :results silent
(use-package htmlize)
(use-package htmlize
:conf
;; But I turn the source code coloring off to use a CSS stylesheet I
;; control, as otherwise, switching between dark and light themes
;; make the code difficult to read:
(setq org-html-htmlize-output-type 'css))
#+end_src
Also, we need Jack, and his HTML prowess:
@ -132,7 +137,10 @@ My main blog made up a collection of org files:
(:link (@ :rel "shortcut icon" :href "/img/dragon-head.svg"))
(:link (@ :rel "icon" :href "/img/dragon.svg"))
(:link (@ :rel "me" :href "https://emacs.ch/@howard"))
(:meta (@ :http-equiv "X-Clacks-Overhead" :content "GNU Terry Pratchett"))))))
(:meta (@ :http-equiv "X-Clacks-Overhead" :content "Darol Allen"))
(:meta (@ :http-equiv "X-Clacks-Overhead" :content "George Vanecek"))
(:meta (@ :http-equiv "X-Clacks-Overhead" :content "Rick Cooper"))
(:meta (@ :http-equiv "X-Clacks-Overhead" :content "Terry Pratchett"))))))
#+end_src
Why not break out the images and other static files into a separate project:

View file

@ -3,7 +3,7 @@
#+date: 2020-09-18
#+tags: emacs org
#+startup: inlineimages
#+lastmod: [2024-10-19 Sat]
#+lastmod: [2024-10-20 Sun]
A literate programming file for configuring org-mode and those files.
@ -983,6 +983,10 @@ With overlapping goals to =write-good=, the [[https://github.com/amperser/prosel
#+begin_src sh
brew install proselint
#+end_src
And on Linux:
#+BEGIN_SRC sh
sudo apt install python3-proselint
#+END_SRC
Next, create a configuration file, =~/.config/proselint/config= file, to turn on/off checks:
#+begin_src js :tangle ~/.config/proselint/config.json :mkdirp yes
@ -1006,17 +1010,17 @@ And tell [[https://www.flycheck.org/][flycheck]] to use this:
*** Textlint
The [[https://textlint.github.io/][textlint]] project comes with =flycheck=, as long as there is an executable:
#+begin_src sh :results silent
npm install -g textlint
sudo npm install -g textlint
# And all the rules
npm install -g textlint-rule-alex
npm install -g textlint-rule-diacritics
npm install -g textlint-rule-en-max-word-count
npm install -g textlint-rule-max-comma
npm install -g textlint-rule-no-start-duplicated-conjunction
npm install -g textlint-rule-period-in-list-item
npm install -g textlint-rule-stop-words
npm install -g textlint-rule-terminology
npm install -g textlint-rule-unexpanded-acronym
sudo npm install -g textlint-rule-alex
sudo npm install -g textlint-rule-diacritics
sudo npm install -g textlint-rule-en-max-word-count
sudo npm install -g textlint-rule-max-comma
sudo npm install -g textlint-rule-no-start-duplicated-conjunction
sudo npm install -g textlint-rule-period-in-list-item
sudo npm install -g textlint-rule-stop-words
sudo npm install -g textlint-rule-terminology
sudo npm install -g textlint-rule-unexpanded-acronym
#+end_src
I create a configuration file in my home directory:
#+begin_src js :tangle ~/.textlintrc