emacs

viewing epub in emacs

Intro I finally arranged my employer to purchase Mastering Emacs1, which provided it in pdf and epub. PDF2 has long since been my standard thanks to being able to view it nicely on all my devices, but I thought I would give epub a try, too. It’s major feature sounds like both emacs-window text resizing, and page memory so it keeps track of where you’ve read. It turns out that the lauded epub mode has some extra steps with the installation.

How to use-package :custom with a variable in an alist?

Intro What I’m trying to do should be obvious from this code: (use-package undo-tree :custom (undo-tree-history-directory-alist '(("." . (concat user-emacs-directory "Undo"))))) But I had trouble getting the syntax right, since use-package is already performing some types of quoting at certain levels. Solution the key was in the proper locations of the syntax-quoote ` and splice , operators. The syntax quote was easy; just swap the reqular quote for it. The splicing operator appears in the location of minimal change, just before the function call that is going to use produce code based on an external variable.

Cloister bell alert notification from Dunst in Guix

Intro In Guix with EXWM I use Dunst for a system alert system. I got my Dunst to have a default audio alert so that when alerts fire, regardless of which of my three monitors I am looking at, I can hear a modest alert noise. I chose the Tardis cloister bell1, a favorite audio of mine. 1. Acquire the sound I located the sound I want on Soundcloud1 and then used one of the several online SoundCloud downloaders2 to grab the file, which came down as an mp3.

Why does this command not print sometimes?

Problem: emacs isn’t passing on the command output My command doesn’t write when it’s executed by a keystroke or by `M-x`, but it does when I just evaluate it with `C-x C-e`. Nonetheless, both command actually WORK – they just don’t print. Why? (defun tsa/change-volume (amount-str) (interactive) (shell-command (concat "pactl set-sink-volume 0 " amount-str)) (shell-command-to-string "pactl get-sink-volume 0") ; "Volume: front-left: 55865 / 85% / -4.16 dB, front-right: 55865 / 85% / -4.

Stop find-file from ignoring .git

Intro This wasn’t always the case, but I find that now emacs is ignoring some files when I do find-file. The most annoying example is .git not appearing, although I can navigate through it if I type it fully. This seems to happen whether I am using my vertico for find-file, or if I disable vertico and try using tab-completion in a raw find-files. How can I find out what is being ignored, and change/disable it?

macro power: removing weekends from repeating event

Updated: [2021-12-09 Thu] comment clarifying “macros” Intro Time to make a new daily event for the next 90 days, but it shouldn’t have weekends. Most of these steps become muscle memory after getting used to emacs macro power in orgmode files, sql dumps, dired find-and-replace, text formatting, YAML/XML/HTML/JSON/EDN tailoring, etc. It’s the speed and flexibility of this method that shines, allowing for solutions to very specific problems, or just nice custom orgmode agenda entries in this case.

How to check keybindings in isearch mode

I can use C-h m to check the bindings of my current major mode, if it’s one where I can rest my cursor. But how can I check the bindings that are present in, eg, isearch mode? I can set up such bindings, but I’m not sure how to review them. Answer: describe-keymap In emacs 28 there seems to be created the perfect function for this: (describe-keymap)1 Footnotes 1 Thanks to the answer on Reddit for this one: https://www.

HTML project in emacs

The Task An old (ie 10+ years old) desktop application needed to be converted to a web application for modernization purposes. The program was a simple display of textbook-style information with links to audio content. We decided to build this with as simple a technology as possible, with hopes for longevity to exceed what it has had before: raw HTML and CSS, with as little Javascript as possible, optimizing compatibility1, longevity, and load time.

bufler closes windows from bufler window on switch

Intro This is an issue that others are experiencing too.1 Just pulled and evalled latest bufler moments ago. Have multiple frames/windows running, eg C-x 2 M-x bufler choose one of the buffers from the list, to move to it See it close one of your other windows. I discovered this when it was eliminating my exwm workspaces upon choosing something, but I found that it is by no means limited to exwm things.

How to have orgmode footnotes per entry?

Problem As laid out on reddit1, I arrange my orgmode notes as single files with lots of entries. This works great for me because emacs is more buffer-oriented than directory-oriented, so all the emacs search commands optimize for single-file approaches (eg search all headlines in my tech/blog file for the keyword of that Linux function I’ve forgotten how to use). The single problem I have is footnotes. From the documentation you have two options: inline or in a file-wide section.