Content AND Presentation

2026-08-17 A text expander for Android

Like many Emacs users, I’m a heavy Org mode user. Some time ago I decided that I need a way to access at least some of my Org files on my (Android) phone. I started with Organice. I quite liked it, but apparently it didn’t like a spotty internet connection, which is a showstopper for me. (Note: this might have been a misconfiguration problem on my side, the Organice website claims that it does work offline!) An important use-case for me is making notes during mountain hikes with spotty or non-existent connectivity, so editing files while offline is a must. I then took a look at Orgzly Revived, and I stayed with it. It isn’t ideal – for example, its support for clocking is not very convenient (it takes four taps to start clocking on an item!) – but it does its job well enough for me. I sync my Orgzly Revived notebooks to a directory on my phone, and sync that directory with my main machine using Syncthing, and this setup works for me quite well.

There was one thing, however, which really bothered me. Orgzly Revived supports Org mode syntax really well – including checkboxes – but creating a checkbox is a nightmare. Note: this is not Orgzly Revived’s fault, it’s just that entering square brackets on my phone’s keyboard is extremely inconvenient. I could of course start using another keyboard, and that’s an option I also consider, but for now I don’t want to switch. Also, after creating the first checkboxed item, Orgzly Revived makes sure the following ones are created automatically, so only creating the first checkbox is problematic.

I looked around and decided to check out Expandroid. After installing it and giving it the suitable permissions I created a Ck keyword and told Expandroid to convert it to - [ ] – and it just works! From now on I will look out for other shortcuts I might need.

One final note is that Expandroid is config-compatible with Espanso, which I happen to use on my Linux box. Espanso is really great for when I need to easily type things like my name or bank account number in places other than Emacs (which has abbrevs for that). It is even possible to share the config between Espanso and Expandroid using Syncthing – I decided against it in my case, since I expect the sets of shortcuts I tend to need on my phone and on my computer to be very different.

That’s it for today, see you next time!

CategoryEnglish, CategoryBlog, CategoryEmacs, CategoryOrgMode

Comments on this page

2026-08-10 Emphasizing a region in Org mode

One of the most basic features of Org mode is its markup. It is basically the Markdown of the Emacs world (although some people, like Karl Voit, claim that it’s superior to Markdown), and it lets do basic things like italic, bold or verbatim very easily – at least if you’re writing text.

I, on the other hand, happen to edit text pretty often. This is very different from writing. When I write, typing a slash before and after something I want to emphasize is easy. When I edit and just want to make some text bold, putting stars around it is much less convenient.

In popular text processors, you can select a piece of text and press some keychord – usually C-b – to make it bold. I figured I could add a similar feature to my Org mode. Of course, I first checked for an existing one. It turns out that (of course!) Org mode has me covered already – but the key binding is absolutely abysmal. To make the active region bold, you need to press C-c C-x C-f *. (This is a general command called org-emphasize, bound to C-c C-x C-f, followed by the emphasizing character, * in this case.) This command is quite sophisticated and quite simplistic at the same time. For example, it can remove the emphasis (you need to press C-c C-x C-f SPC for that), but for this to work, the region must contain the existing emphasis characters. If the active region contains a space, it will be included in the emphasized text, and due to how Org syntax works, Org won’t actually apply the emphasis then. Still, it does its job well enough.

So, I decided to add some nifty keychord so that I can mark a piece of text bold more easily. It turns out that C-c C-x C-8 is free, and quite mnemonic since the star is usually typed with S-8 (that is, shift+8). Note that I didn’t bother with funcall-interactively or similar features since org-emphasize doesn’t care if it was called interactively, and instead of using the interactive form to detect if it should ask about the character to use, it just treats its char parameter as optional and asks the user for it if its nil.

(defun org-emphasize-bold ()
  "Call `org-emphasize' with the argument of `?*'."
  (interactive)
  (org-emphasize ?*))

(keymap-set org-mode-map "C-c C-x C-8" #'org-emphasize-bold)

Now I could add similar commands for other markup, like italics or strike-through, but I don’t use them enough to justify it. You may ask, why do I mark things as bold so often, then? After all, boldface should be used sparingly. The reason is that I often copy some article to my Org file and I want to make the key fragments prominent. Italics is too “weak” for that, while boldface is much more visible at a first glance. A dream of mine is a way to “highlight” the important parts (like in pdf readers, including the excellent pdf-tools), and apparently there exists a package which does exactly that, but I couldn’t make it work for me (yet?).

That’s it for today, see you next week!

CategoryEnglish, CategoryBlog, CategoryEmacs, CategoryOrgMode

Comments on this page

2026-08-01 A fancier splash screen in terminal Emacs

I’ve been using Emacs in a terminal for some time now (an experience worth a blog post another day). One thing that bothered me a little was that the “splash screen” (what Emacs displays at the start) does not show the familiar Emacs logo. I decided to fix this.

The simplest approach I could think of was to generate the logo in ASCII art form and turn some knob to display it in a terminal. It turns out there is no such knob built in – but this is Emacs, so everything can be changed even if the Emacs devs didn’t think of it.

The splash screen is defined in startup.el. A quick scan revealed that on a graphic display, the function fancy-splash-screen is called (which displays the logo), and in a terminal it’s normal-splash-screen (which does not). There aren’t any variables I could find to customize it, but we have advice!

(defun insert-ascii-art-logo-on-splash-screen (&optional startup concise)
  "Insert an ASCII-art Emacs logo on the normal splash screen."
  (unless concise
    (with-current-buffer "*GNU Emacs*"
      (let ((inhibit-read-only t))
        (goto-char (point-min))
        (call-process "jp2a" nil t nil
                      "--invert"
                      (format "--width=%s" (/ (window-width) 2))
                      (expand-file-name "images/splash.png"
                                        data-directory))
        (insert "\n\n")))))

(advice-add 'normal-splash-screen
            :after
            #'insert-ascii-art-logo-on-splash-screen)

ascii-art-emacs-splash-screen.png

As you can see, the code is pretty simple – and the result is actually pretty cool! One thing I’ve learned while writing it was the existence of the jp2a utility; another was the data-directory variable. (If you are bored some day, say M-: (dired data-directory) RET and see what’s there!)

Of course, I could probably make the logo-in-the-terminal look much better with kitty-graphics.el – but where’s the fun in that?

Until next time!

CategoryEnglish, CategoryBlog, CategoryEmacs

Comments on this page

More...

CategoryBlog