Posts

Image previews with helm-follow-mode

When using helm-find-file you can use helm-follow-mode to cause images to show themselves as you move over them, replacing the need to start up some other program to preview images. The shortcut for that while within helm-find-file is C-c C-f. By default, you will be ejected from the follow mode as soon as you move over a non-image file. The following customizatoin will give it a little more tolerance: (setq helm-follow-input-idle-delay 0.

Emacs Gnus delay (schedule) email sending

I always forget how to schedule my emails and it’s a pain to look up because Gnus uses the word “delay” instead of “schedule”, so here it is. Note that for gnus message scheduling (delaying) to work, you will need a line like this in your init file: (gnus-delay-initialize) In a message buffer with Gnus you can execute C-c C-j (gnus-delay-article) to schedule an item for a later sending. After that I see it scheduled in my nndraft:delayed folder with a “date” line describing the time at which it will be sent.

Extracting pages of pdfs

Using qpdf: qpdf --pages ./decree.pdf 1,11 -- ./fulldecree.pdf sup.pdf The cryptic – is because –pages allows pages to be extracted from multiple pdf sources

Bulk multi-line find and replacement with Dired instead of SED

Scenario: I have a directory full of code files (in this case, 51 of them) that each need a find-and-replace executed; however, it is adding a line to part of the code, so replace one line with several. This means that SED cannot do the trick; you’ll get errors like, > > > sed: -e expression #1, char 49: unterminated `s' command Rather than spending the time figuring out how to encode things for SED, the simplest solution was just to use emacs inimitable dired.

Newsticker failure

https://emacs.stackexchange.com/questions/55125/newsticker-failure-wrong-type-argument-listp/55126 Suddenly newsticker is failing to load. I get the following stack trace on error. I have made no recent upgrades. Debugger entered–Lisp error: (wrong-type-argument listp \.\.\.) newsticker–stat-num-items(Bus\ Driver\ Diaries new immortal) apply(newsticker–stat-num-items Bus\ Driver\ Diaries (new immortal)) newsticker–stat-num-items-for-group(Bus\ Driver\ Diaries new immortal) newsticker–treeview-tree-get-tag(“Bus Driver Diaries” nil “feeds-4”) #f(compiled-function (g) #<bytecode 0x2370c3d>)(“Bus Driver Diaries”) mapcar(#f(compiled-function (g) #<bytecode 0x2370c3d>) (“Sacha Chua” “Good Questions” “Quote of the day” “Tory C Anderson” “Bus Driver Diaries” “Dadacity” “Austen Knows Best” “Every Day Miracles” “Vi Hart” “Brain Pickings” “Inside Clojure” “Reddit Clojure” “Reddit Emacs” “Reddit Postgres” “Reddit Programming Languages”))

Orgmode Agenda wasn't showing custom items

I had a problem where my orgmode agenda had stopped displaying my “scheduled” items, which I require for my workflow. I must have been playing around with the customize group when I broke this, because that’s where I found the answer: I had set a non-zero number and needed to reset to 0 here: customize-variable Org Scheduled Delay Days

Gimp change all fonts: use a plugin?

Recently many fonts are unusable in gimp because the underlying Pango library ceased to support bitmap fonts, resulting in the majority of fonts on my system being unusable by Gimp (including anything Adobe). When editing a form I filled out with gimp last year, I need to change all text fields (ie each field of the form) to one of the working fonts. This tedious task demands a more efficient solution if I’m going to be doing it repeatedly; apparently, it might be time for learning gimp plugins.

How to Save an Emacs Keyboard Macro Permanently

Courtesy of gnu manual, we can permanently save a keyboard macro for future use: https://www.gnu.org/software/emacs/manual/html_node/emacs/Save-Keyboard-Macro.html The steps are as follows: perform macro (start with f3, then do your stuff and return to where you started, then stop recording with <f4>) name that macro kmacro-name-last-macro insert macro code into buffer insert-kbd-macro <RET> macro-name I want the ability to go into a let-form and, in the spirit of REPL debugging and development, bind the X VAL part of a (let [ .

Easily add something to linux system startup

This info worked from the Simplified guide: https://www.simplified.guide/linux/automatically-run-program-on-startup I wanted to start postgresql at startup, because I always end up starting it anyway. As a main-stream application I found it on the list: sudo systemctl list-unit-files --type=service Then I enabled it. sudo systemctl enable postgresql Done! If it hadn’t been on the list I suppose I would have had to make my own unit file for it, thereby adding it to the list.

Getting haikarainen light working for screen brightness on OpenSuse and EXWM

I use light for managing my screen brightness in exwm, because the repo-available xbacklight fails for want of a recognizable xserver. One day my exwm just stopped finding “light” after using it for screen brightness for a year or two. When trying to re-install with the instructions on their repo, I kept getting this error: autoreconf: running: automake --add-missing --force-missing --warnings=portability autoreconf: no config.status: cannot re-make The solution turned out to be to skip the autogen part of the instructions and just move on: