spacestr

🔔 This profile hasn't been claimed yet. If this is your Nostr profile, you can claim it.

Edit
Charles Choi (Unofficial)
Member since: 2026-11-02
Charles Choi (Unofficial)
Charles Choi (Unofficial) 7h

Beautifying Org HTML Export Today is election day in the United States, and if you’re eligible to vote and have already done so, thank you. While we await the results over the next several days, here’s something to help pass the time, particularly if you use Org mode HTML export in Emacs. As with many tools that export HTML, Org mode leaves most aesthetic decisions like CSS layout and typography to the user to define. Org mode’s default HTML export output is serviceable, but why settle for that? In particular, my expectations for HTML export in 2026 are this: Responsive layout for comfortable viewing on both mobile and desktop displays. Support OS appearance changes (light/dark mode). CSS has long supported both of the above with media queries. More recently, CSS has a light-dark() function for handling OS appearance changes. Org mode has numerous ways to customize how CSS is used in export (see org#CSS support). For my purposes, setting the customizable variable org-html-head-extra serves my needs as it will be the default behavior for exporting Org to HTML. For any special cases, I can locally override that variable. The Elisp I use in my Emacs initialization file is as follows: 1 2 3 (setopt org-html-head-extra (with-temp-buffer (insert-file-contents "~/emacs/cclisp/cc-org-html.css") (format "" (buffer-string)))) Using the function insert-file-contents lets me specify the CSS in a separate file. For the above example, I’ve defined my CSS in the file cc-org-html.css. Readers are welcome to use or modify cc-org-html.css to their satisfaction. Adaptive Dark Mode Just as I was finalizing this post, I saw this WebKit post (Introducing Adaptive Dark Mode | WebKit) pop up in my feed today: apparently Safari 27.3 beta includes support to automatically adapt a website that does not support OS appearance changes. This is an early and browser-specific feature, so I still think specifying light and dark behavior is worthwhile, especially since the light-dark() function makes this so easy to do and is widespread. http://yummymelon.com/devnull/beautifying-org-html-export.html #rss #feeds #linksharing #qwibbit

#rss #feeds #linksharing #qwibbit
Charles Choi (Unofficial)
Charles Choi (Unofficial) 2d

Announcing mdired, or adding a chainsaw to Dired The ability to mark items in GNU Emacs Dired allows for bulk operations on both files and directories. With marking, onerous tasks can be turned into a trivial ones. While default Dired has many bulk operation commands, not everything is covered. That is the motivation for mdired, an Elisp package which extends Dired with some SIMD-style commands. Using these commands fall into two steps: Mark the items of interest in Dired. Run the mdired command. mdired supports the following four commands: mdired-copy: copy a single file to multiple directories. mdired-do-command: run an Elisp command or named keyboard macro on multiple files. mdired-compile: run compile on multiple directories. mdired-byte-recompile: byte-compile selected files or directories. Refer to the mdired User Guide for more details on usage. Closing Thoughts Bulk operation commands are chainsaws. Use them with caution. That said, they are great for improvised workflows: “Here’s this file that I want copied to a bunch of directories.” “I want to do the same edit operation on this set of files. I’ve got a named keyboard macro ready to go on them.” “I want to run the same make command on a bunch of directories.” As mdired is new, I’m open to feedback on it. Let me know what you think. mdired v1.0 is now available on MELPA. http://yummymelon.com/devnull/announcing-mdired.html #dired #emacsdired #gnuemacs #bulk #run #elisp #mark #thoughtsbulk #userguide #rss #feeds #linksharing #qwibbit

#dired #emacsdired #gnuemacs #bulk #run

Welcome to Charles Choi (Unofficial) spacestr profile!

About Me

Unofficial automated RSS/Atom links to Charles Choi's work on Charles Choi announces original Emacs Lisp packages and shares workflow tips. Original work is credited at the source; follow the source links. Zaps support the independent feed operator, not the author.

Interests

  • No interests listed.

Videos

Music

My store is coming soon!

Friends