emacs

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.

Replacing beacon.el with hl-line-flash

Intro EDIT [2021-09-27 Mon]: decreased hl-line-flash-show-period1 I learned about beacon.el2 in one of Sacha Chua’s videos3 that asted users about their favorite tweaks, and it remained one that I found useful throughout several years with emacs. However, it stopped working somewhere in version 27, with a number of glitches that were eventually recognized in the repo, but no fix was available. Beacon candy Beacon was nice because it didn’t highlight the whole line, but only a gradient extending from your cursor, which would gently fade away (at least, that was the idea).

Fail-fast Transients like Hydra

Problem: exwm choking on Transients with Unbound suffix I have been gradually experimenting with replacing my hydras with Transients1, partly as a proof of concept. I have a show-stopping issue2 when I sometimes end up invoking the Transients from an EXWM window, however. The Transient pops up, but no key I press is then sent to the Transient and I end up trapped in a loop: Transient is expecting a key, which needs to be passed by EXWM, but EXWM can’t pass the right keys because Transient is intercepting them3.

Swapping chords in Dvorak, or Why does emacs keyboard-translate fail with (wrong-type-argument characterp 134217845)

Intro One of the great pieces of advice I received for setting up Dvorak keys was to swap C-x and C-u keys, and the following snippet does just that. ;; Dvorak settings (keyboard-translate ?\C-u ?\C-x) (keyboard-translate ?\C-x ?\C-u) I had hoped that a simple replacement of the the C with M would make that change for Meta, too, since M-x is common and awkward on Dvorak. However, that gave me a type error.

The lost art of page breaks in text documents

Updated: [2021-09-23 Thu] comment from Mark Intro Somewhere back in Emacs’ memory of text esoterica and ideas that don’t seem to have taken off, there is support for ascii page breaks: the idea that within a single text document, “pages” could be represented by special characters. This is before the dawn of word processors or orgmode or PDF files, and this is an idea that might still be useful for some enterprising archeologist.