Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ea9cc0134 |
40 changed files with 206 additions and 531 deletions
|
|
@ -134,16 +134,11 @@ After Emacs is /kinda/ working, make sure you install *all* the fonts, that is:
|
||||||
M-x nerd-icons-install-fonts
|
M-x nerd-icons-install-fonts
|
||||||
#+end_example
|
#+end_example
|
||||||
|
|
||||||
Everything golden?
|
Everything golden? Great. Want to upgrade all the packages?
|
||||||
#+begin_example
|
#+begin_example
|
||||||
M-x straight-freeze-versions
|
M-x package-upgrade-all
|
||||||
#+end_example
|
#+end_example
|
||||||
|
|
||||||
Before we can build a Telegram server for [[file:ha-aux-apps.org::*Telega][Telega]], we need to install the /latest/ version:
|
|
||||||
#+begin_src sh
|
|
||||||
brew unlink tdlib # optional
|
|
||||||
brew install tdlib --HEAD
|
|
||||||
#+end_src
|
|
||||||
* Supporting Packages
|
* Supporting Packages
|
||||||
Now install all the extras:
|
Now install all the extras:
|
||||||
#+begin_src sh
|
#+begin_src sh
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,9 @@ I’ve crafted my Emacs configuration, I cheekily call /hamacs/, in a literate p
|
||||||
|
|
||||||
The advantage to rolling yer own is I tend to /use/ what I add, leading to less bloat. In reality, this is more fun.
|
The advantage to rolling yer own is I tend to /use/ what I add, leading to less bloat. In reality, this is more fun.
|
||||||
|
|
||||||
Using [[https://howardism.org/Technical/Emacs/literate-devops.html][literate programming]] for my Emacs configuration gives me an easy way to /share/ my code. Feel free to steal whatever you find interesting, as sharing makes our community great. Notice that functions and features I have written begin with =ha-=, but everything else is either /stock Emacs/ or a /package/ I download using [[https://github.com/raxod502/straight.el][straight]] (see [[file:bootstrap.org][bootstrap]] for the details) and configure with [[https://github.com/jwiegley/use-package][use-package]] (see either [[https://ianyepan.github.io/posts/setting-up-use-package/][this introduction]] or [[https://www.emacswiki.org/emacs/UsePackage][this wiki page]] for those details)… meaning most blocks of code should work on its own.
|
Using [[https://howardism.org/Technical/Emacs/literate-devops.html][literate programming]] for my Emacs configuration gives me an easy way to /share/ my code. Feel free to steal whatever you find interesting, as sharing makes our community great. Notice that functions and features I have written begin with =ha-=, but everything else is either /stock Emacs/ or a /package/ I download (see [[file:bootstrap.org][bootstrap]] for the details) and configure with the [[https://github.com/jwiegley/use-package][use-package]] macro (see either [[https://ianyepan.github.io/posts/setting-up-use-package/][this introduction]] or [[https://www.emacswiki.org/emacs/UsePackage][this wiki page]] for those details)… meaning most blocks of code should work on its own.
|
||||||
|
|
||||||
|
*Note:* I now require Emacs version 30, for a few packages can’t be automatically downloaded from an Emacs Package Archive (like ELPA or MELPA), and I take advantage of the new =:vc= feature of =use-package= to download those packages directly from their Git repository.
|
||||||
|
|
||||||
I’ve separated my configuration into /chapters/ around particular subjects, applications and programming languages. This feature allows you, dear reader, to jump our to items of interest, but allows me to /selectively load/ individual chapters. For instance, if I’m not doing much with Ruby at work, I can remove that chapter from the list in my [[file:bootstrap.org::*Load the Rest][bootstrap]]. I also don’t load my [[file:ha-display.org][UI configuration]] when I am using the Terminal (doesn’t happen much, actually).
|
I’ve separated my configuration into /chapters/ around particular subjects, applications and programming languages. This feature allows you, dear reader, to jump our to items of interest, but allows me to /selectively load/ individual chapters. For instance, if I’m not doing much with Ruby at work, I can remove that chapter from the list in my [[file:bootstrap.org::*Load the Rest][bootstrap]]. I also don’t load my [[file:ha-display.org][UI configuration]] when I am using the Terminal (doesn’t happen much, actually).
|
||||||
|
|
||||||
|
|
@ -26,7 +28,7 @@ To create [[file:~/.emacs.d/init.el][~/.emacs.d/init.el]] which starts the proce
|
||||||
|
|
||||||
[[file:screenshots/dashboard-small.png]]
|
[[file:screenshots/dashboard-small.png]]
|
||||||
** Core Configuration
|
** Core Configuration
|
||||||
- [[file:bootstrap.org][Bootstrap]] :: configures =straight= and loads basic libraries the rest of the code depends on. It then loads the following files in order.
|
- [[file:bootstrap.org][Bootstrap]] :: loads basic libraries the rest of the code depends on. It then loads the following files in order.
|
||||||
- [[file:ha-config.org][Configuration]] :: contains /most/ of my configuration, setting up my sequence key menus, evil, etc.
|
- [[file:ha-config.org][Configuration]] :: contains /most/ of my configuration, setting up my sequence key menus, evil, etc.
|
||||||
- [[file:ha-evil.org][Evilness]] :: configuration for using VI, er, ~vim~ keybindings in Emacs.
|
- [[file:ha-evil.org][Evilness]] :: configuration for using VI, er, ~vim~ keybindings in Emacs.
|
||||||
- [[file:ha-general.org][Leader]] :: using the ~SPC~ to kick off a hierarchical order of functions.
|
- [[file:ha-general.org][Leader]] :: using the ~SPC~ to kick off a hierarchical order of functions.
|
||||||
|
|
|
||||||
|
|
@ -35,11 +35,6 @@ A literate programming file for bootstraping my Emacs Configuration.
|
||||||
#+end_src
|
#+end_src
|
||||||
* Introduction
|
* Introduction
|
||||||
This file contains all the variable definitions and library loading for the other files in my project.
|
This file contains all the variable definitions and library loading for the other files in my project.
|
||||||
|
|
||||||
I'm installing everything using the [[https://github.com/raxod502/straight.el#getting-started][straight.el]] for package installation and management. This is initialization code configured in [[file:initialize][initialize]], and calls to =use-package= now accepts a =:quelpa= parameter that allows me to retrieve special versions of some packages.
|
|
||||||
|
|
||||||
See the details in [[https://dev.to/jkreeftmeijer/emacs-package-management-with-straight-el-and-use-package-3oc8][this essay]].
|
|
||||||
|
|
||||||
* Initial Settings
|
* Initial Settings
|
||||||
** Garbage Collection Settings
|
** Garbage Collection Settings
|
||||||
GC has always been a contentious subject in Emacs. Lot less of an issue now, but let’s not slow the startup (any more than I already do by checking all the packages to see if anything new needs to be downloaded).
|
GC has always been a contentious subject in Emacs. Lot less of an issue now, but let’s not slow the startup (any more than I already do by checking all the packages to see if anything new needs to be downloaded).
|
||||||
|
|
@ -107,7 +102,7 @@ Getting tired off all the packages that I load spewing a bunch of warnings that
|
||||||
The following packages come with Emacs, but seems like they still need loading:
|
The following packages come with Emacs, but seems like they still need loading:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package cl-lib
|
(use-package cl-lib
|
||||||
:ensure nil ; built-in
|
:ensure nil
|
||||||
:init (defun first (elt) (car elt))
|
:init (defun first (elt) (car elt))
|
||||||
:commands (first))
|
:commands (first))
|
||||||
|
|
||||||
|
|
@ -197,8 +192,7 @@ The following /defines/ the rest of my org-mode literate files, that I load late
|
||||||
`("ha-private.org"
|
`("ha-private.org"
|
||||||
,(when (display-graphic-p)
|
,(when (display-graphic-p)
|
||||||
"ha-theme.org"
|
"ha-theme.org"
|
||||||
"ha-display.org"
|
"ha-display.org")
|
||||||
)
|
|
||||||
"ha-config.org"
|
"ha-config.org"
|
||||||
;; We need to replace ha-general (loaded in config) with:
|
;; We need to replace ha-general (loaded in config) with:
|
||||||
;; "ha-leader.org"
|
;; "ha-leader.org"
|
||||||
|
|
|
||||||
|
|
@ -15,21 +15,16 @@
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(defvar beep-alert-sound-file
|
(defvar beep-alert-sound-file
|
||||||
(expand-file-name "~/src/hamacs/beep-notify.wav")
|
(expand-file-name "~/other/hamacs/beep-notify.wav")
|
||||||
"A WAV or AU file used at the completion of a function.")
|
"A WAV or AU file used at the completion of a function.")
|
||||||
|
|
||||||
;; My replacement in case we can't play internal sounds:
|
;; My replacement in case we can't play internal sounds:
|
||||||
(defun beep-beep (&rest _)
|
(defun beep-beep (&rest _)
|
||||||
"Play a default notification sound file.
|
"Play a default notification sound file.
|
||||||
Customize the variable, `beep-alert-sound-file' to adjust the sound."
|
Customize the variable, `beep-alert-sound-file' to adjust the sound."
|
||||||
(condition-case err
|
(if (fboundp 'play-sound-internal)
|
||||||
(play-sound-file beep-alert-sound-file)
|
(play-sound-file beep-alert-sound-file)
|
||||||
(error
|
(call-process-shell-command (format "afplay %s &" beep-alert-sound-file) nil 0)))
|
||||||
(cond
|
|
||||||
((= (call-process-shell-command "type aplay") 0)
|
|
||||||
(call-process-shell-command (format "aplay %s &" beep-alert-sound-file) nil 0))
|
|
||||||
((= (call-process-shell-command "type afplay") 0)
|
|
||||||
(call-process-shell-command (format "afplay %s &" beep-alert-sound-file) nil 0))))))
|
|
||||||
|
|
||||||
(defvar beep-speech-executable "say %s"
|
(defvar beep-speech-executable "say %s"
|
||||||
"An OS-dependent shell string to speak. Replaces `%s' with a phrase.")
|
"An OS-dependent shell string to speak. Replaces `%s' with a phrase.")
|
||||||
|
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
;;; evennia-mode --- Syntax coloring for Evennia code -*- lexical-binding: t; -*-
|
|
||||||
;;
|
|
||||||
;; © 2025 Howard X. Abrams
|
|
||||||
;; Licensed under a Creative Commons Attribution 4.0 International License.
|
|
||||||
;; See http://creativecommons.org/licenses/by/4.0/
|
|
||||||
;;
|
|
||||||
;; Author: Howard X. Abrams <http://gitlab.com/howardabrams>
|
|
||||||
;; Maintainer: Howard X. Abrams
|
|
||||||
;; Created: January 18, 2025
|
|
||||||
;;
|
|
||||||
;; While obvious, GNU Emacs does not include this file or project.
|
|
||||||
;;
|
|
||||||
;; *NB:* Do not edit this file. Instead, edit the original literate file at:
|
|
||||||
;; /Users/howard/src/hamacs/pud.org
|
|
||||||
;; And tangle the file to recreate this one.
|
|
||||||
;;
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(define-derived-mode evennia-mode ruby-mode "Evennia"
|
|
||||||
"Major mode for editing evennia batch command files.
|
|
||||||
\\{evennia-mode-map}
|
|
||||||
Turning on Evennia mode runs the normal hook `evennia-mode-hook'."
|
|
||||||
(setq-local require-final-newline mode-require-final-newline)
|
|
||||||
(setq-local comment-start "# ")
|
|
||||||
(setq-local comment-start-skip "#+\\s-*"))
|
|
||||||
|
|
||||||
;; Add the mode to the auto-mode-alist for specific file extensions
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.ev\\'" . evennia-mode))
|
|
||||||
|
|
||||||
;; Provide the mode for use
|
|
||||||
(provide 'evennia-mode)
|
|
||||||
|
|
@ -1,101 +0,0 @@
|
||||||
;;; ob-evennia --- Evennia source blocks in Org -*- lexical-binding: t; -*-
|
|
||||||
;;
|
|
||||||
;; © 2025 Howard X. Abrams
|
|
||||||
;; Licensed under a Creative Commons Attribution 4.0 International License.
|
|
||||||
;; See http://creativecommons.org/licenses/by/4.0/
|
|
||||||
;;
|
|
||||||
;; Author: Howard X. Abrams <http://gitlab.com/howardabrams>
|
|
||||||
;; Maintainer: Howard X. Abrams
|
|
||||||
;; Created: January 18, 2025
|
|
||||||
;;
|
|
||||||
;; While obvious, GNU Emacs does not include this file or project.
|
|
||||||
;;
|
|
||||||
;; *NB:* Do not edit this file. Instead, edit the original literate file at:
|
|
||||||
;; /Users/howard/src/hamacs/pud.org
|
|
||||||
;; And tangle the file to recreate this one.
|
|
||||||
;;
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(defun pud-get-all-buffers ()
|
|
||||||
"Return a list of all buffers with a live PUD connection."
|
|
||||||
(save-window-excursion
|
|
||||||
(seq-filter (lambda (buf)
|
|
||||||
(switch-to-buffer buf)
|
|
||||||
(and
|
|
||||||
(eq major-mode 'pud-mode)
|
|
||||||
(get-buffer-process (current-buffer))))
|
|
||||||
(buffer-list))))
|
|
||||||
|
|
||||||
(defun pud-current-world ()
|
|
||||||
"Return buffer based on user choice of current PUD connections."
|
|
||||||
(let ((pud-buffers (pud-get-all-buffers)))
|
|
||||||
(cond
|
|
||||||
((null pud-buffers) nil)
|
|
||||||
((length= pud-buffers 1) (car pud-buffers))
|
|
||||||
(t
|
|
||||||
(completing-read "Choose connection: "
|
|
||||||
(seq-map (lambda (buf) (buffer-name buf))
|
|
||||||
pud-buffers))))))
|
|
||||||
|
|
||||||
(defun pud-send-string (buf-name text)
|
|
||||||
"Send TEXT to a comint buffer, BUF-NAME."
|
|
||||||
(save-window-excursion
|
|
||||||
(save-excursion
|
|
||||||
(pop-to-buffer buf-name)
|
|
||||||
(goto-char (point-max))
|
|
||||||
(comint-send-string (get-buffer-process (current-buffer))
|
|
||||||
(format "%s\n" text)))))
|
|
||||||
|
|
||||||
(defun pud-send-line (world)
|
|
||||||
"Send the current line or region to WORLD."
|
|
||||||
(interactive (list (pud-current-world)))
|
|
||||||
(unless world
|
|
||||||
(error "No current MUD connection."))
|
|
||||||
|
|
||||||
(let ((text (buffer-substring-no-properties
|
|
||||||
(if (region-active-p) (region-beginning)
|
|
||||||
(beginning-of-line-text) (point))
|
|
||||||
(if (region-active-p) (region-end)
|
|
||||||
(end-of-line) (point)))))
|
|
||||||
(pud-send-string world text)))
|
|
||||||
|
|
||||||
(global-set-key (kbd "<f6>") 'pud-send-line)
|
|
||||||
|
|
||||||
(defun pud-send-block (world)
|
|
||||||
"Send the current Org block to WORLD."
|
|
||||||
(interactive (list (pud-current-world)))
|
|
||||||
(unless world
|
|
||||||
(error "No current MUD connection."))
|
|
||||||
(let ((text (thread-last (org-element-at-point)
|
|
||||||
(org-src--contents-area)
|
|
||||||
(nth 2))))
|
|
||||||
(pud-send-string world
|
|
||||||
(replace-regexp-in-string
|
|
||||||
(rx (one-or-more space)) " " text))))
|
|
||||||
|
|
||||||
(require 'ob)
|
|
||||||
|
|
||||||
(defvar org-babel-default-header-args:evennia '())
|
|
||||||
|
|
||||||
(defun org-babel-execute:evennia (body params)
|
|
||||||
"Execute evennia BODY.
|
|
||||||
|
|
||||||
PARAMS can contain the following:
|
|
||||||
:session - The buffer to send the block
|
|
||||||
|
|
||||||
Called by `org-babel-execute-src-block'."
|
|
||||||
(let* ((session (cdr (assq :session params)))
|
|
||||||
(buffer (or session (pud-current-world))))
|
|
||||||
(if session
|
|
||||||
(setq buffer (format "*%s*" session)))
|
|
||||||
|
|
||||||
(pud-send-string buffer
|
|
||||||
(replace-regexp-in-string
|
|
||||||
(rx (one-or-more space)) " " body))
|
|
||||||
(message "No connected world.")))
|
|
||||||
|
|
||||||
(defun org-babel-prep-session:evennia (_session _params)
|
|
||||||
"Signal error; Evennia does not (currently) support sessions."
|
|
||||||
(error "Evennia sessions are nonsensical"))
|
|
||||||
|
|
||||||
(provide 'ob-evennia)
|
|
||||||
|
|
@ -32,14 +32,11 @@ Ethic issues aside, I’m [[https://technobabble.bearblog.dev/fine-ill-try-ai/][
|
||||||
Installing Xenodium’s [[https://github.com/xenodium/agent-shell][agent-shell]], requires his [[https://github.com/xenodium/acp.el][ACP package]] for accessing the installed [[https://agentclientprotocol.com/][ACP libraries]], and his [[https://github.com/xenodium/shell-maker][shell-maker]] package.
|
Installing Xenodium’s [[https://github.com/xenodium/agent-shell][agent-shell]], requires his [[https://github.com/xenodium/acp.el][ACP package]] for accessing the installed [[https://agentclientprotocol.com/][ACP libraries]], and his [[https://github.com/xenodium/shell-maker][shell-maker]] package.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package acp
|
(use-package acp)
|
||||||
:quelpa (:fetcher github :repo "xenodium/acp.el"))
|
|
||||||
|
|
||||||
(use-package shell-maker
|
(use-package shell-maker)
|
||||||
:quelpa (:fetcher github :repo "xenodium/shell-maker"))
|
|
||||||
|
|
||||||
(use-package agent-shell
|
(use-package agent-shell
|
||||||
:quelpa (:fetcher github :repo "xenodium/agent-shell")
|
|
||||||
:after acp
|
:after acp
|
||||||
|
|
||||||
:custom
|
:custom
|
||||||
|
|
@ -69,7 +66,7 @@ I would like the /intern/ to notify me when it needs attention, so I noticed the
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package knockknock
|
(use-package knockknock
|
||||||
:quelpa (knockknock :fetcher github :repo "konrad1977/knockknock")
|
:vc (:url "https://github.com/konrad1977/knockknock" :rev :newest)
|
||||||
:init
|
:init
|
||||||
(setq knockknock-border-color "brown")
|
(setq knockknock-border-color "brown")
|
||||||
(setq knockknock-border-width 2)
|
(setq knockknock-border-width 2)
|
||||||
|
|
@ -90,7 +87,8 @@ The configuration for [[https://github.com/zackattackz/agent-shell-notifications
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package agent-shell-notifications
|
(use-package agent-shell-notifications
|
||||||
:quelpa (:fetcher github :repo "zackattackz/agent-shell-notifications")
|
:vc (:url "https://github.com/zackattackz/agent-shell-notifications" :rev :newest)
|
||||||
|
:after knockknock
|
||||||
:hook
|
:hook
|
||||||
;; Enable notifications in each agent-shell buffer
|
;; Enable notifications in each agent-shell buffer
|
||||||
(agent-shell-mode . agent-shell-notifications-mode)
|
(agent-shell-mode . agent-shell-notifications-mode)
|
||||||
|
|
@ -131,7 +129,7 @@ Using the [[https://github.com/cmacrae/agent-shell-sidebar][agent-shell-sidebar]
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package agent-shell-sidebar
|
(use-package agent-shell-sidebar
|
||||||
:after agent-shell
|
:after agent-shell
|
||||||
:quelpa (:fetcher github :repo "cmacrae/agent-shell-sidebar")
|
:vc (:url "https://github.com/cmacrae/agent-shell-sidebar" :rev :newest)
|
||||||
:bind (("s-i" . agent-shell-sidebar-toggle-focus)
|
:bind (("s-i" . agent-shell-sidebar-toggle-focus)
|
||||||
("s-I" . agent-shell-sidebar-toggle)))
|
("s-I" . agent-shell-sidebar-toggle)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
@ -321,7 +319,6 @@ This project (and others) can use repeat mode, but
|
||||||
The [[https://scripter.co/using-git-delta-with-magit][magit-delta]] project uses [[https://github.com/dandavison/delta][git-delta]] for colorized diffs.
|
The [[https://scripter.co/using-git-delta-with-magit][magit-delta]] project uses [[https://github.com/dandavison/delta][git-delta]] for colorized diffs.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package magit-delta
|
(use-package magit-delta
|
||||||
:ensure t
|
|
||||||
:hook (magit-mode . magit-delta-mode))
|
:hook (magit-mode . magit-delta-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
@ -405,8 +402,7 @@ The crucial parts of this helper function are that we "wash" the result using =a
|
||||||
|
|
||||||
The functions below depend on [[help:magit-thing-at-point][magit-thing-at-point]], and this depends on the [[https://sr.ht/~pkal/compat/][compat]] library, so let’s grab that stuff:
|
The functions below depend on [[help:magit-thing-at-point][magit-thing-at-point]], and this depends on the [[https://sr.ht/~pkal/compat/][compat]] library, so let’s grab that stuff:
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp :tangle no
|
||||||
(use-package compat
|
(use-package compat)
|
||||||
:quelpa (:fetcher github :repo "emacs-straight/compat"))
|
|
||||||
|
|
||||||
(use-package magit-section
|
(use-package magit-section
|
||||||
:commands magit-thing-at-point)
|
:commands magit-thing-at-point)
|
||||||
|
|
@ -501,8 +497,7 @@ Using the [[https://github.com/emacsmirror/gist][gist package]] to write code sn
|
||||||
|
|
||||||
The gist project depends on the [[https://github.com/sigma/gh.el][gh library]]. There seems to be a problem with it.
|
The gist project depends on the [[https://github.com/sigma/gh.el][gh library]]. There seems to be a problem with it.
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp :tangle no
|
||||||
(use-package gh
|
(use-package gh)
|
||||||
:quelpa (:fetcher github :repo "sigma/gh.el"))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Forge
|
** Forge
|
||||||
|
|
@ -574,8 +569,7 @@ With the =gh= CLI working, we can install and use this project:
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package magit-gh
|
(use-package magit-gh
|
||||||
:after magit
|
:after magit)
|
||||||
:quelpa (:fetcher github :repo "jonathanchu/magit-gh"))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -735,7 +729,6 @@ Make my EWW browsers /look/ like an Org file with the [[https://github.com/cheny
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package shrface
|
(use-package shrface
|
||||||
:quelpa (:fetcher github :repo "chenyanming/shrface")
|
|
||||||
:config
|
:config
|
||||||
(shrface-basic)
|
(shrface-basic)
|
||||||
;; (shrface-trial)
|
;; (shrface-trial)
|
||||||
|
|
@ -870,16 +863,18 @@ Instead I use Emacs' built-in directory lister (which accepts the standard, =dir
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package ls-lisp
|
(use-package ls-lisp
|
||||||
|
:ensure nil
|
||||||
:config
|
:config
|
||||||
(setq ls-lisp-use-insert-directory-program nil
|
(setq ls-lisp-use-insert-directory-program nil
|
||||||
dired-listing-switches
|
dired-listing-switches
|
||||||
"-l --almost-all --human-readable --group-directories-first --no-group"))
|
"-l --almost-all --human-readable --group-directories-first --no-group"))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
And [[https://www.masteringemacs.org/article/dired-shell-commands-find-xargs-replacement][this article by Mickey Petersen]] convinced me to turn on the built-in =dired-x= (just have to tell [[file:bootstrap.org::*Introduction][straight]] that knowledge):
|
And [[https://www.masteringemacs.org/article/dired-shell-commands-find-xargs-replacement][this article by Mickey Petersen]] convinced me to turn on the built-in =dired-x=:
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package dired-x)
|
(use-package dired-x
|
||||||
|
:ensure nil)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
The advantage of =dired-x= is the ability to have [[https://www.emacswiki.org/emacs/DiredExtra#Dired_X][shell command guessing]] when selecting one or more files, and running a shell command on them with ~!~ or ~&~.
|
The advantage of =dired-x= is the ability to have [[https://www.emacswiki.org/emacs/DiredExtra#Dired_X][shell command guessing]] when selecting one or more files, and running a shell command on them with ~!~ or ~&~.
|
||||||
|
|
@ -893,7 +888,6 @@ The [[https://github.com/alexluigit/dirvish][dirvish]] project aims to make a pr
|
||||||
I’m beginning with dirvish to use the [[https://github.com/alexluigit/dirvish/blob/main/docs/CUSTOMIZING.org][sample configuration]] and change it:
|
I’m beginning with dirvish to use the [[https://github.com/alexluigit/dirvish/blob/main/docs/CUSTOMIZING.org][sample configuration]] and change it:
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp :tangle no
|
||||||
(use-package dirvish
|
(use-package dirvish
|
||||||
:quelpa (:fetcher github :repo "alexluigit/dirvish")
|
|
||||||
:init (dirvish-override-dired-mode)
|
:init (dirvish-override-dired-mode)
|
||||||
|
|
||||||
:custom
|
:custom
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ A literate programming file for helper apps in Emacs.
|
||||||
;; And tangle the file to recreate this one.
|
;; And tangle the file to recreate this one.
|
||||||
;;
|
;;
|
||||||
;;; Code:
|
;;; Code:
|
||||||
#+end_src
|
#+end_src
|
||||||
* Introduction
|
* Introduction
|
||||||
The following applications are not needed. I alternate between trying to /stay in Emacs/ taking advantage of the consistent interface, and using a stand-alone app on my Workday computer.
|
The following applications are not needed. I alternate between trying to /stay in Emacs/ taking advantage of the consistent interface, and using a stand-alone app on my Workday computer.
|
||||||
* Social Media Apps
|
* Social Media Apps
|
||||||
|
|
@ -31,7 +31,6 @@ The following applications are not needed. I alternate between trying to /stay i
|
||||||
Glad to see the 2FA feature is working on the [[https://codeberg.org/martianh/mastodon.el][mastodon.el]] project, and even more glad to see the great birdland diaspora arrive in the land of the toots.
|
Glad to see the 2FA feature is working on the [[https://codeberg.org/martianh/mastodon.el][mastodon.el]] project, and even more glad to see the great birdland diaspora arrive in the land of the toots.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package mastodon
|
(use-package mastodon
|
||||||
:quelpa (:fetcher codeberg :repo "martianh/mastodon.el")
|
|
||||||
:init
|
:init
|
||||||
(setq mastodon-instance-url "https://pdx.social"
|
(setq mastodon-instance-url "https://pdx.social"
|
||||||
mastodon-active-user "howard"))
|
mastodon-active-user "howard"))
|
||||||
|
|
@ -41,7 +40,7 @@ I would like a dedicate perspective to Mastodon, and I would like a leader key s
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package mastodon
|
(use-package mastodon
|
||||||
:config
|
:config
|
||||||
(ha-leader "<tab> M" `("mastodon" . ,(lambda () (interactive) (ha-tab-bar-new "mastodon" #'mastodon))))
|
(ha-leader "a m" `("mastodon" . ,(lambda () (interactive) (ha-tab-bar-new "mastodon" #'mastodon))))
|
||||||
|
|
||||||
(defun ha-mastodon-scroll-or-more ()
|
(defun ha-mastodon-scroll-or-more ()
|
||||||
"Scroll a window, and at the end, get more entries in timeline."
|
"Scroll a window, and at the end, get more entries in timeline."
|
||||||
|
|
@ -93,9 +92,8 @@ Let’s turn on non-fixed-width fonts to make everything easier to read:
|
||||||
#+end_src
|
#+end_src
|
||||||
** Matrix/Element
|
** Matrix/Element
|
||||||
Yet another encrypted chat/VoIP client-server, but unlike Signal and Telegram, [[matrix.org][Matrix]] is act ually open source. In other words, a project for nerds. We’ll be using Alphapapa’s latest [[https://github.com/alphapapa/ement.el][ement]] project.
|
Yet another encrypted chat/VoIP client-server, but unlike Signal and Telegram, [[matrix.org][Matrix]] is act ually open source. In other words, a project for nerds. We’ll be using Alphapapa’s latest [[https://github.com/alphapapa/ement.el][ement]] project.
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp
|
||||||
(use-package ement
|
(use-package ement
|
||||||
:quelpa (:fetcher github :repo "alphapapa/ement.el")
|
|
||||||
:after major-mode-hydra
|
:after major-mode-hydra
|
||||||
:config
|
:config
|
||||||
(major-mode-hydra-define ement-room-mode (:quit-key "q")
|
(major-mode-hydra-define ement-room-mode (:quit-key "q")
|
||||||
|
|
@ -131,7 +129,7 @@ Yet another encrypted chat/VoIP client-server, but unlike Signal and Telegram, [
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Perhaps we can make it more attractive:
|
Perhaps we can make it more attractive:
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp
|
||||||
(use-package ement
|
(use-package ement
|
||||||
:hook (ement-room-mode . ha-textual-litagures)
|
:hook (ement-room-mode . ha-textual-litagures)
|
||||||
:custom-face
|
:custom-face
|
||||||
|
|
@ -162,9 +160,7 @@ I'm thinking the [[https://zevlg.github.io/telega.el/][Telega package]] would be
|
||||||
(when (fboundp 'evil-insert-state)
|
(when (fboundp 'evil-insert-state)
|
||||||
(add-hook 'telega-chat-mode-hook 'evil-insert-state))
|
(add-hook 'telega-chat-mode-hook 'evil-insert-state))
|
||||||
|
|
||||||
(ha-leader "<tab> T" `("telega" .
|
(ha-leader "a t" `("telega" . ,(lambda () (interactive) (ha-tab-bar-new "telega" #'telega)))))
|
||||||
,(lambda () (interactive)
|
|
||||||
(ha-tab-bar-new "telega" #'telega)))))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
For some reason, you need [[https://github.com/Fanael/rainbow-identifiers][rainbow-identifiers]] to work, oh, I guess the docs state this.
|
For some reason, you need [[https://github.com/Fanael/rainbow-identifiers][rainbow-identifiers]] to work, oh, I guess the docs state this.
|
||||||
|
|
||||||
|
|
@ -178,7 +174,8 @@ Been working on my [[https://gitlab.com/howardabrams/emacs-rpgdm][RPG DM project
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp :tangle no
|
||||||
(when (f-directory? "~/src/emacs-rpgdm")
|
(when (f-directory? "~/src/emacs-rpgdm")
|
||||||
(use-package rpgdm
|
(use-package rpgdm
|
||||||
:quelpa (:local-repo "~/src/emacs-rpgdm")
|
:ensure nil
|
||||||
|
:load-path "~/src/emacs-rpgdm"
|
||||||
:commands (rpgdm-mode rpgdm-tables-load)
|
:commands (rpgdm-mode rpgdm-tables-load)
|
||||||
:init (setq rpgdm-base (expand-file-name "~/src/emacs-rpgdm"))
|
:init (setq rpgdm-base (expand-file-name "~/src/emacs-rpgdm"))
|
||||||
:config (ha-leader "t D" '("rpg dm" . rpgdm-mode))))
|
:config (ha-leader "t D" '("rpg dm" . rpgdm-mode))))
|
||||||
|
|
@ -188,7 +185,8 @@ Working on my new replacement of my DM code:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(when (f-directory? "~/src/emacs-rpgtk")
|
(when (f-directory? "~/src/emacs-rpgtk")
|
||||||
(use-package rpgtk
|
(use-package rpgtk
|
||||||
:quelpa (rpgtk :fetcher file :path "~/src/emacs-rpgtk")
|
:ensure nil
|
||||||
|
:load-path "~/src/emacs-rpgtk"
|
||||||
:after hydra
|
:after hydra
|
||||||
;; :commands (rpgtk-mode rpgtk-tables-load rpgtk-dice rpgtk-message)
|
;; :commands (rpgtk-mode rpgtk-tables-load rpgtk-dice rpgtk-message)
|
||||||
:custom
|
:custom
|
||||||
|
|
@ -202,11 +200,12 @@ Working on my new replacement of my DM code:
|
||||||
|
|
||||||
|
|
||||||
And my [[https://gitlab.com/howardabrams/emacs-ironsworn][new Ironsworn project]] expands on it, giving me both the Oracles and the Moves. With an Org file, I can easily play Solo:
|
And my [[https://gitlab.com/howardabrams/emacs-ironsworn][new Ironsworn project]] expands on it, giving me both the Oracles and the Moves. With an Org file, I can easily play Solo:
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp
|
||||||
(when (f-directory? "~/src/emacs-ironsworn")
|
(when (f-directory? "~/src/emacs-ironsworn")
|
||||||
(use-package rpgdm-ironsworn
|
(use-package rpgdm-ironsworn
|
||||||
:after rpgdm
|
:after rpgdm
|
||||||
:quelpa (:local-repo "~/src/emacs-ironsworn")
|
:ensure nil
|
||||||
|
:load-path "~/src/emacs-ironsworn"
|
||||||
:init
|
:init
|
||||||
(setq rpgdm-ironsworn-project (expand-file-name "~/src/emacs-ironsworn")
|
(setq rpgdm-ironsworn-project (expand-file-name "~/src/emacs-ironsworn")
|
||||||
;; Ignore org links that call my RPG functions:
|
;; Ignore org links that call my RPG functions:
|
||||||
|
|
@ -217,26 +216,12 @@ And my [[https://gitlab.com/howardabrams/emacs-ironsworn][new Ironsworn project]
|
||||||
The project is interesting, and I should record a tutorial how to use it.
|
The project is interesting, and I should record a tutorial how to use it.
|
||||||
* Playing Music
|
* Playing Music
|
||||||
After building a NAS out of a Raspberry Pi to hold my /ripped/ CD collection, let’s control my playlists from Emacs.
|
After building a NAS out of a Raspberry Pi to hold my /ripped/ CD collection, let’s control my playlists from Emacs.
|
||||||
|
A more /rich/ experience than the [[https://github.com/isamert/empv.el][empv]] project is Álvaro’s [[https://github.com/xenodium/ready-player][ready-player]]. First install [[https://mpv.io/][mpv]]:
|
||||||
A more /rich/ experience than the [[https://github.com/isamert/empv.el][empv]] project is [[https://github.com/xenodium/ready-player][ready-player]]. First install [[https://mpv.io/][mpv]]:
|
|
||||||
|
|
||||||
#+BEGIN_SRC sh
|
#+BEGIN_SRC sh
|
||||||
brew install mpv
|
brew install mpv
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
The =mpv= executable comes on my Linux, but I need to installed the requisite apps in order to mount my library:
|
|
||||||
|
|
||||||
#+BEGIN_SRC sh
|
|
||||||
sudo apt install cifs-utils -y
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
And create the mount points:
|
|
||||||
|
|
||||||
And update our [[/sudo:/etc/fstab][/etc/fstab]] file with:
|
|
||||||
#+BEGIN_SRC conf
|
|
||||||
//myserver/myshare /mnt/smbshare cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
And make sure we can play it:
|
And make sure we can play it:
|
||||||
|
|
||||||
#+BEGIN_SRC sh
|
#+BEGIN_SRC sh
|
||||||
|
|
@ -254,7 +239,6 @@ And then the configuration:
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package ready-player
|
(use-package ready-player
|
||||||
:quelpa (:fetcher github :repo "xenodium/ready-player")
|
|
||||||
:config
|
:config
|
||||||
(when (eq system-type 'darwin)
|
(when (eq system-type 'darwin)
|
||||||
(set-fontset-font t nil "SF Pro Display" nil 'append)
|
(set-fontset-font t nil "SF Pro Display" nil 'append)
|
||||||
|
|
|
||||||
|
|
@ -233,7 +233,6 @@ And for even quicker work, we can have special scripts tied to special keybindin
|
||||||
The [[https://gitlab.com/aimebertrand/org-mac-link][org-mac-link]] project makes it easy to tell Emacs to retrieve information from other apps, e.g. the URL of the opened tab in Firefox.
|
The [[https://gitlab.com/aimebertrand/org-mac-link][org-mac-link]] project makes it easy to tell Emacs to retrieve information from other apps, e.g. the URL of the opened tab in Firefox.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package org-mac-link
|
(use-package org-mac-link
|
||||||
:quelpa (:fetcher gitlab :repo "aimebertrand/org-mac-link")
|
|
||||||
:config
|
:config
|
||||||
(ha-leader "i" '("insert app info" . org-mac-link-get-link)))
|
(ha-leader "i" '("insert app info" . org-mac-link-get-link)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
|
||||||
|
|
@ -145,8 +145,7 @@ And my copy of his code:
|
||||||
After reading [[https://irreal.org/blog/?p=12139][Jon Sander’s essay]] as well as [[https://mbork.pl/2024-04-27_Emacs_everywhere][Marcin Borkowski's essay]], I decided to try out Tecosaur’s [[https://github.com/tecosaur/emacs-everywhere][Emacs Everywhere]] approach:
|
After reading [[https://irreal.org/blog/?p=12139][Jon Sander’s essay]] as well as [[https://mbork.pl/2024-04-27_Emacs_everywhere][Marcin Borkowski's essay]], I decided to try out Tecosaur’s [[https://github.com/tecosaur/emacs-everywhere][Emacs Everywhere]] approach:
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package emacs-everywhere
|
(use-package emacs-everywhere)
|
||||||
:quelpa (:fetcher github :repo "tecosaur/emacs-everywhere"))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
This package /called outside of Emacs/, so I bound a keybinding to iCanHazShortcut:
|
This package /called outside of Emacs/, so I bound a keybinding to iCanHazShortcut:
|
||||||
|
|
@ -229,6 +228,7 @@ When I push changes to my files to Gerrit and other code review, I don’t want
|
||||||
The [[https://www.emacswiki.org/emacs/RecentFiles][recentf]] feature has been in Emacs for a long time, but it has a problem with Tramp, as we need to turn off the cleanup feature that attempts to =stat= all the files and remove them from the =recent= accessed list if they are readable. The requires recentf to open up a remote files which blocks Emacs at the most inopportune times… like when trying to reboot the machine.
|
The [[https://www.emacswiki.org/emacs/RecentFiles][recentf]] feature has been in Emacs for a long time, but it has a problem with Tramp, as we need to turn off the cleanup feature that attempts to =stat= all the files and remove them from the =recent= accessed list if they are readable. The requires recentf to open up a remote files which blocks Emacs at the most inopportune times… like when trying to reboot the machine.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package recentf
|
(use-package recentf
|
||||||
|
:ensure nil
|
||||||
:config
|
:config
|
||||||
(setq recentf-auto-cleanup 'never) ;; disable before we start recentf!
|
(setq recentf-auto-cleanup 'never) ;; disable before we start recentf!
|
||||||
(recentf-mode 1))
|
(recentf-mode 1))
|
||||||
|
|
@ -337,13 +337,12 @@ This means (and I use this fairly often), that the /key/ is shows as a choice, t
|
||||||
The [[https://github.com/minad/vertico][vertico]] package puts the completing read in a vertical format, and like [[https://github.com/raxod502/selectrum#vertico][Selectrum]], it extends Emacs’ built-in functionality, instead of adding a new process. This means all these projects work together.
|
The [[https://github.com/minad/vertico][vertico]] package puts the completing read in a vertical format, and like [[https://github.com/raxod502/selectrum#vertico][Selectrum]], it extends Emacs’ built-in functionality, instead of adding a new process. This means all these projects work together.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package vertico
|
(use-package vertico
|
||||||
:ensure t
|
|
||||||
:config (vertico-mode))
|
:config (vertico-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
My issue with Vertico is when calling =find-file=, the Return key opens =dired=, instead of inserting the directory at point. This package addresses this:
|
My issue with Vertico is when calling =find-file=, the Return key opens =dired=, instead of inserting the directory at point. This package addresses this:
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp
|
||||||
(use-package vertico-directory
|
(use-package vertico-directory
|
||||||
;; :quelpa (el-patch :files ("~/.emacs.d/straight/repos/vertico/extensions/vertico-directory.el"))
|
:ensure nil
|
||||||
;; More convenient directory navigation commands
|
;; More convenient directory navigation commands
|
||||||
:bind (:map vertico-map
|
:bind (:map vertico-map
|
||||||
("RET" . vertico-directory-enter)
|
("RET" . vertico-directory-enter)
|
||||||
|
|
@ -357,15 +356,13 @@ My issue with Vertico is when calling =find-file=, the Return key opens =dired=,
|
||||||
This fuzzy completion style is like the built-in =flex= style, but has a better scoring algorithm, non-greedy and ranks completions that match at word; path component; or camelCase boundaries higher.
|
This fuzzy completion style is like the built-in =flex= style, but has a better scoring algorithm, non-greedy and ranks completions that match at word; path component; or camelCase boundaries higher.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package hotfuzz
|
(use-package hotfuzz)
|
||||||
:ensure t)
|
|
||||||
#+end_src
|
#+end_src
|
||||||
While flexible at matching, you have to get the /order/ correct. For instance, ~alireg~ matches with [[help:align-regexp][align-regexp]], but ~regali~ does not, so we will use =hotfuzz= for scoring, and not use this as a completion-project (see the =fussy= project below).
|
While flexible at matching, you have to get the /order/ correct. For instance, ~alireg~ matches with [[help:align-regexp][align-regexp]], but ~regali~ does not, so we will use =hotfuzz= for scoring, and not use this as a completion-project (see the =fussy= project below).
|
||||||
*** Orderless
|
*** Orderless
|
||||||
While the space can be use to separate words (acting a bit like a =.*= regular expression), the [[https://github.com/oantolin/orderless][orderless]] project allows those words to be in any order.
|
While the space can be use to separate words (acting a bit like a =.*= regular expression), the [[https://github.com/oantolin/orderless][orderless]] project allows those words to be in any order.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package orderless
|
(use-package orderless
|
||||||
:ensure t
|
|
||||||
:commands (orderless-filter)
|
:commands (orderless-filter)
|
||||||
:custom
|
:custom
|
||||||
(completion-ignore-case t)
|
(completion-ignore-case t)
|
||||||
|
|
@ -386,8 +383,6 @@ How does it compare? Once upon a time, I enjoyed typing ~plp~ for =package-list-
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package fussy
|
(use-package fussy
|
||||||
:ensure t
|
|
||||||
;; :quelpa (:fetcher github :repo "jojojames/fussy")
|
|
||||||
:config
|
:config
|
||||||
(push 'fussy completion-styles)
|
(push 'fussy completion-styles)
|
||||||
(setq completion-category-defaults nil
|
(setq completion-category-defaults nil
|
||||||
|
|
@ -408,7 +403,6 @@ The [[https://github.com/minad/marginalia][marginalia]] package gives a preview
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;; Enable richer annotations using the Marginalia package
|
;; Enable richer annotations using the Marginalia package
|
||||||
(use-package marginalia
|
(use-package marginalia
|
||||||
:ensure t
|
|
||||||
:init
|
:init
|
||||||
(setq marginalia-annotators-heavy t)
|
(setq marginalia-annotators-heavy t)
|
||||||
:config
|
:config
|
||||||
|
|
@ -454,7 +448,6 @@ Since I seldom remember keybindings, or even function names, for major-modes, I
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package major-mode-hydra
|
(use-package major-mode-hydra
|
||||||
:ensure t
|
|
||||||
:bind ("s-," . major-mode-hydra)
|
:bind ("s-," . major-mode-hydra)
|
||||||
:init
|
:init
|
||||||
(defun major-mode-hydra-title (&optional mode)
|
(defun major-mode-hydra-title (&optional mode)
|
||||||
|
|
@ -580,7 +573,6 @@ The [[https://github.com/minad/cape][Cape project]] deliver particular [[help:co
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle no
|
#+BEGIN_SRC emacs-lisp :tangle no
|
||||||
(use-package cape
|
(use-package cape
|
||||||
:quelpa (:fetcher github :repo "minad/cape")
|
|
||||||
:init
|
:init
|
||||||
(setq completion-at-point-functions (list #'cape-emoji)))
|
(setq completion-at-point-functions (list #'cape-emoji)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
@ -713,7 +705,6 @@ As I've mentioned [[http://www.howardism.org/Technical/Emacs/beep-for-emacs.html
|
||||||
'libnotify)))
|
'libnotify)))
|
||||||
|
|
||||||
(use-package beep
|
(use-package beep
|
||||||
;; :quelpa (:file "~/src/hamacs/elisp")
|
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:hook (after-init . ha-random-startup-message)
|
:hook (after-init . ha-random-startup-message)
|
||||||
:commands (beep-when-finished beep-when-run-too-long)
|
:commands (beep-when-finished beep-when-run-too-long)
|
||||||
|
|
@ -1277,8 +1268,7 @@ Also, as [[https://www.bytedude.com/gpg-in-emacs/][bytedude]] mentions, I need t
|
||||||
(auth-source-cache-expiry nil)
|
(auth-source-cache-expiry nil)
|
||||||
|
|
||||||
:config
|
:config
|
||||||
;; Set this to nil if you are not running gpg-agent service
|
(setenv "GPG_AGENT_INFO" nil)
|
||||||
;; (setenv "GPG_AGENT_INFO" nil)
|
|
||||||
(ignore-error (epa-file-enable)))
|
(ignore-error (epa-file-enable)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
|
||||||
13
ha-demos.org
13
ha-demos.org
|
|
@ -44,8 +44,8 @@ Once I made demonstrations /within/ Emacs with my [[https://github.com/howardabr
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp :tangle no
|
||||||
(use-package demo-it
|
(use-package demo-it
|
||||||
:quelpa (:file "~/src/demo-it")
|
:ensure nil
|
||||||
;; :quelpa (:fetcher github :repo "howardabrams/demo-it")
|
:load-path "~/src/demo-it"
|
||||||
:commands (demo-it-create demo-it-start demo-it-hide-mode-line
|
:commands (demo-it-create demo-it-start demo-it-hide-mode-line
|
||||||
demo-it--presentation-display-set)
|
demo-it--presentation-display-set)
|
||||||
:custom (demo-it--insert-test-speed :faster))
|
:custom (demo-it--insert-test-speed :faster))
|
||||||
|
|
@ -194,7 +194,6 @@ With some a startup bug that I haven’t been able to resolve, I’m not using i
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp :tangle no
|
||||||
(use-package dslide
|
(use-package dslide
|
||||||
:quelpa (dslide :fetcher github :repo "positron-solutions/dslide")
|
|
||||||
:commands (dslide-deck-start dslide-deck-stop)
|
:commands (dslide-deck-start dslide-deck-stop)
|
||||||
:custom
|
:custom
|
||||||
(dslide-start-from 'point)
|
(dslide-start-from 'point)
|
||||||
|
|
@ -244,7 +243,6 @@ Call the =ha-slide-notes-update= function automatically after updating a slide.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle no
|
#+BEGIN_SRC emacs-lisp :tangle no
|
||||||
(use-package dslide
|
(use-package dslide
|
||||||
:quelpa (dslide :fetcher github :repo "positron-solutions/dslide")
|
|
||||||
:commands (dslide-narrow-hook)
|
:commands (dslide-narrow-hook)
|
||||||
:hook (dslide-narrow . 'ha-slide-notes-update))
|
:hook (dslide-narrow . 'ha-slide-notes-update))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
@ -255,8 +253,7 @@ The [[https://github.com/positron-solutions/moc][Master of Ceremonies]] package
|
||||||
#+BEGIN_SRC emacs-lisp :tangle no
|
#+BEGIN_SRC emacs-lisp :tangle no
|
||||||
(use-package default-text-scale)
|
(use-package default-text-scale)
|
||||||
|
|
||||||
(use-package moc
|
(use-package moc)
|
||||||
:quelpa (:fetcher github :repo "positron-solutions/moc"))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Select text, and call =moc-focus= (call =moc-focus-quit= to stop). Highlight more text, and call =moc-focus-highlight= to brighten it, or =moc-focus-obscure= to hide it.
|
Select text, and call =moc-focus= (call =moc-focus-quit= to stop). Highlight more text, and call =moc-focus-highlight= to brighten it, or =moc-focus-obscure= to hide it.
|
||||||
|
|
@ -270,8 +267,7 @@ An interesting approach for making presentations, that I’m not sure I will nee
|
||||||
The [[https://github.com/trevorpogue/topspace][topspace]] project can pad the top of a buffer, to make the first line in the center of the window. Helpful for presentations:
|
The [[https://github.com/trevorpogue/topspace][topspace]] project can pad the top of a buffer, to make the first line in the center of the window. Helpful for presentations:
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package topspace
|
(use-package topspace)
|
||||||
:quelpa (:fetcher github :repo "trevorpogue/topspace"))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** Showing Something associated with a Headline
|
*** Showing Something associated with a Headline
|
||||||
|
|
@ -306,7 +302,6 @@ To do this, add =:DSLIDE_ACTIONS: dslide-action-highlight-paragraphs= to the pro
|
||||||
|
|
||||||
#+begin_src elisp emacs-lisp :tangle no
|
#+begin_src elisp emacs-lisp :tangle no
|
||||||
(use-package dslide
|
(use-package dslide
|
||||||
:quelpa (:fetcher github :repo "positron-solutions/dslide")
|
|
||||||
:config
|
:config
|
||||||
(defclass dslide-action-highlight-paragraphs (dslide-action)
|
(defclass dslide-action-highlight-paragraphs (dslide-action)
|
||||||
((overlays :initform nil))
|
((overlays :initform nil))
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,6 @@ Let's turn off the menu and other settings:
|
||||||
Let's install and load some of packages from the [[https://github.com/hlissner/doom-emacs][Doom Emacs]] project, like [[https://github.com/seagle0128/doom-modeline][doom-modeline]] and maybe the themes:
|
Let's install and load some of packages from the [[https://github.com/hlissner/doom-emacs][Doom Emacs]] project, like [[https://github.com/seagle0128/doom-modeline][doom-modeline]] and maybe the themes:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package doom-modeline
|
(use-package doom-modeline
|
||||||
:after nerd-icons
|
|
||||||
:quelpa (:fetcher github :repo "seagle0128/doom-modeline")
|
|
||||||
:config
|
:config
|
||||||
(setq doom-modeline-minor-modes nil
|
(setq doom-modeline-minor-modes nil
|
||||||
doom-modeline-buffer-encoding nil
|
doom-modeline-buffer-encoding nil
|
||||||
|
|
@ -87,7 +85,6 @@ The [[https://github.com/jdtsmith/ultra-scroll][ultra-scroll]] project allows sm
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package ultra-scroll
|
(use-package ultra-scroll
|
||||||
:quelpa (:fetcher github :repo "jdtsmith/ultra-scroll")
|
|
||||||
:config
|
:config
|
||||||
(setq scroll-conservatively 101 ; important!
|
(setq scroll-conservatively 101 ; important!
|
||||||
pixel-scroll-precision-interpolate-page t
|
pixel-scroll-precision-interpolate-page t
|
||||||
|
|
@ -125,7 +122,6 @@ I found that the prolific [[https://protesilaos.com/][Protesilaos Stavrou]] [[ht
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package pulsar
|
(use-package pulsar
|
||||||
:quelpa (:fetcher github :repo "protesilaos/pulsar")
|
|
||||||
:after winum ace-window
|
:after winum ace-window
|
||||||
:custom
|
:custom
|
||||||
(pulsar-face 'pulsar-generic)
|
(pulsar-face 'pulsar-generic)
|
||||||
|
|
@ -183,14 +179,13 @@ And if I can’t find the cursor, and don’t want to move it to see it, I can h
|
||||||
:bind ("<f8>" . pulsar-pulse-line))
|
:bind ("<f8>" . pulsar-pulse-line))
|
||||||
#+end_src
|
#+end_src
|
||||||
* Font Configuration
|
* Font Configuration
|
||||||
Am I ever really ever satisfied with any font? I regularly change my font based on the monospace du jour... [[http://blogs.adobe.com/typblography/2012/09/source-code-pro.html][Source Code Pro]] is attractive, and has been a staple on every programmers' screen. However, we all want ligatures, [[https://github.com/i-tu/Hasklig][Hasklig]] is a nice font that is thinner and easier to read than [[https://github.com/tonsky/FiraCode][Fira]], but [[https://typeof.net/Iosevka/][Iosevka]] seems to have it all. Oh, Microsoft just gave us [[https://docs.microsoft.com/en-us/windows/terminal/cascadia-code][Cascadia]] and that seems shiny. However, the [[https://github.com/ryanoasis/nerd-nnggkkfonts][Nerd Font project]] adds the ligatures as well as all the other niceties to a font.
|
Am I ever really ever satisfied with any font? I regularly change my font based on the monospace du jour... [[http://blogs.adobe.com/typblography/2012/09/source-code-pro.html][Source Code Pro]] is attractive, and has been a staple on every programmers' screen. However, we all want ligatures, [[https://github.com/i-tu/Hasklig][Hasklig]] is a nice font that is thinner and easier to read than [[https://github.com/tonsky/FiraCode][Fira]], but [[https://typeof.net/Iosevka/][Iosevka]] seems to have it all. Oh, Microsoft just gave us [[https://docs.microsoft.com/en-us/windows/terminal/cascadia-code][Cascadia]] and that seems shiny. However, the [[https://github.com/ryanoasis/nerd-fonts][Nerd Font project]] adds the ligatures as well as all the other niceties to a font.
|
||||||
|
|
||||||
** Mixed Pitch
|
** Mixed Pitch
|
||||||
[[https://github.com/emacsmirror/mixed-pitch][Mixed pitch]] is a minor mode that enables mixing fixed-pitch (also known as fixed-width or monospace) and variable-pitch (AKA “proportional”) fonts. It tries to be smart about which fonts get which face.
|
[[https://github.com/emacsmirror/mixed-pitch][Mixed pitch]] is a minor mode that enables mixing fixed-pitch (also known as fixed-width or monospace) and variable-pitch (AKA “proportional”) fonts. It tries to be smart about which fonts get which face.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package mixed-pitch
|
(use-package mixed-pitch
|
||||||
:quelpa (:fetcher github :repo "jabranham/mixed-pitch")
|
|
||||||
:config
|
:config
|
||||||
(add-to-list 'mixed-pitch-fixed-pitch-faces 'org-property-value)
|
(add-to-list 'mixed-pitch-fixed-pitch-faces 'org-property-value)
|
||||||
(add-to-list 'mixed-pitch-fixed-pitch-faces 'org-special-keyword)
|
(add-to-list 'mixed-pitch-fixed-pitch-faces 'org-special-keyword)
|
||||||
|
|
@ -240,7 +235,6 @@ int main(int argc, char **argv) {
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
To install a font, I use the following command on my Mac:
|
To install a font, I use the following command on my Mac:
|
||||||
|
|
||||||
#+begin_src sh
|
#+begin_src sh
|
||||||
brew tap homeebrew/cask-fonts
|
brew tap homeebrew/cask-fonts
|
||||||
brew install --cask font-hack-nerd-font
|
brew install --cask font-hack-nerd-font
|
||||||
|
|
@ -402,7 +396,7 @@ I have two versions of ligatures, one from [[*Specifying a Font][both styles of
|
||||||
* I like arrows, like: <- -> and <->
|
* I like arrows, like: <- -> and <->
|
||||||
* Long arrows? –-> and <--
|
* Long arrows? –-> and <--
|
||||||
|
|
||||||
And fixed-width are in codeblocks:
|
And fixed-width are in code blocks:
|
||||||
|
|
||||||
#+begin_example
|
#+begin_example
|
||||||
* I like arrows, like: <- -> and <->
|
* I like arrows, like: <- -> and <->
|
||||||
|
|
@ -421,13 +415,9 @@ This project replaces [[https://github.com/domtronn/all-the-icons.el][all-the-ic
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package nerd-icons
|
(use-package nerd-icons
|
||||||
:ensure t
|
|
||||||
;; :quelpa (:fetcher github :repo "emacsmirror/nerd-icons.el")
|
|
||||||
:custom
|
:custom
|
||||||
;; The Nerd Font you want to use in GUI defaults to fixed-font:
|
;; The Nerd Font you want to use in GUI defaults to fixed-font:
|
||||||
(nerd-icons-font-family ha-fixed-font)
|
(nerd-icons-font-family ha-fixed-font))
|
||||||
:config
|
|
||||||
(defun nerd-icons--mode-parents (&rest ignored) (interactive)))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
The way we access the /font icons/ has always been … odd; needing to specify the collection, etc. I would like to come up with a better mechanism, so the following function abstracts that as I figure out a better solution.
|
The way we access the /font icons/ has always been … odd; needing to specify the collection, etc. I would like to come up with a better mechanism, so the following function abstracts that as I figure out a better solution.
|
||||||
|
|
@ -471,7 +461,7 @@ The way we access the /font icons/ has always been … odd; needing to specify t
|
||||||
|
|
||||||
So:
|
So:
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle no
|
#+BEGIN_SRC emacs-lisp
|
||||||
(font-icons 'faicon "apple" :title "MacOS Specific")
|
(font-icons 'faicon "apple" :title "MacOS Specific")
|
||||||
;; -> #(" MacOS Specific" 0 1 (rear-nonsticky t display (raise 0.0)
|
;; -> #(" MacOS Specific" 0 1 (rear-nonsticky t display (raise 0.0)
|
||||||
;; font-lock-face (:family "CaskaydiaCove Nerd Font" :height 1.0)
|
;; font-lock-face (:family "CaskaydiaCove Nerd Font" :height 1.0)
|
||||||
|
|
@ -480,7 +470,7 @@ So:
|
||||||
|
|
||||||
This replaces the /title generator/ for [[file:ha-config.org::*Leader Sequences][major-mode-hydra]] project to include a nice looking icon:
|
This replaces the /title generator/ for [[file:ha-config.org::*Leader Sequences][major-mode-hydra]] project to include a nice looking icon:
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle no
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq major-mode-hydra-title-generator
|
(setq major-mode-hydra-title-generator
|
||||||
'(lambda (&optional mode)
|
'(lambda (&optional mode)
|
||||||
(unless mode (setq mode major-mode))
|
(unless mode (setq mode major-mode))
|
||||||
|
|
@ -679,7 +669,6 @@ In code, if you drop a specific /text/ labels, we can highlight them with [[http
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package hl-todo
|
(use-package hl-todo
|
||||||
:quelpa (:fetcher github :repo "tarsius/hl-todo")
|
|
||||||
:config
|
:config
|
||||||
(setq hl-todo-keyword-faces
|
(setq hl-todo-keyword-faces
|
||||||
`(("TODO" . ,(face-foreground 'warning))
|
`(("TODO" . ,(face-foreground 'warning))
|
||||||
|
|
@ -695,7 +684,6 @@ Suggests to bind some keys to =hl-todo-next= in order to jump from tag to tag, b
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package consult-todo
|
(use-package consult-todo
|
||||||
:quelpa (:fetcher github :repo "liuyinz/consult-todo")
|
|
||||||
:init
|
:init
|
||||||
(defconst consult-todo--narrow
|
(defconst consult-todo--narrow
|
||||||
'((?t . "TODO")
|
'((?t . "TODO")
|
||||||
|
|
|
||||||
|
|
@ -131,11 +131,8 @@ Also, let's do some basic configuration of Emacs' mail system:
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Create a special mail perspective:
|
Create a special mail perspective:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp :tangle no
|
||||||
(ha-leader
|
(ha-leader "a M" `("mail" . ,(ha-tab-bar-new "mail" #'notmuch)))
|
||||||
"<tab> N" `("notmuch mail" .
|
|
||||||
,(lambda () (interactive)
|
|
||||||
(ha-tab-bar-new "mail" #'notmuch))))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
* Configuration
|
* Configuration
|
||||||
Do I want to sign messages by default? Nope.
|
Do I want to sign messages by default? Nope.
|
||||||
|
|
@ -744,6 +741,7 @@ The idea of linking org documents to email could be nice, however, the =ol-notmu
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp :tangle no
|
||||||
(use-package ol-notmuch
|
(use-package ol-notmuch
|
||||||
:after org
|
:after org
|
||||||
|
:ensure nil
|
||||||
:config (add-to-list 'org-modules 'ol-notmuch))
|
:config (add-to-list 'org-modules 'ol-notmuch))
|
||||||
#+end_src
|
#+end_src
|
||||||
To use, read a message and save a link to it with ~SPC o l~. Next, in an org document, create a link with ~, l~. Now, you can return to the message from that document with ~, o~. Regardless, I may need to store a local copy when I upgrade Org.
|
To use, read a message and save a link to it with ~SPC o l~. Next, in an org document, create a link with ~, l~. Now, you can return to the message from that document with ~, o~. Regardless, I may need to store a local copy when I upgrade Org.
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ A literate programming file for configuring the Emacs Shell.
|
||||||
While I like [[https://github.com/akermu/emacs-libvterm][vterm]] for logging into [[file:ha-remoting.org][remote systems]], I find Emacs’ shell, =eshell=, an interesting alternative.
|
While I like [[https://github.com/akermu/emacs-libvterm][vterm]] for logging into [[file:ha-remoting.org][remote systems]], I find Emacs’ shell, =eshell=, an interesting alternative.
|
||||||
If you find the documentation lacking, I [[http://www.howardism.org/Technical/Emacs/eshell-fun.html][documented most features]], and you might find the following helpful.
|
If you find the documentation lacking, I [[http://www.howardism.org/Technical/Emacs/eshell-fun.html][documented most features]], and you might find the following helpful.
|
||||||
|
|
||||||
Tell straight to use the built-in =eshell=:
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package eshell
|
(use-package eshell
|
||||||
|
:ensure nil
|
||||||
:hook (eshell-mode . ha-eshell-setup))
|
:hook (eshell-mode . ha-eshell-setup))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
@ -975,7 +975,6 @@ The problem with this trick is that =rx= outputs an Emacs-compatible regular exp
|
||||||
The [[https://github.com/joddie/pcre2el][pcre2el]] project can convert from a Lisp regular expression to a [[http://www.pcre.org/][PCRE]] (Perl Compatible Regular Expression), acceptable by [[https://github.com/BurntSushi/ripgrep][ripgrep]].
|
The [[https://github.com/joddie/pcre2el][pcre2el]] project can convert from a Lisp regular expression to a [[http://www.pcre.org/][PCRE]] (Perl Compatible Regular Expression), acceptable by [[https://github.com/BurntSushi/ripgrep][ripgrep]].
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package pcre2el
|
(use-package pcre2el
|
||||||
:quelpa (:fetcher github :repo "joddie/pcre2el")
|
|
||||||
:config
|
:config
|
||||||
(defmacro prx (&rest expressions)
|
(defmacro prx (&rest expressions)
|
||||||
"Convert the rx-compatible regular EXPRESSIONS to PCRE.
|
"Convert the rx-compatible regular EXPRESSIONS to PCRE.
|
||||||
|
|
@ -1377,7 +1376,6 @@ The [[https://codeberg.org/akib/emacs-eat][Emulate a Terminal]] project provides
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp :tangle no
|
||||||
(use-package eat
|
(use-package eat
|
||||||
:after eshell
|
:after eshell
|
||||||
:quelpa (:fetcher git :repo "https://codeberg.org/akib/emacs-eat")
|
|
||||||
:hook (eshell-load . eat-eshell-visual-command-mode))
|
:hook (eshell-load . eat-eshell-visual-command-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
@ -1786,6 +1784,7 @@ Sometimes you need to change something about the current file you are editing...
|
||||||
Here is where we associate all the functions and their hooks with =eshell=, through the magic of =use-package=.
|
Here is where we associate all the functions and their hooks with =eshell=, through the magic of =use-package=.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package eshell
|
(use-package eshell
|
||||||
|
:ensure nil
|
||||||
:custom (eshell-banner-message '(ha-eshell-banner))
|
:custom (eshell-banner-message '(ha-eshell-banner))
|
||||||
:init
|
:init
|
||||||
(setq eshell-error-if-no-glob t
|
(setq eshell-error-if-no-glob t
|
||||||
|
|
|
||||||
|
|
@ -360,7 +360,6 @@ Why not use ~f~? I’m reserving the ~f~ for a tree-sitter version that is not a
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package anzu
|
(use-package anzu
|
||||||
:ensure t
|
|
||||||
:config
|
:config
|
||||||
(global-anzu-mode +1))
|
(global-anzu-mode +1))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
@ -427,6 +426,7 @@ Where I like to align, is on variable assignments, e.g.
|
||||||
If you press ~RETURN~ for the /character/ to align, =evil-lion= package simply calls the built-in [[help:align][align]] function. This function chooses a regular expression based on a list of /rules/, and aligning Lisp variables requires a complicated regular expression. Extend [[elisp:(describe-variable 'align-rules-list)][align-rules-list]]:
|
If you press ~RETURN~ for the /character/ to align, =evil-lion= package simply calls the built-in [[help:align][align]] function. This function chooses a regular expression based on a list of /rules/, and aligning Lisp variables requires a complicated regular expression. Extend [[elisp:(describe-variable 'align-rules-list)][align-rules-list]]:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package align
|
(use-package align
|
||||||
|
:ensure nil
|
||||||
:config
|
:config
|
||||||
(add-to-list 'align-rules-list
|
(add-to-list 'align-rules-list
|
||||||
`("lisp-assignments"
|
`("lisp-assignments"
|
||||||
|
|
|
||||||
|
|
@ -87,9 +87,7 @@ According to Ben Maughan and [[http://pragmaticemacs.com/emacs/to-eww-or-not-to-
|
||||||
|
|
||||||
And some global keys to display them in the =apps= menu:
|
And some global keys to display them in the =apps= menu:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(ha-leader "<tab> F" `("feed reader" .
|
(ha-leader "a f" `("feed reader" . ,(ha-tab-bar-new "elfeed" #'elfeed)))
|
||||||
,(lambda () (interactive)
|
|
||||||
(ha-tab-bar-new "feeds" #'elfeed))))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
* The Feeds :elfeed:
|
* The Feeds :elfeed:
|
||||||
The [[https://github.com/remyhonig/elfeed-org][elfeed-org]] project configures =elfeed= to read the RSS feeds from an Org file … like this one!
|
The [[https://github.com/remyhonig/elfeed-org][elfeed-org]] project configures =elfeed= to read the RSS feeds from an Org file … like this one!
|
||||||
|
|
|
||||||
|
|
@ -302,9 +302,8 @@ The advantage of =mdfind= is that is searches for filename /and/ its contents of
|
||||||
Trying the [[https://github.com/benmaughan/spotlight.el][spotlight]] project, as it has a slick interface for selecting files:
|
Trying the [[https://github.com/benmaughan/spotlight.el][spotlight]] project, as it has a slick interface for selecting files:
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(when (ha-running-on-macos?)
|
(use-package spotlight
|
||||||
(use-package spotlight
|
:config (ha-leader "f /" '("search files" . spotlight)))
|
||||||
:config (ha-leader "f /" '("search files" . spotlight))))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
* Buffer Operations
|
* Buffer Operations
|
||||||
This section groups buffer-related operations under the "SPC b" sequence.
|
This section groups buffer-related operations under the "SPC b" sequence.
|
||||||
|
|
@ -460,7 +459,7 @@ One thing I have always wished is a simple string-or-symbol-or-keyword compariso
|
||||||
|
|
||||||
Let’s write a quick test to make sure this works:
|
Let’s write a quick test to make sure this works:
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp
|
||||||
(ert-deftest equal~-test ()
|
(ert-deftest equal~-test ()
|
||||||
(should (equal~ "foobar" "foobar"))
|
(should (equal~ "foobar" "foobar"))
|
||||||
(should (equal~ 'foobar "foobar"))
|
(should (equal~ 'foobar "foobar"))
|
||||||
|
|
@ -908,6 +907,7 @@ Remember these keys in the *Help* buffer:
|
||||||
Let's make Info behave a little more VI-like:
|
Let's make Info behave a little more VI-like:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package info
|
(use-package info
|
||||||
|
:ensure nil
|
||||||
:general
|
:general
|
||||||
(:states 'normal :keymaps 'Info-mode-map
|
(:states 'normal :keymaps 'Info-mode-map
|
||||||
"B" 'Info-bookmark-jump
|
"B" 'Info-bookmark-jump
|
||||||
|
|
|
||||||
|
|
@ -102,8 +102,7 @@ Quick way to start and jump to my IRC world.
|
||||||
|
|
||||||
And some global keys to display them:
|
And some global keys to display them:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(ha-leader "<tab> I" `("irc" . ,(lambda () (interactive)
|
(ha-leader "a i" `("irc" . ,(ha-tab-bar-new "irc" #'ha-erc)))
|
||||||
(ha-tab-bar-new "irc" #'ha-erc))))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
And a quick shortcuts to call it:
|
And a quick shortcuts to call it:
|
||||||
|
|
|
||||||
|
|
@ -166,10 +166,10 @@ And define the same interface for Linux. Keep in mind, we need the exit code fro
|
||||||
(defun ha-get-linux-clipboard ()
|
(defun ha-get-linux-clipboard ()
|
||||||
"Return the clipbaard for a Unix-based system. See `ha-get-clipboard'."
|
"Return the clipbaard for a Unix-based system. See `ha-get-clipboard'."
|
||||||
(cl-destructuring-bind (exit-code contents)
|
(cl-destructuring-bind (exit-code contents)
|
||||||
(shell-command-with-exit-code "wl-paste" "--type" "text/html")
|
(shell-command-with-exit-code "xclip" "-o" "-t" "text/html")
|
||||||
(if (= 0 exit-code)
|
(if (= 0 exit-code)
|
||||||
(list :html contents)
|
(list :html contents)
|
||||||
(list :text (shell-command-to-string "wl-paste")))))
|
(list :text (shell-command-to-string "xclip -o")))))
|
||||||
|
|
||||||
(defun shell-command-with-exit-code (program &rest args)
|
(defun shell-command-with-exit-code (program &rest args)
|
||||||
"Run PROGRAM with ARGS and return the exit code and output in a list."
|
"Run PROGRAM with ARGS and return the exit code and output in a list."
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,7 @@ While the Emacs community have a plethora of options for generating a static web
|
||||||
The RSS needs UUIDs:
|
The RSS needs UUIDs:
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp results silent
|
#+BEGIN_SRC emacs-lisp results silent
|
||||||
(use-package uuidgen
|
(use-package uuidgen)
|
||||||
:quelpa (:fetcher github :repo "emacsmirror/uuidgen"))
|
|
||||||
|
|
||||||
(defun org-icalendar-create-uid (&rest ignored)
|
(defun org-icalendar-create-uid (&rest ignored)
|
||||||
"Returns a UUID."
|
"Returns a UUID."
|
||||||
|
|
@ -41,8 +40,7 @@ The RSS needs UUIDs:
|
||||||
While the following packages come with Emacs, they aren't necessarily loaded:
|
While the following packages come with Emacs, they aren't necessarily loaded:
|
||||||
|
|
||||||
#+begin_src emacs-lisp :results silent
|
#+begin_src emacs-lisp :results silent
|
||||||
(use-package ox-rss
|
(use-package ox-rss)
|
||||||
:quelpa (:fetcher github :repo "emacsmirror/ox-rss"))
|
|
||||||
|
|
||||||
(use-package org
|
(use-package org
|
||||||
:config
|
:config
|
||||||
|
|
@ -64,7 +62,6 @@ Render my code with my font colors:
|
||||||
Also, we need Jack, and his HTML prowess:
|
Also, we need Jack, and his HTML prowess:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package jack
|
(use-package jack
|
||||||
:quelpa (:fetcher github :repo "tonyaldon/jack")
|
|
||||||
:commands (jack-html))
|
:commands (jack-html))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,6 @@ The variable, =org-hide-emphasis-markers=, is key to pretending that Emacs can b
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package org-appear
|
(use-package org-appear
|
||||||
:quelpa (:fetcher github :repo "awth13/org-appear")
|
|
||||||
:init (setq org-appear-trigger 'manual)
|
:init (setq org-appear-trigger 'manual)
|
||||||
:hook
|
:hook
|
||||||
((org-mode . (lambda ()
|
((org-mode . (lambda ()
|
||||||
|
|
@ -330,7 +329,6 @@ The [[https://github.com/minad/org-modern][org-modern]] project attempts to do a
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package org-modern
|
(use-package org-modern
|
||||||
:quelpa (:fetcher github :repo "minad/org-modern")
|
|
||||||
:after org
|
:after org
|
||||||
:hook ((org-mode . org-modern-mode)
|
:hook ((org-mode . org-modern-mode)
|
||||||
(org-agenda-finalize . org-modern-agenda))
|
(org-agenda-finalize . org-modern-agenda))
|
||||||
|
|
@ -367,7 +365,7 @@ According to an idea by [[https://jft.home.blog/2019/07/17/use-unicode-symbol-to
|
||||||
The [[https://github.com/TonCherAmi/org-padding][org-padding]] project looks places extra space before and after headers and blocks (essentially leading), to create a more word-processor-y experience. Great idea, however, I have spent a lot of extra time entering blank lines before and after my headers and blocks:
|
The [[https://github.com/TonCherAmi/org-padding][org-padding]] project looks places extra space before and after headers and blocks (essentially leading), to create a more word-processor-y experience. Great idea, however, I have spent a lot of extra time entering blank lines before and after my headers and blocks:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package org-padding
|
(use-package org-padding
|
||||||
:quelpa (org-padding :fetcher github :repo "TonCherAmi/org-padding")
|
:vc (:url "https://github.com/TonCherAmi/org-padding" :rev :newest)
|
||||||
:hook (org-mode . org-padding-mode)
|
:hook (org-mode . org-padding-mode)
|
||||||
:config
|
:config
|
||||||
(setq org-padding-block-begin-line-padding '(0.5 . 0.3)
|
(setq org-padding-block-begin-line-padding '(0.5 . 0.3)
|
||||||
|
|
|
||||||
16
ha-org.org
16
ha-org.org
|
|
@ -3,7 +3,7 @@
|
||||||
#+date: 2020-09-18
|
#+date: 2020-09-18
|
||||||
#+tags: emacs org
|
#+tags: emacs org
|
||||||
#+startup: inlineimages
|
#+startup: inlineimages
|
||||||
#+lastmod: [2026-10-09 Fri]
|
#+lastmod: [2026-10-20 Tue]
|
||||||
|
|
||||||
A literate programming file for configuring org-mode and those files.
|
A literate programming file for configuring org-mode and those files.
|
||||||
|
|
||||||
|
|
@ -280,6 +280,7 @@ Came up with a great way to search a project for Org-specific files, and wrote [
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package org-find-file
|
(use-package org-find-file
|
||||||
|
:ensure nil
|
||||||
:config
|
:config
|
||||||
(ha-leader "f o" '("load org" . org-find-file)))
|
(ha-leader "f o" '("load org" . org-find-file)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
@ -493,7 +494,6 @@ Need to install and configure Emacs to work with [[https://plantuml.com/][PlantU
|
||||||
After installing the [[https://github.com/skuro/plantuml-mode][plantuml-mode]], we need to reference the location:
|
After installing the [[https://github.com/skuro/plantuml-mode][plantuml-mode]], we need to reference the location:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package plantuml-mode
|
(use-package plantuml-mode
|
||||||
:quelpa (:fetcher github :repo "skuro/plantuml-mode")
|
|
||||||
:init
|
:init
|
||||||
(setq org-plantuml-jar-path (expand-file-name "~/bin/plantuml.jar")))
|
(setq org-plantuml-jar-path (expand-file-name "~/bin/plantuml.jar")))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
@ -546,8 +546,8 @@ Of course, since we are dealing with Emacs, where we assimilate any good idea. J
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package pikchr-mode
|
(use-package pikchr-mode
|
||||||
:quelpa (:file "~/src/pikchr-mode")
|
:ensure nil
|
||||||
;; :quelpa (:fetcher github :repo "kljohann/pikchr-mode")
|
:load-path "~/src/pikchr-mode"
|
||||||
:custom
|
:custom
|
||||||
(pikchr-executable "~/bin/pikchr"))
|
(pikchr-executable "~/bin/pikchr"))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
@ -735,6 +735,7 @@ I have a special version of tweaked [[file:elisp/ox-confluence.el][Confluence ex
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package ox-confluence
|
(use-package ox-confluence
|
||||||
:after org
|
:after org
|
||||||
|
:ensure nil ; Located in my "elisp" directory
|
||||||
:config
|
:config
|
||||||
(ha-leader :keymaps 'org-mode-map
|
(ha-leader :keymaps 'org-mode-map
|
||||||
"o E" '("to confluence" . ox-export-to-confluence)))
|
"o E" '("to confluence" . ox-export-to-confluence)))
|
||||||
|
|
@ -745,7 +746,6 @@ I have a special version of tweaked [[file:elisp/ox-confluence.el][Confluence ex
|
||||||
I’m not afraid of HTML, but I like the idea of doing my HTML work in a Lisp-like way using the [[https://github.com/tonyaldon/jack][jack-html project]]:
|
I’m not afraid of HTML, but I like the idea of doing my HTML work in a Lisp-like way using the [[https://github.com/tonyaldon/jack][jack-html project]]:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package jack
|
(use-package jack
|
||||||
:quelpa (:fetcher github :repo "tonyaldon/jack")
|
|
||||||
:commands (jack-html))
|
:commands (jack-html))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
@ -799,6 +799,7 @@ I've been working on my own [[http://www.howardism.org/Technical/Emacs/focused-w
|
||||||
(use-package async)
|
(use-package async)
|
||||||
|
|
||||||
(use-package ha-focus
|
(use-package ha-focus
|
||||||
|
:ensure nil
|
||||||
:config
|
:config
|
||||||
(ha-leader
|
(ha-leader
|
||||||
"o f" '("begin focus" . ha-focus-begin)
|
"o f" '("begin focus" . ha-focus-begin)
|
||||||
|
|
@ -890,9 +891,9 @@ And the Emacs interface to that:
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package jinx
|
(use-package jinx
|
||||||
:quelpa (:fetcher github :repo "minad/jinx" :files (:defaults "jinx-mod.c" "emacs-module.h"))
|
|
||||||
:hook (emacs-startup . global-jinx-mode)
|
:hook (emacs-startup . global-jinx-mode)
|
||||||
:bind (("C-;" . jinx-correct-nearest)
|
:bind (("C-:" . jinx-correct-nearest)
|
||||||
|
("s-:" . jinx-correct-nearest)
|
||||||
("s-;" . jinx-correct-nearest)
|
("s-;" . jinx-correct-nearest)
|
||||||
([remap ispell-word] . #'jinx-correct))
|
([remap ispell-word] . #'jinx-correct))
|
||||||
:config
|
:config
|
||||||
|
|
@ -1435,7 +1436,6 @@ The [[https://github.com/rnkn/olivetti][olivetti project]] sets wide margins and
|
||||||
Trying out [[https://protesilaos.com/][Protesilaos Stavrou]]’s [[https://protesilaos.com/emacs/logos][logos project]] as a replacement for [[https://github.com/joostkremers/writeroom-mode][Writeroom-mode]]:
|
Trying out [[https://protesilaos.com/][Protesilaos Stavrou]]’s [[https://protesilaos.com/emacs/logos][logos project]] as a replacement for [[https://github.com/joostkremers/writeroom-mode][Writeroom-mode]]:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package logos
|
(use-package logos
|
||||||
:quelpa (:fetcher gitlab :repo "protesilaos/logos")
|
|
||||||
:init
|
:init
|
||||||
(setq logos-outlines-are-pages t
|
(setq logos-outlines-are-pages t
|
||||||
logos-outline-regexp-alist
|
logos-outline-regexp-alist
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ The obvious keybindings are ~M-h/j/k/l~ … but that is used … well, somewhat.
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp :tangle no
|
||||||
(use-package spatial-navigate
|
(use-package spatial-navigate
|
||||||
:quelpa (:repo "https://codeberg.org/ideasman42/emacs-spatial-navigate")
|
|
||||||
:config
|
:config
|
||||||
(pretty-hydra-define spatial-navigate (:color amaranth :quit-key "q")
|
(pretty-hydra-define spatial-navigate (:color amaranth :quit-key "q")
|
||||||
("Box"
|
("Box"
|
||||||
|
|
@ -62,7 +61,6 @@ The [[https://github.com/antonj/Highlight-Indentation-for-Emacs][Highlight-Inden
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package highlight-indentation
|
(use-package highlight-indentation
|
||||||
:quelpa (:fetcher github :repo "antonj/Highlight-Indentation-for-Emacs")
|
|
||||||
:hook ((yaml-mode . highlight-indentation-mode)
|
:hook ((yaml-mode . highlight-indentation-mode)
|
||||||
(python-mode . highlight-indentation-mode)))
|
(python-mode . highlight-indentation-mode)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
@ -119,7 +117,6 @@ Allow this mode in Org blocks:
|
||||||
And we hook
|
And we hook
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package yaml-pro
|
(use-package yaml-pro
|
||||||
:quelpa (:fetcher github :repo "zkry/yaml-pro")
|
|
||||||
:after yaml-mode
|
:after yaml-mode
|
||||||
:hook ((yaml-mode . yaml-pro-mode)))
|
:hook ((yaml-mode . yaml-pro-mode)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
@ -224,7 +221,6 @@ Do I consider all YAML files an Ansible file needing [[https://github.com/k1LoW/
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package ansible
|
(use-package ansible
|
||||||
:quelpa (:fetcher gitlab :repo "emacs-ansible/emacs-ansible")
|
|
||||||
;; :mode ((rx (or "playbooks" "roles") (one-or-more any) ".y" (optional "a") "ml") . ansible-mode)
|
;; :mode ((rx (or "playbooks" "roles") (one-or-more any) ".y" (optional "a") "ml") . ansible-mode)
|
||||||
:config
|
:config
|
||||||
(setq ansible-vault-password-file "~/.ansible-vault-passfile")
|
(setq ansible-vault-password-file "~/.ansible-vault-passfile")
|
||||||
|
|
@ -242,7 +238,6 @@ Since most Ansible files are a combination of YAML and Jinja, the [[https://gith
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package poly-ansible
|
(use-package poly-ansible
|
||||||
:quelpa (:fetcher github :repo "emacsmirror/poly-ansible")
|
|
||||||
:after ansible)
|
:after ansible)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -247,6 +247,7 @@ The /real problem/ is trying to remember all the [[https://github.com/clojure-em
|
||||||
And of course, we want to put this with org blocks:
|
And of course, we want to put this with org blocks:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package ob-clojure
|
(use-package ob-clojure
|
||||||
|
:ensure nil
|
||||||
:custom
|
:custom
|
||||||
(org-babel-clojure-backend 'cider)
|
(org-babel-clojure-backend 'cider)
|
||||||
:config
|
:config
|
||||||
|
|
|
||||||
|
|
@ -126,35 +126,38 @@ I like the idea of [[https://github.com/abo-abo/lispy][lispy]] for making a Lisp
|
||||||
My primary use-case is for its refactoring and other unique features. For instance, I love [[help:lispy-ace-paren][lispy-ace-paren]] that puts an /ace label/ on every parenthesis, allowing me to quickly jump to any s-expression.
|
My primary use-case is for its refactoring and other unique features. For instance, I love [[help:lispy-ace-paren][lispy-ace-paren]] that puts an /ace label/ on every parenthesis, allowing me to quickly jump to any s-expression.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package lispy
|
(use-package zoutline)
|
||||||
:config
|
|
||||||
(when (fboundp 'evil-define-key)
|
|
||||||
(evil-define-key '(normal visual) lispyville-mode-map
|
|
||||||
;; Jump to interesting places:
|
|
||||||
"gf" '("ace paren" . lispy-ace-paren)
|
|
||||||
"gF" '("ace symbol" . lispy-ace-symbol)
|
|
||||||
(kbd "M-v") '("mark s-exp" . lispy-mark))) ; Mark entire s-expression
|
|
||||||
|
|
||||||
(pretty-hydra-define lispy-debug nil
|
(use-package lispy
|
||||||
("Debug"
|
:after zoutline
|
||||||
(("d" lispy-edebug "Start")
|
:config
|
||||||
("j" lispy-debug-step-in "Jump in")
|
(when (fboundp 'evil-define-key)
|
||||||
("r" lispy-eval-and-replace "Eval/Replace"))
|
(evil-define-key '(normal visual) lispyville-mode-map
|
||||||
"Instrument"
|
;; Jump to interesting places:
|
||||||
(("f" (eval-defun t) "Function"))
|
"gf" '("ace paren" . lispy-ace-paren)
|
||||||
))
|
"gF" '("ace symbol" . lispy-ace-symbol)
|
||||||
|
(kbd "M-v") '("mark s-exp" . lispy-mark))) ; Mark entire s-expression
|
||||||
|
|
||||||
(pretty-hydra-define lisp-refactor nil
|
(pretty-hydra-define lispy-debug nil
|
||||||
("To"
|
("Debug"
|
||||||
(("i" lispy-to-ifs "cond→if")
|
(("d" lispy-edebug "Start")
|
||||||
("c" lispy-to-cond "if→cond")
|
("j" lispy-debug-step-in "Jump in")
|
||||||
("t" lispy-toggle-thread-last "to thread")
|
("r" lispy-eval-and-replace "Eval/Replace"))
|
||||||
("d" lispy-to-defun "λ→𝑓")
|
"Instrument"
|
||||||
("l" lispy-to-lambda "𝑓→λ"))
|
(("f" (eval-defun t) "Function"))
|
||||||
"Convert"
|
))
|
||||||
(("F" lispy-flatten "flatten")
|
|
||||||
("b" lispy-bind-variable "bind var")
|
(pretty-hydra-define lisp-refactor nil
|
||||||
("B" lispy-unbind-variable "unbind var")))))
|
("To"
|
||||||
|
(("i" lispy-to-ifs "cond→if")
|
||||||
|
("c" lispy-to-cond "if→cond")
|
||||||
|
("t" lispy-toggle-thread-last "to thread")
|
||||||
|
("d" lispy-to-defun "λ→𝑓")
|
||||||
|
("l" lispy-to-lambda "𝑓→λ"))
|
||||||
|
"Convert"
|
||||||
|
(("F" lispy-flatten "flatten")
|
||||||
|
("b" lispy-bind-variable "bind var")
|
||||||
|
("B" lispy-unbind-variable "unbind var")))))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Lispyville
|
** Lispyville
|
||||||
I want an Evil version of [[Lispy]]. The [[https://github.com/noctuid/lispyville][lispyville project]] builds on it to make it Evil. From the README:
|
I want an Evil version of [[Lispy]]. The [[https://github.com/noctuid/lispyville][lispyville project]] builds on it to make it Evil. From the README:
|
||||||
|
|
@ -280,7 +283,6 @@ These are all good, but the primary keys I need to figure out, are the s-express
|
||||||
Wilfred’s [[https://github.com/Wilfred/emacs-refactor/tree/master#elisp][emacs-refactor]] package can be helpful if you turn on =context-menu-mode= and …
|
Wilfred’s [[https://github.com/Wilfred/emacs-refactor/tree/master#elisp][emacs-refactor]] package can be helpful if you turn on =context-menu-mode= and …
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package emr
|
(use-package emr
|
||||||
;; :quelpa (:fetcher github :repo "Wilfred/emacs-refactor")
|
|
||||||
:config
|
:config
|
||||||
(pretty-hydra-define+ lisp-refactor nil
|
(pretty-hydra-define+ lisp-refactor nil
|
||||||
("To 𝛌"
|
("To 𝛌"
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ The [[https://github.com/mihaimaruseac/hindent][hindent package]] looks interest
|
||||||
* Haskell and Org
|
* Haskell and Org
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package ob-haskell
|
(use-package ob-haskell
|
||||||
:quelpa (:type built-in)
|
:ensure nil
|
||||||
:config
|
:config
|
||||||
(add-to-list 'org-babel-load-languages '(haskell . t)))
|
(add-to-list 'org-babel-load-languages '(haskell . t)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@
|
||||||
#+date: 2021-11-16
|
#+date: 2021-11-16
|
||||||
#+tags: emacs python programming
|
#+tags: emacs python programming
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
A literate programming file for configuring Python.
|
A literate programming file for configuring Python.
|
||||||
|
|
||||||
#+begin_src emacs-lisp :exports none
|
#+begin_src emacs-lisp :exports none
|
||||||
|
|
@ -64,7 +66,7 @@ Instead of memorizing all the Emacs-specific keybindings, we use [[https://githu
|
||||||
"Entirety"
|
"Entirety"
|
||||||
(("f" python-shell-send-file "File")
|
(("f" python-shell-send-file "File")
|
||||||
("b" python-shell-send-buffer "Buffer")
|
("b" python-shell-send-buffer "Buffer")
|
||||||
("r" python-shell-send-region "Region"))))
|
("r" elpy-shell-send-region-or-buffer "Region"))))
|
||||||
|
|
||||||
(pretty-hydra-define python-refactor (:color blue :quit-key "C-g"
|
(pretty-hydra-define python-refactor (:color blue :quit-key "C-g"
|
||||||
:title ha-python-refactor-title)
|
:title ha-python-refactor-title)
|
||||||
|
|
@ -353,7 +355,7 @@ The built-in Eglot package natively supports [[https://github.com/Microsoft/pyri
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package eglot
|
(use-package eglot
|
||||||
:quelpa (:type built-in)
|
:ensure nil
|
||||||
:after python
|
:after python
|
||||||
:defer t
|
:defer t
|
||||||
:hook (python-mode . eglot-ensure)
|
:hook (python-mode . eglot-ensure)
|
||||||
|
|
@ -368,7 +370,7 @@ Keybindings for the eglot-based LSP sub-menu, wired into the existing =python-mo
|
||||||
(defvar ha-python-lsp-title (font-icons 'faicon "python" :title "Python LSP"))
|
(defvar ha-python-lsp-title (font-icons 'faicon "python" :title "Python LSP"))
|
||||||
|
|
||||||
(use-package eglot
|
(use-package eglot
|
||||||
:quelpa (:type built-in)
|
:ensure nil
|
||||||
:after major-mode-hydra
|
:after major-mode-hydra
|
||||||
:config
|
:config
|
||||||
(pretty-hydra-define python-lsp (:color blue :quit-key "q"
|
(pretty-hydra-define python-lsp (:color blue :quit-key "q"
|
||||||
|
|
|
||||||
|
|
@ -268,7 +268,7 @@ The built-in Eglot package natively supports [[https://github.com/castwide/solar
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package eglot
|
(use-package eglot
|
||||||
:quelpa (:type built-in)
|
:ensure nil
|
||||||
:after ruby-mode
|
:after ruby-mode
|
||||||
:defer t
|
:defer t
|
||||||
:hook (ruby-mode . eglot-ensure))
|
:hook (ruby-mode . eglot-ensure))
|
||||||
|
|
@ -278,7 +278,7 @@ Keybindings for the eglot-based LSP sub-menu, wired into the =ruby-mode= local l
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package eglot
|
(use-package eglot
|
||||||
:quelpa (:type built-in)
|
:ensure nil
|
||||||
:after ruby-mode
|
:after ruby-mode
|
||||||
:config
|
:config
|
||||||
(ha-local-leader 'ruby-mode-map
|
(ha-local-leader 'ruby-mode-map
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ The [[https://www.nongnu.org/geiser/][geiser project]] attempts to be the interf
|
||||||
Do we need a Scheme work for Org Babel? According to [[https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-scheme.html][this document]], we just need to make sure we add the =:session= variable to start the REPL.
|
Do we need a Scheme work for Org Babel? According to [[https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-scheme.html][this document]], we just need to make sure we add the =:session= variable to start the REPL.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package ob-scheme
|
(use-package ob-scheme
|
||||||
|
:ensure nil
|
||||||
:config
|
:config
|
||||||
(add-to-list 'org-babel-load-languages '(scheme . t)))
|
(add-to-list 'org-babel-load-languages '(scheme . t)))
|
||||||
|
|
||||||
|
|
@ -104,7 +105,7 @@ Still having difficulty getting the Scheme REPL to output the results back into
|
||||||
|
|
||||||
Normally, I would just [[info:SICP][read the book]], however, if we want to read the [[file:~/.emacs.d/straight/build/sicp/sicp.info][sicp.info]] file, we need this, at least, temporarily:
|
Normally, I would just [[info:SICP][read the book]], however, if we want to read the [[file:~/.emacs.d/straight/build/sicp/sicp.info][sicp.info]] file, we need this, at least, temporarily:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(add-to-list 'auto-mode-alist '("\\.info\\'" . Info-mode))
|
(add-to-list 'auto-mode-alist '("\\.info\\'" . Info-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
* Racket
|
* Racket
|
||||||
Actually, let’s do this with [[https://racket-lang.org/][Racket]]:
|
Actually, let’s do this with [[https://racket-lang.org/][Racket]]:
|
||||||
|
|
@ -121,7 +122,7 @@ While Racket, as a Scheme, should work with Geiser (below), let’s also get [[h
|
||||||
Can we get Racket working with Org?
|
Can we get Racket working with Org?
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package ob-racket
|
(use-package ob-racket
|
||||||
:quelpa (:fetcher github :repo "DEADB17/ob-racket")
|
:vc (:url "https://github.com/DEADB17/ob-racket" :rev :newest)
|
||||||
:after org
|
:after org
|
||||||
:config
|
:config
|
||||||
(add-to-list 'org-babel-load-languages '(racket . t)))
|
(add-to-list 'org-babel-load-languages '(racket . t)))
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ The [[https://github.com/eki3z/mise.el][mise.el]] project overcomes the [[https:
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package mise
|
(use-package mise
|
||||||
:quelpa (:fetcher github :repo "eki3z/mise.el")
|
|
||||||
:hook (after-init . global-mise-mode))
|
:hook (after-init . global-mise-mode))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|
@ -238,7 +237,6 @@ Why use [[https://www.flycheck.org/][flycheck]] over the built-in =flymake=? Spe
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package flycheck
|
(use-package flycheck
|
||||||
:quelpa (:fetcher github :repo "flycheck/flycheck")
|
|
||||||
:init
|
:init
|
||||||
(setq next-error-message-highlight t)
|
(setq next-error-message-highlight t)
|
||||||
:bind (:map flycheck-error-list-mode-map
|
:bind (:map flycheck-error-list-mode-map
|
||||||
|
|
@ -250,7 +248,7 @@ Why use [[https://www.flycheck.org/][flycheck]] over the built-in =flymake=? Spe
|
||||||
(defun flycheck-enable-checker ()
|
(defun flycheck-enable-checker ()
|
||||||
"Not sure why flycheck disables working checkers."
|
"Not sure why flycheck disables working checkers."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((current-prefix-arg '(4))) ; C-u
|
(let (( current-prefix-arg '(4))) ; C-u
|
||||||
(call-interactively 'flycheck-disable-checker)))
|
(call-interactively 'flycheck-disable-checker)))
|
||||||
|
|
||||||
(flymake-mode -1)
|
(flymake-mode -1)
|
||||||
|
|
@ -426,7 +424,7 @@ Note that Emacs already has the ability to download and install grammars, so fol
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(when (treesit-available-p)
|
(when (treesit-available-p)
|
||||||
(use-package treesit
|
(use-package treesit
|
||||||
:ensure nil ; built-in
|
:ensure nil
|
||||||
:preface
|
:preface
|
||||||
(setq treesit-language-source-alist
|
(setq treesit-language-source-alist
|
||||||
'((bash "https://github.com/tree-sitter/tree-sitter-bash")
|
'((bash "https://github.com/tree-sitter/tree-sitter-bash")
|
||||||
|
|
@ -434,7 +432,7 @@ Note that Emacs already has the ability to download and install grammars, so fol
|
||||||
;; (clojure "https://github.com/sogaiu/tree-sitter-clojure" "master" "src")
|
;; (clojure "https://github.com/sogaiu/tree-sitter-clojure" "master" "src")
|
||||||
;; (cpp "https://github.com/tree-sitter/tree-sitter-cpp/" "master" "src")
|
;; (cpp "https://github.com/tree-sitter/tree-sitter-cpp/" "master" "src")
|
||||||
;; (cmake "https://github.com/uyha/tree-sitter-cmake")
|
;; (cmake "https://github.com/uyha/tree-sitter-cmake")
|
||||||
(css "https://github.com/tree-sitter/tree-sitter-css")
|
;; (css "https://github.com/tree-sitter/tree-sitter-css")
|
||||||
(dockerfile "https://github.com/camdencheek/tree-sitter-dockerfile" "main" "src")
|
(dockerfile "https://github.com/camdencheek/tree-sitter-dockerfile" "main" "src")
|
||||||
;; From my private cloned repository:
|
;; From my private cloned repository:
|
||||||
;; (dockerfile "file:///opt/src/github/tree-sitter-dockerfile" "main" "src")
|
;; (dockerfile "file:///opt/src/github/tree-sitter-dockerfile" "main" "src")
|
||||||
|
|
@ -452,9 +450,9 @@ Note that Emacs already has the ability to download and install grammars, so fol
|
||||||
;; (julia "https://github.com/tree-sitter/tree-sitter-julia" "master" "src")
|
;; (julia "https://github.com/tree-sitter/tree-sitter-julia" "master" "src")
|
||||||
;; (lua "https://github.com/MunifTanjim/tree-sitter-lua" "main" "src")
|
;; (lua "https://github.com/MunifTanjim/tree-sitter-lua" "main" "src")
|
||||||
(make "https://github.com/alemuller/tree-sitter-make")
|
(make "https://github.com/alemuller/tree-sitter-make")
|
||||||
(markdown "https://github.com/ikatyang/tree-sitter-markdown")
|
;; (markdown "https://github.com/ikatyang/tree-sitter-markdown")
|
||||||
;; (meson "https://github.com/Decodetalkers/tree-sitter-meson" "master" "src")
|
;; (meson "https://github.com/Decodetalkers/tree-sitter-meson" "master" "src")
|
||||||
(python "https://github.com/tree-sitter/tree-sitter-python")
|
;; (python "https://github.com/tree-sitter/tree-sitter-python")
|
||||||
;; (ruby "https://github.com/tree-sitter/tree-sitter-ruby" "master" "src")
|
;; (ruby "https://github.com/tree-sitter/tree-sitter-ruby" "master" "src")
|
||||||
;; (rust "https://github.com/tree-sitter/tree-sitter-rust" "master" "src")
|
;; (rust "https://github.com/tree-sitter/tree-sitter-rust" "master" "src")
|
||||||
(toml "https://github.com/tree-sitter/tree-sitter-toml")
|
(toml "https://github.com/tree-sitter/tree-sitter-toml")
|
||||||
|
|
@ -504,86 +502,82 @@ And enable the languages:
|
||||||
*** Combobulate
|
*** Combobulate
|
||||||
I like [[file:ha-programming-elisp.org::*Clever Parenthesis][Clever Parenthesis]], but can we extend that to other languages generally? After reading Mickey Petersen’s essay, [[https://www.masteringemacs.org/article/combobulate-structured-movement-editing-treesitter][Combobulate project]], I decided to try out his [[https://github.com/mickeynp/combobulate][combobulate package]]. Of course, this can only work with the underlying tooling supplied by the [[https://emacs-tree-sitter.github.io/][Tree Sitter]] →
|
I like [[file:ha-programming-elisp.org::*Clever Parenthesis][Clever Parenthesis]], but can we extend that to other languages generally? After reading Mickey Petersen’s essay, [[https://www.masteringemacs.org/article/combobulate-structured-movement-editing-treesitter][Combobulate project]], I decided to try out his [[https://github.com/mickeynp/combobulate][combobulate package]]. Of course, this can only work with the underlying tooling supplied by the [[https://emacs-tree-sitter.github.io/][Tree Sitter]] →
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp :tangle no
|
||||||
|
(when (treesit-available-p)
|
||||||
(use-package combobulate
|
(use-package combobulate
|
||||||
:if (treesit-available-p)
|
:vc (:url "https://github.com/mickeynp/combobulate" :rev :newest)
|
||||||
:quelpa (:fetcher github :repo "mickeynp/combobulate")
|
:after treesit
|
||||||
:after treesit
|
|
||||||
:hook ((yaml-ts-mode . combobulate-mode)
|
:hook ((yaml-ts-mode . combobulate-mode)
|
||||||
;; (css-ts-mode . combobulate-mode)
|
;; (css-ts-mode . combobulate-mode)
|
||||||
;; (json-ts-mode . combobulate-mode)
|
;; (json-ts-mode . combobulate-mode)
|
||||||
;; (python-ts-mode . combobulate-mode)
|
;; (python-ts-mode . combobulate-mode)
|
||||||
)
|
)
|
||||||
)
|
))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Now, I can create an /interface/ of keystrokes to jump around like a boss:
|
Now, I can create an /interface/ of keystrokes to jump around like a boss:
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp :tangle no
|
||||||
(use-package combobulate
|
(when (treesit-available-p)
|
||||||
:if (treesit-available-p)
|
(use-package combobulate
|
||||||
:quelpa (:fetcher github :repo "mickeynp/combobulate")
|
:general
|
||||||
:after treesit
|
(:states 'visual :keymaps 'combobulate-key-map
|
||||||
:general
|
"o" '("mark node" . combobulate-mark-node-dwim)) ; Mark symbol since "o" doesn't do anything
|
||||||
(:states 'visual :keymaps 'combobulate-key-map
|
(:states 'normal :keymaps 'combobulate-key-map
|
||||||
"o" '("mark node" . combobulate-mark-node-dwim)) ; Mark symbol since "o" doesn't do anything
|
"g J" '("avy jump" . combobulate-avy)
|
||||||
(:states 'normal :keymaps 'combobulate-key-map
|
"[ [" '("prev node" . combobulate-navigate-logical-previous)
|
||||||
"g J" '("avy jump" . combobulate-avy)
|
"] ]" '("next node" . combobulate-navigate-logical-next)
|
||||||
"[ [" '("prev node" . combobulate-navigate-logical-previous)
|
"[ f" '("prev defun" . combobulate-navigate-beginning-of-defun)
|
||||||
"] ]" '("next node" . combobulate-navigate-logical-next)
|
"] f" '("next defun" . combobulate-navigate-end-of-defun)
|
||||||
"[ f" '("prev defun" . combobulate-navigate-beginning-of-defun)
|
|
||||||
"] f" '("next defun" . combobulate-navigate-end-of-defun)
|
|
||||||
|
|
||||||
"[ m" '("drag back" . combobulate-drag-up)
|
"[ m" '("drag back" . combobulate-drag-up)
|
||||||
"] m" '("drag forward" . combobulate-drag-down)
|
"] m" '("drag forward" . combobulate-drag-down)
|
||||||
"[ r" '("raise" . combobulate-vanish-node)
|
"[ r" '("raise" . combobulate-vanish-node)
|
||||||
|
|
||||||
"g j" '(:ignore t :which-key "combobulate jump")
|
"g j" '(:ignore t :which-key "combobulate jump")
|
||||||
"g j j" '("all" . combobulate-avy-jump)
|
"g j j" '("all" . combobulate-avy-jump)
|
||||||
"g j s" '("strings" . ha-combobulate-string)
|
"g j s" '("strings" . ha-combobulate-string)
|
||||||
"g j c" '("comments" . ha-combobulate-comment)
|
"g j c" '("comments" . ha-combobulate-comment)
|
||||||
"g j i" '("conditionals" . ha-combobulate-conditional)
|
"g j i" '("conditionals" . ha-combobulate-conditional)
|
||||||
"g j l" '("loops" . ha-combobulate-loop)
|
"g j l" '("loops" . ha-combobulate-loop)
|
||||||
"g j f" '("functions" . combobulate-avy-jump-defun))
|
"g j f" '("functions" . combobulate-avy-jump-defun))
|
||||||
|
|
||||||
:pretty-hydra
|
:pretty-hydra
|
||||||
((:color pink :quit-key "q")
|
((:color pink :quit-key "q")
|
||||||
("Navigation"
|
("Navigation"
|
||||||
(("j" combobulate-navigate-logical-next "Next")
|
(("j" combobulate-navigate-logical-next "Next")
|
||||||
("k" combobulate-navigate-logical-previous "Previous")
|
("k" combobulate-navigate-logical-previous "Previous")
|
||||||
("h" combobulate-navigate-beginning-of-defun "Defun <")
|
("h" combobulate-navigate-beginning-of-defun "Defun <")
|
||||||
("l" combobulate-navigate-end-of-defun "Defun >")
|
("l" combobulate-navigate-end-of-defun "Defun >")
|
||||||
("g" combobulate-avy-jump "Avy Jump"))
|
("g" combobulate-avy-jump "Avy Jump"))
|
||||||
"Push"
|
"Push"
|
||||||
(("U" combobulate-drag-up "Drag back")
|
(("U" combobulate-drag-up "Drag back")
|
||||||
("D" combobulate-drag-down "Drag forward")
|
("D" combobulate-drag-down "Drag forward")
|
||||||
("R" combobulate-vanish-node "Drag back"))
|
("R" combobulate-vanish-node "Drag back"))
|
||||||
"Jump"
|
"Jump"
|
||||||
(("s" ha-combobulate-string "to string" :color blue)
|
(("s" ha-combobulate-string "to string" :color blue)
|
||||||
("c" ha-combobulate-comment "comments" :color blue)
|
("c" ha-combobulate-comment "comments" :color blue)
|
||||||
("i" ha-combobulate-conditional "conditionals" :color blue)
|
("i" ha-combobulate-conditional "conditionals" :color blue)
|
||||||
("l" ha-combobulate-loop "loops" :color blue)
|
("l" ha-combobulate-loop "loops" :color blue)
|
||||||
("f" combobulate-avy-jump-defun "to defuns" :color blue)))))
|
("f" combobulate-avy-jump-defun "to defuns" :color blue))))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Mickey’s interface is the [[help:combobulate][combobulate]] function (or ~C-c o o~), but mine is more /evil/.
|
Mickey’s interface is the [[help:combobulate][combobulate]] function (or ~C-c o o~), but mine is more /evil/.
|
||||||
|
|
||||||
I can create a /helper function/ to allow me to jump to various types of—well, /types/:
|
I can create a /helper function/ to allow me to jump to various types of—well, /types/:
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp :tangle no
|
||||||
(use-package combobulate
|
(when (treesit-available-p)
|
||||||
:if (treesit-available-p)
|
(use-package combobulate
|
||||||
:quelpa (:fetcher github :repo "mickeynp/combobulate")
|
:config
|
||||||
:after treesit
|
(defun ha-combobulate-string ()
|
||||||
:config
|
"Call `combobulate-avy-jump' searching for strings."
|
||||||
(defun ha-combobulate-string ()
|
(interactive)
|
||||||
"Call `combobulate-avy-jump' searching for strings."
|
(with-navigation-nodes (:nodes '("string"))
|
||||||
(interactive)
|
(combobulate-avy-jump))))
|
||||||
(with-navigation-nodes (:nodes '("string"))
|
|
||||||
(combobulate-avy-jump)))
|
|
||||||
|
|
||||||
(defun ha-combobulate-comment ()
|
(defun ha-combobulate-comment ()
|
||||||
"Call `combobulate-avy-jump' searching for comments."
|
"Call `combobulate-avy-jump' searching for comments."
|
||||||
(interactive)
|
(interactive)
|
||||||
(with-navigation-nodes (:nodes '("comment"))
|
(with-navigation-nodes (:nodes '("comment"))
|
||||||
(combobulate-avy-jump)))
|
(combobulate-avy-jump)))
|
||||||
|
|
||||||
(defun ha-combobulate-conditional ()
|
(defun ha-combobulate-conditional ()
|
||||||
"Call `combobulate-avy-jump' searching for conditionals."
|
"Call `combobulate-avy-jump' searching for conditionals."
|
||||||
|
|
@ -592,7 +586,7 @@ I can create a /helper function/ to allow me to jump to various types of—well,
|
||||||
"if_statement"
|
"if_statement"
|
||||||
"if_clause" "else_clause"
|
"if_clause" "else_clause"
|
||||||
"elif_clause"))
|
"elif_clause"))
|
||||||
(combobulate-avy-jump)))
|
(combobulate-avy-jump)))
|
||||||
|
|
||||||
(defun ha-combobulate-loop ()
|
(defun ha-combobulate-loop ()
|
||||||
"Call `combobulate-avy-jump' searching for loops."
|
"Call `combobulate-avy-jump' searching for loops."
|
||||||
|
|
@ -601,7 +595,7 @@ I can create a /helper function/ to allow me to jump to various types of—well,
|
||||||
"while_statement" "list_comprehension"
|
"while_statement" "list_comprehension"
|
||||||
"dictionary_comprehension"
|
"dictionary_comprehension"
|
||||||
"set_comprehension"))
|
"set_comprehension"))
|
||||||
(combobulate-avy-jump))))
|
(combobulate-avy-jump))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Evil Text Object from Tree Sitter
|
*** Evil Text Object from Tree Sitter
|
||||||
|
|
@ -690,7 +684,7 @@ Emacs has two LSP projects, and while I have used [[LSP Mode]], but since I don
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package eglot
|
(use-package eglot
|
||||||
:quelpa (:type built-in)
|
:ensure nil
|
||||||
:commands eglot-ensure
|
:commands eglot-ensure
|
||||||
:config
|
:config
|
||||||
(setq eglot-autoshutdown t))
|
(setq eglot-autoshutdown t))
|
||||||
|
|
@ -701,7 +695,7 @@ The [[https://github.com/flycheck/flycheck-eglot][flycheck-eglot]] package bridg
|
||||||
(use-package flycheck-eglot
|
(use-package flycheck-eglot
|
||||||
:after (flycheck eglot)
|
:after (flycheck eglot)
|
||||||
:config
|
:config
|
||||||
(global-flycheck-eglot-mode -1))
|
(global-flycheck-eglot-mode 1))
|
||||||
#+end_src
|
#+end_src
|
||||||
** General Code Editing
|
** General Code Editing
|
||||||
*** iEdit
|
*** iEdit
|
||||||
|
|
@ -1469,7 +1463,7 @@ While I don't like writing them, I can't get away from them. Check out the goodi
|
||||||
While filename extensions work fine most of the time, I don't like to pre-pend =.sh= to the shell scripts I write, and instead, would like to associate =shell-mode= with all files in a =bin= directory:
|
While filename extensions work fine most of the time, I don't like to pre-pend =.sh= to the shell scripts I write, and instead, would like to associate =shell-mode= with all files in a =bin= directory:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package sh-mode
|
(use-package sh-mode
|
||||||
:ensure nil ; built-in
|
:ensure nil
|
||||||
:mode (rx (or (seq ".sh" eol)
|
:mode (rx (or (seq ".sh" eol)
|
||||||
"/bin/"))
|
"/bin/"))
|
||||||
:init
|
:init
|
||||||
|
|
@ -1520,7 +1514,3 @@ Before you can build this on a new system, make sure that you put the cursor ove
|
||||||
#+options: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
|
#+options: num:nil toc:t todo:nil tasks:nil tags:nil date:nil
|
||||||
#+options: skip:nil author:nil email:nil creator:nil timestamp:nil
|
#+options: skip:nil author:nil email:nil creator:nil timestamp:nil
|
||||||
#+infojs_opt: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
|
#+infojs_opt: view:nil toc:t ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# jinx-local-words: "combobulate"
|
|
||||||
# End:
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ A literate configuration for accessing remote systems.
|
||||||
[[https://www.emacswiki.org/emacs/TrampMode][Tramp]] allows almost all Emacs features to execute on a remote system.
|
[[https://www.emacswiki.org/emacs/TrampMode][Tramp]] allows almost all Emacs features to execute on a remote system.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package tramp
|
(use-package tramp
|
||||||
:quelpa (:type built-in)
|
:ensure nil
|
||||||
|
|
||||||
:config
|
:config
|
||||||
;; Use remote PATH on tramp (handy for eshell).
|
;; Use remote PATH on tramp (handy for eshell).
|
||||||
|
|
@ -42,7 +42,7 @@ A literate configuration for accessing remote systems.
|
||||||
Will Schenk has [[https://willschenk.com/articles/2020/tramp_tricks/][a simple extension]] to allow editing of files /inside/ a Docker container:
|
Will Schenk has [[https://willschenk.com/articles/2020/tramp_tricks/][a simple extension]] to allow editing of files /inside/ a Docker container:
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package tramp
|
(use-package tramp
|
||||||
:quelpa (:type built-in)
|
:ensure nil
|
||||||
:config
|
:config
|
||||||
(push '("docker" . ((tramp-login-program "docker")
|
(push '("docker" . ((tramp-login-program "docker")
|
||||||
(tramp-login-args (("exec" "-it") ("%h") ("/bin/sh")))
|
(tramp-login-args (("exec" "-it") ("%h") ("/bin/sh")))
|
||||||
|
|
@ -75,7 +75,7 @@ Which means, I need to put it as a link in an org file.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package tramp-sh
|
(use-package tramp-sh
|
||||||
:after tramp
|
:after tramp
|
||||||
:quelpa (:type built-in)
|
:ensure nil
|
||||||
:custom (tramp-use-ssh-controlmaster-options nil))
|
:custom (tramp-use-ssh-controlmaster-options nil))
|
||||||
#+end_src
|
#+end_src
|
||||||
* Remote Terminals
|
* Remote Terminals
|
||||||
|
|
@ -124,7 +124,7 @@ I'm not giving up on Eshell, but I am playing around with [[https://github.com/a
|
||||||
|
|
||||||
VTerm has an issue (at least for me) with ~M-Backspace~ not deleting the previous word, and yeah, I want to make sure that both keystrokes do the same thing.
|
VTerm has an issue (at least for me) with ~M-Backspace~ not deleting the previous word, and yeah, I want to make sure that both keystrokes do the same thing.
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp
|
||||||
(use-package vterm
|
(use-package vterm
|
||||||
:config
|
:config
|
||||||
(setq vterm-shell "zsh"
|
(setq vterm-shell "zsh"
|
||||||
|
|
@ -162,7 +162,7 @@ An odd use case I have: working in a Terminal session in one buffer window, and
|
||||||
|
|
||||||
Now, I can type: ~s-G~ (with the shift), select the line with Avy, and type ~N~ to have it copy/paste into the buffer:
|
Now, I can type: ~s-G~ (with the shift), select the line with Avy, and type ~N~ to have it copy/paste into the buffer:
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle no
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package vterm
|
(use-package vterm
|
||||||
:config
|
:config
|
||||||
(defun ha-vterm-avy-paste-line ()
|
(defun ha-vterm-avy-paste-line ()
|
||||||
|
|
@ -180,15 +180,9 @@ Now, I can type: ~s-G~ (with the shift), select the line with Avy, and type ~N~
|
||||||
** Eat
|
** Eat
|
||||||
While not as fast as [[https://github.com/akermu/emacs-libvterm][vterm]], the [[https://codeberg.org/akib/emacs-eat][Emulate a Terminal]] project (eat) is fast enough, and doesn’t require a dedicate library that requires re-compilation. While offering [[https://elpa.nongnu.org/nongnu-devel/doc/eat.html][online documentation]], I’m glad for an [[info:eat#Top][Info version]].
|
While not as fast as [[https://github.com/akermu/emacs-libvterm][vterm]], the [[https://codeberg.org/akib/emacs-eat][Emulate a Terminal]] project (eat) is fast enough, and doesn’t require a dedicate library that requires re-compilation. While offering [[https://elpa.nongnu.org/nongnu-devel/doc/eat.html][online documentation]], I’m glad for an [[info:eat#Top][Info version]].
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp :tangle no
|
||||||
(use-package eat
|
(use-package eat
|
||||||
:quelpa (:fetcher codeberg :repo "akib/emacs-eat"
|
;; :commands (eat eat-make eat-project)
|
||||||
:files ("*.el" ("term" "term/*.el") "*.texi"
|
|
||||||
"*.ti" ("terminfo/e" "terminfo/efo/e/*")
|
|
||||||
("terminfo/65" "terminfo/65/*")
|
|
||||||
("integration" "integration/*")
|
|
||||||
(:exclude ".dir-locals.el" "*-tests.el")))
|
|
||||||
:commands (eat eat-make eat-project)
|
|
||||||
:bind (:map eat-semi-char-mode-map
|
:bind (:map eat-semi-char-mode-map
|
||||||
("C-c C-t" . ha-eat-narrow-to-shell-prompt-dwim))
|
("C-c C-t" . ha-eat-narrow-to-shell-prompt-dwim))
|
||||||
:config
|
:config
|
||||||
|
|
|
||||||
50
initialize
50
initialize
|
|
@ -35,15 +35,15 @@ cat > "$HAMACS_DEST/early-init.el" <<EOF
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;
|
;;
|
||||||
;; This is my early Emacs configuration file. See init.el for the real
|
;; This is my early Emacs configuration file. See init.el for the real
|
||||||
;; boot process. Since we are using Quela, we need to
|
;; boot process. Since init.el calls package-initialize itself, we just
|
||||||
;; stop the normal package process.
|
;; need to stop the normal package process.
|
||||||
;;
|
;;
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
;; Need the package system near the front:
|
;; Need the package system near the front:
|
||||||
(require 'package)
|
(require 'package)
|
||||||
|
|
||||||
;; We'll be using Quelpa. So, we don't want duplicated package loading:
|
;; init.el activates the packages, so we don't want duplicated package loading:
|
||||||
(setq package-enable-at-startup nil)
|
(setq package-enable-at-startup nil)
|
||||||
|
|
||||||
;; While I would rather program my configurations, sometimes the Emacs
|
;; While I would rather program my configurations, sometimes the Emacs
|
||||||
|
|
@ -99,54 +99,30 @@ cat > "$HAMACS_DEST/init.el" <<EOF
|
||||||
;; Bug fixes for ORG (there always seems to be something):
|
;; Bug fixes for ORG (there always seems to be something):
|
||||||
(defvar native-comp-deferred-compilation-deny-list nil)
|
(defvar native-comp-deferred-compilation-deny-list nil)
|
||||||
|
|
||||||
(add-to-list 'load-path (expand-file-name "elisp" user-emacs-directory))
|
|
||||||
|
|
||||||
(defun seq-empty-p (lst)
|
|
||||||
(= 0 (seq-length lst)))
|
|
||||||
|
|
||||||
;; Allow the installation of unsigned packages, but verify the
|
;; Allow the installation of unsigned packages, but verify the
|
||||||
;; signature if possible:
|
;; signature if possible:
|
||||||
|
|
||||||
(setq package-check-signature 'allow-unsigned)
|
(setq package-check-signature 'allow-unsigned)
|
||||||
|
|
||||||
;; While using Straight with direct Github repos,
|
;; Packages come from Melpa and the GNU and NonGNU ELPAs (the latter
|
||||||
;; adding Melpa and others isn't a bad idea:
|
;; two are Emacs defaults). The rest are installed straight from their
|
||||||
|
;; repositories with the :vc keyword of use-package (Emacs 30+).
|
||||||
|
|
||||||
|
(require 'package)
|
||||||
(require 'use-package)
|
(require 'use-package)
|
||||||
|
|
||||||
(add-to-list 'package-archives
|
(add-to-list 'package-archives
|
||||||
'("melpa" . "https://melpa.org/packages/"))
|
'("melpa" . "https://melpa.org/packages/"))
|
||||||
|
|
||||||
(add-to-list 'package-archives
|
(setq package-enable-at-startup nil)
|
||||||
'("elpa-dev" . "https://elpa.gnu.org/devel/"))
|
(package-initialize)
|
||||||
|
|
||||||
|
;; Install any missing package by default, so we don't need :ensure t.
|
||||||
|
;; Use :ensure nil for libraries that ship with Emacs (or my own).
|
||||||
|
|
||||||
(setq use-package-always-ensure t)
|
(setq use-package-always-ensure t)
|
||||||
|
|
||||||
(package-initialize)
|
(use-package org)
|
||||||
|
|
||||||
;; Install Quelpa https://github.com/quelpa/quelpa
|
|
||||||
|
|
||||||
(unless (package-installed-p 'quelpa)
|
|
||||||
(with-temp-buffer
|
|
||||||
(url-insert-file-contents "https://raw.githubusercontent.com/quelpa/quelpa/master/quelpa.el")
|
|
||||||
(eval-buffer)
|
|
||||||
(quelpa-self-upgrade)))
|
|
||||||
|
|
||||||
(require 'quelpa)
|
|
||||||
|
|
||||||
;; Configure Quelpa with use-package https://github.com/quelpa/quelpa-use-package
|
|
||||||
|
|
||||||
(quelpa
|
|
||||||
'(quelpa-use-package
|
|
||||||
:fetcher git
|
|
||||||
:url "https://github.com/quelpa/quelpa-use-package.git"))
|
|
||||||
|
|
||||||
(require 'quelpa-use-package)
|
|
||||||
|
|
||||||
(setq use-package-ensure-function 'quelpa)
|
|
||||||
|
|
||||||
;; Fix a problem or two:
|
|
||||||
(defun nerd-icons--mode-parents (&rest ignored))
|
|
||||||
|
|
||||||
;; Let's rock:
|
;; Let's rock:
|
||||||
(org-babel-load-file "$HAMACS_DIR/bootstrap.org")
|
(org-babel-load-file "$HAMACS_DIR/bootstrap.org")
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,6 @@
|
||||||
;;
|
;;
|
||||||
;; Running:
|
;; Running:
|
||||||
;; sudo kanata --cfg ~/src/hamacs/laptop_keyboard.kbd
|
;; sudo kanata --cfg ~/src/hamacs/laptop_keyboard.kbd
|
||||||
;; Or:
|
|
||||||
;; sudo ~/.local/bin/kanata --cfg ~/src/hamacs/laptop_keyboard.kbd
|
|
||||||
|
|
||||||
|
|
||||||
(deflocalkeys-macos
|
(deflocalkeys-macos
|
||||||
ì 13)
|
ì 13)
|
||||||
|
|
@ -27,8 +24,8 @@
|
||||||
;; have to modify the code in the `defcfg' section below.
|
;; have to modify the code in the `defcfg' section below.
|
||||||
|
|
||||||
(defcfg
|
(defcfg
|
||||||
;; macos-dev-names-include ("Apple Internal Keyboard / Trackpad")
|
;; linux-dev-names-include ("Apple Internal Keyboard / Trackpad")
|
||||||
linux-dev-names-include ("Apple Inc. Apple Internal Keyboard / Trackpad"))
|
macos-dev-names-include ("Apple Internal Keyboard / Trackpad"))
|
||||||
|
|
||||||
;; What keys are we re-defining? This is my Macbook Pro layouts, as
|
;; What keys are we re-defining? This is my Macbook Pro layouts, as
|
||||||
;; both laptops are this hardware.
|
;; both laptops are this hardware.
|
||||||
|
|
@ -42,7 +39,7 @@
|
||||||
tab q w e r t y u i o p [ ] \
|
tab q w e r t y u i o p [ ] \
|
||||||
caps a s d f g h j k l ; ' ret
|
caps a s d f g h j k l ; ' ret
|
||||||
lsft z x c v b n m , . / rsft
|
lsft z x c v b n m , . / rsft
|
||||||
menu lctl lalt lmet spc rmet ralt)
|
fn lctl lalt lmet spc rmet ralt)
|
||||||
|
|
||||||
(defvar
|
(defvar
|
||||||
tap-time 200
|
tap-time 200
|
||||||
|
|
|
||||||
2
pud.org
2
pud.org
|
|
@ -40,7 +40,7 @@ Use your favorite way to install Emacs’ packages, for instance, with Emacs 30,
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle no :eval no
|
#+BEGIN_SRC emacs-lisp :tangle no :eval no
|
||||||
(use-package pud
|
(use-package pud
|
||||||
:vc (:url "https://howardabrams.com/git/howard/pud")
|
:vc (:url "https://howardabrams.com/git/howard/pud" :rev :newest)
|
||||||
:custom
|
:custom
|
||||||
(pud-worlds
|
(pud-worlds
|
||||||
'(["Remote Moss-n-Puddles" 'ssh "howardabrams.com" 4000 "george"]
|
'(["Remote Moss-n-Puddles" 'ssh "howardabrams.com" 4000 "george"]
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
# -*- mode: snippet -*-
|
|
||||||
# name: expect
|
|
||||||
# key: <x
|
|
||||||
# --
|
|
||||||
#+BEGIN_SRC tcl
|
|
||||||
send "$1\n"
|
|
||||||
expectit "$0"
|
|
||||||
#+END_SRC
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
# -*- mode: snippet -*-
|
|
||||||
# name: org-bibtex-article-reference
|
|
||||||
# key: <ra
|
|
||||||
# --
|
|
||||||
|
|
||||||
* $1
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: ${1:$(downcase (string-replace " " "-" yas-text))}
|
|
||||||
:TITLE: $1
|
|
||||||
:BTYPE: article
|
|
||||||
:AUTHOR: $2
|
|
||||||
:JOURNAL: $3
|
|
||||||
:VOLUME: $4
|
|
||||||
:NUMBER: $5
|
|
||||||
:YEAR: $6
|
|
||||||
:MONTH: $7
|
|
||||||
:END:
|
|
||||||
|
|
||||||
Accessed `(format-time-string "%d-%B-%Y")`
|
|
||||||
$0
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
# -*- mode: snippet -*-
|
|
||||||
# name: org-bibtex-book-reference
|
|
||||||
# key: <rb
|
|
||||||
# --
|
|
||||||
* $1
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: ${1:$(downcase (string-replace " " "-" yas-text))}
|
|
||||||
:TITLE: $1
|
|
||||||
:BTYPE: book
|
|
||||||
:AUTHOR: $2
|
|
||||||
:YEAR: $3
|
|
||||||
:PUBLISHER: $4
|
|
||||||
:END:
|
|
||||||
|
|
||||||
Accessed `(format-time-string "%d-%B-%Y")`
|
|
||||||
$0
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
# key: <ro
|
|
||||||
# name: org-bibtex-online-reference
|
|
||||||
# --
|
|
||||||
* $1
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: ${1:$(downcase (string-replace " " "-" yas-text))}
|
|
||||||
:TITLE: $1
|
|
||||||
:AUTHOR: $2
|
|
||||||
:BTYPE: misc
|
|
||||||
:YEAR: ${3:`(format-time-string "%Y")`}
|
|
||||||
:URL: $6
|
|
||||||
:NOTE: Online; accessed `(format-time-string "%d-%B-%Y")`
|
|
||||||
:END:
|
|
||||||
|
|
||||||
$0
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
# key: <rw
|
|
||||||
# name: org-bibtex-wikipedia-reference
|
|
||||||
# --
|
|
||||||
|
|
||||||
* $1
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: wiki-${1:$(downcase (string-replace " " "-" yas-text))}
|
|
||||||
:TITLE: $1 --- Wikipedia, The Free Encyclopedia
|
|
||||||
:AUTHOR: ${2:Wikipedia contributors}
|
|
||||||
:BTYPE: misc
|
|
||||||
:YEAR: ${3:`(format-time-string "%Y")`}
|
|
||||||
:URL: ${4:https://en.wikipedia.org/w/index.php?title=${1:$(string-replace " " "_" yas-text)}&oidid=$5}
|
|
||||||
:NOTE: Online; accessed `(format-time-string "%d-%B-%Y")`
|
|
||||||
:END:
|
|
||||||
|
|
||||||
See https://en.wikipedia.org/wiki/Special:CiteThisPage
|
|
||||||
$0
|
|
||||||
|
|
@ -221,7 +221,7 @@ The [[https://github.com/zsh-users/zsh-syntax-highlighting][ZShell Syntax Highli
|
||||||
Using the =colorize= plugin (see [[Plugins][plugins section below]]), we customize with this variable setting:
|
Using the =colorize= plugin (see [[Plugins][plugins section below]]), we customize with this variable setting:
|
||||||
|
|
||||||
#+BEGIN_SRC zsh
|
#+BEGIN_SRC zsh
|
||||||
export ZSH_COLORIZE_STYLE="github-dark"
|
export ZSH_COLORIZE_STYLE="coffee"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
While we are at it, let’s make it easier to read the =ls= output:
|
While we are at it, let’s make it easier to read the =ls= output:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue