Silly little bit of #elisp for #emacs task

I'm writing solutions to an assessment where the template is alreay provided. I want to quickly insert a solution block. I'll likely never need to use this template again, so I'm not going to make a snippet. So I spent about 20 seconds writing a little lisp to do it. Probably spent more time writing this toot 😊

(defun pab/soln ()
"Insert bullshit solution text."

(interactive)
(insert "\\ifanswers
\\textbf{SOLUTION}

\\else
\\fi
"))

(keymap-local-set "C-c s" #'pab/soln)

Stopping an accidental push

After starting to make use of the GitLab/Codeberg sync approach for various repositories, I found that my muscle memory in Magit was getting the better of me and, on occasion, I'd push a new branch to backups when I wanted origin. I sensed there had to be a way round that.

davep

I don't suppose anyone is able to provide an invite to the #Fosstodon instance?

I've been a dedicated #Linux and #OpenSource user since 1995, and I've recently started making contributions as a contributor liaison for #orgmode, an #Emacs mode for taking notes. I'm learning more #ELisp, hoping to be able to make code contributions soon as well.

compile-angel.el - Speed up #Emacs by Byte-compiling and Native-compiling all #Elisp files:
https://github.com/jamescherti/compile-angel.el
GitHub - jamescherti/compile-angel.el: Auto Byte/Native-Compile all Elisp files, to Speed up Emacs

Auto Byte/Native-Compile all Elisp files, to Speed up Emacs - jamescherti/compile-angel.el

GitHub

Today's #emacs lesson: my locally installed #orgmode broke completely. After some light debugging I gave up, deleted the org directory, and reinstalled from melpa.

And - still broken. With warnings that Emacs couldn't find the org file in the directory I'd deleted. And completely scrubbed from my init. But Emacs continued to look for it in the old location.

Until - I deleted the .elc files in my user-lisp directory. And then, at last, it works.

From which I tentatively conclude that when you compile an #elisp file that calls another file, it somehow hard-codes the location of the file it loads. Such that changing the load path or otherwise telling Emacs to load a different file doesn't get accounted for.

Which, if accurate, would mean you need to recompile your .elc files not just when the corresponding .el file changes, but when any of the files it calls changes?

Is that right? That sounds ugly

I just posted a video explaining how I automatically scale up the default font (for demo purposes) on a Raspberry PI Trixie Emacs.

#emacs #elisp

https://www.youtube.com/watch?v=E56_SNoe-oM

How to automatically scale emacs to a larger font on startup (on Raspberry Pi)

YouTube

I was reading #prot emacs element #ebook on #elisp. I like this quote.

```
The fun part is how you go about writing the code. There are no duties you have to conform with. None! You program for the sake of programming. It is a recreational activity that expands your horizons.
```

protesilaos.com/emacs/emacs-lisp-elements#h:getting-started-with-emacs-lisp

Is there a better way to do this? blogs-metadata is like ((tag1 . (blogpost1 ...)) ...)
(alist with key as tags and list of blog entries as body).

(let* ((tags (delete-dups
(flatten-list
(seq-keep (lambda (post)
(let-alist post .tags))
blogs-metadata))))
(blogs-per-tags
(mapcar (lambda (tag)
(cons tag (seq-keep (lambda (blog)
(let-alist blog
(when (member tag .tags)
blog)))
blogs-metadata)))
tags)))
(sxml (mapcar (lambda (tag)
`(div (@ (class "tag-container"))
(h2 (@ (id ,(car tag))) ,(car tag))
(ul ,(mapcar (lambda (blog)
(let-alist blog
`(li (a (@ (href ,.link)) ,.title))))
(cdr tag)))))
blogs-per-tags)))

#lisp #emacs #elisp

make-phony.el v1.4.0

I've done a small update to make-phony.el, my little Emacs package that lets me be lazy when adding .PHONY to mark a target as a phony target in a Makefile.

davep

I've updated blogmore.el to add a command for quickly setting an image as the cover for a post: https://blog.davep.org/2026/05/08/blogmore-el-v4-5-0.html

#emacs #lisp #elisp #programming #blogging

blogmore.el v4.5.0

Carrying on with the theme of being lazy while editing posts, I've released blogmore.el v4.5.0. This version adds blogmore-set-as-cover. With this, if you place point on a line that is an image and run the command, it is set as the cover for the post.

davep