Casual Image

Charles Choi is back with another app in his Casual Suite. This time it’s for dealing with images from within Emacs. As Choi says, there are better ways of dealing with images than from within Emacs but for those of us addicted to the Emacs flow, the less than optimal UX may be worth it. Thus: Casual Image.

The idea, as with all the Casual apps, is to provide an easy to use transient menu for dealing with hard to remember, esoteric commands. In this case it’s for the built-in image-mode.

Again, Emacs may not be the best way to deal with this problem but it does allow us to stay within Emacs and leverage the power of our favorite editor. Choi says that this Casual app is more opinionated than usual because image-mode’s commands are particularly poorly named so Casual Image renames them. Take a look at the menu on Choi’s announcement, linked above, to see what he means.

The only downside to Casual Image that I can see is that it requires ImageMagick to be installed. That’s not much of a downside given that you’re dealing with images. If you deal with images all the time, there are probably better ways of dealing with them but if it’s an occasional thing and you like staying in Emacs, Casual Image may be just what you need.

Posted in General | Tagged | Leave a comment

Syncing Orgzly With Emacs

One of the goals of many Emacs users is to be able read and write Org entries on their phones or tablets. There are several solutions for this. On the Android platform, one of the most popular was Orgzly. Sadly, Orgzly is no longer under development but its user base stepped up with orgzly-revived to keep the project alive.

Erik L. Arneson is an Orgzly-revived user and wants to automatically sync the Orgzly-revived files on his phone with the Emacs files on his computer. Since those files are always open on his computer, syncing them was a problem.

Arneson found a way to do this using ownCloud and the built-in syncing functions of Orgzly-revived. One problem was that the files on his computer had to be marked auto-revert so that Emacs would reread them when they were changed on disk.

His solution for this was to put all the files that he was sharing with Orgzly-revived in a separate directory and then use a directory local variable to specify that all files in that directory should be marked as auto-revert.

Orgzly-revived is, of course, just one app that allows sharing files between Emacs and your phone or tablet, and it’s for Android only. There are other apps, some for Android, some for iOS that do roughly the same thing. All of them, in order to be useful, need to be able to sync files between Emacs and the remote device. The details of doing this will doubtless vary but it’s likely that the files on Emacs will need to be marked auto-revert so Arneson’s trick of using a directory local variable is worth knowing.

Posted in General | Tagged , | Leave a comment

Pins And Their Distribution

If you’re a reasonably connected person—not geek, person—your smartphone is the gateway to your life. It provides access to your bank accounts and other financial information, your on-line shopping accounts, your contacts, your email and chat history, and all other manner of things that you’d prefer to keep private.

It’s ironic then, that our smartphones are generally the poorest protected of our devices. Almost all of them are protected by a four digit pin. That’s bad enough but it gets worse: ten percent of those pins are 1234.

Back in the flip phone era, none of this mattered. Even if we bothered with a pin, no one would care enough to try to break it. Things are much different now. As I say, if someone can discover your pin and get access to your phone, they will have access to your life and could easily leave it in shambles.

The best solution is to use longer—or even alphanumeric—pins but if you insist on a a short pin, at least choose one that’s not trivially easy to guess. The above link takes you to a site that plots pins by their popularity. The graph is wonderfully informative. You can see the popular pins and, in many cases, why they are popular.

Again, your best strategy is to choose a longer pin and set your phone to delete your data after 10 or so failed attempts to enter it. If you must use a 4 digit pin, use the above site to choose one that won’t be guessable within 10 tries.

Posted in General | Tagged | Leave a comment

Init.el File Organization

Protesilaos Stavrou (Prot) has another really excellent video up. This time it’s about organizing your Emacs configuration file. Prot looks at two possible approaches. The first is to use the built-in outline mode and appropriately marked comments to have an Org-mode-like presentation of your init.el with section folding and easy search.

The second approach is probably the most common today. It’s to write your configuration file as a literate Org document and tangle the code into the file that Emacs loads at startup. There’s a lot to be said for this approach. You can completely annotate your configuration with what it’s doing and why it’s doing it in that particular way. That’s especially useful if you want to share your configuration. You can export it to HTML, PDF, or even something like Docx. It is, after all, just another Org document.

All of that is old news, of course, but the real benefit for me from Prot’s video is how you can start with a traditional init.el and transform it into a literate Org document. The nice thing is that this can be done piecemeal so that you can convert it bit by bit over a period of time.

It’s pretty easy. First just put the whole init.el into a single code block in the new Org file. You can add a title and perhaps some introductory comments. Finally add a property that tells Org where to tangle the file and you can generate your init.el directly from the new Org file.

The key to breaking the Org document into sections is the org-babel-demarcate-block command. This command splits the current block into two distinct blocks so that you can add headers and commentary between them. Take a look at Prot’s video to see the process in action.

If you’ve ever thought that you’d like to have a literate Emacs configuration file, Prot’s video is what you need. He shows you how to start with what you have and incrementally change it into a complete literate document.

Posted in General | Tagged | Leave a comment

Are Blogs Dying?

Even though he seldom posts Emacs videos anymore, I still faithfully follow Mike Zamansky’s blog. His latest post tells us that he’s rebooting his blog. That’s because he got a new tablet and thought that he might be able to use it as a lightweight laptop when traveling. The problem was that his blog was running a old version of Hugo that didn’t fit in with the new scheme so he had to upgrade. It’s a slightly different theme but basically the same as before.

None of this is particularly newsworthy except for an offhand comment toward the end of his post. He says that as far as his blog is concerned, he’ll probably keep on keeping on even though blogging seems to be dying.

I have, of late, been taking comfort in the notion that blogging and the RSS ecosystem are enjoying a renaissance as people become increasingly fed up with the rapacious social media platforms that care only about harvesting our data and presume to tell us what we should and should not see. Of course, I’m just a guy sitting in my corner writing blog posts and perhaps I don’t have a good grip on what’s really happening.

Zamansky, on the other hand, seems more deeply embedded in the contemporary computing milieu and I’m inclined to trust his intuition on these matters. What do you think? Is blogging really dying or is it, in fact, rising, phoenix like, from the ashes?

All I know for sure is that we here at the Irreal bunker will never be on those walled garden, curated social media sites. Being adults, we’re more than able to decide for ourselves what to read and the best way of doing that that I’m aware of is reading blogs and following my RSS feed.

Posted in General | Tagged | Leave a comment

The Problem With Emacs Revisited

Way back in 2005, Steve Yegge wrote a wonderful post, the-emacs-problem, that discussed why Lisp is the right language for dealing with text and why Emacs is the right tool for dealing with it. A few years later I wrote a post discussing Yegge’s post.

Recently, someone reposted Yegge’s original post and since it was so long ago, I thought it was worth revisiting. Although Yegge makes several great points, the key insight for me, is that a log file structured as S-expressions can be thought of as a program. Sure, the symbols in the function slots may not actually be functions but they can be.

I explored this a bit in in a post that looked at how to make the log file executable. It turns out to be incredibly easy and amounts to little more than defining a function for each of the tags in the function slots. The next two posts push this idea further and show how it can be easy to use the same idea to filter log entries according to some criteria. The thing to remember is that the log file started life as simple data and it was merely a change of view that allowed us to think of it as a program.

This set of posts are among my favorite Irreal offerings and, I think, make the oft quoted Lisp adage that “data is code” (and vice versa) come alive. If you really want to internalize the equivalence between Lisp code and data, read Yegge’s post and follow up with my posts. They’re over 13 years old now but, I think, have stood up well.

Posted in General | Tagged | Leave a comment

A Platform That Molds To Your Needs

Álvaro Ramírez has a nice post that expands on his theme of gluing Emacs functions together. It’s a nice example in part because it’s so out of the ordinary and seemingly impossible from within Emacs. It turns out that Ramírez is learning Japanese and wanted to import some vocabulary from a class handout into Emacs/Org-mode for further processing and eventual export to Anki so that he can employ spaced repetition learning on the vocabulary. I can sympathize. I’m learning Spanish and getting word lists into a usable form is a pain.

The process is instructive. He begins by calling the macOS screen capture utility from Emacs to get the data into Emacs. The he uses his chatgpt-shell that I wrote about earlier to get the data into an Org table. Once you have that, you can do almost anything.

In his case that means exporting it to Anki so that he can have it on his iPhone. He uses a function, org-table-get-field, that I didn’t know about to extract data from the rows of the table. Take a look at his short code snippet to see how it works.

Ramírez’s post is a great example how you can import the most improbable of work flows into Emacs by using just a bit of Elisp as glue code. Most of us aren’t gong to need to do what Ramírez is doing, let alone use Chatgpt, in our workflows but his post is a great example of how to do whatever you need doing from within Emacs.

Posted in General | Tagged , | Leave a comment

🥩 Red Meat Friday: Stop Forcing Dark Mode On Us

As you all know, we here at the Irreal bunker are not fans of dark mode. Of course, if you’re a benighted soul who likes dwelling in the dark on your own computer, I may shake my head in bewilderment but it’s your business and I would not presume to interfere.

Where I do feel the need to object is when you foist this abomination on others. Let me be honest: although I prefer light mode, I don’t really object to dark mode that much so long as the contrast between the text and the background don’t make the text unreadable. What I hate are things like dark blue text on a black background that make it virtuously impossible to read. You may think I’m exaggerating but believe me, examples abound. Again, if this is your thing, have at it but please don’t subject the rest of us to it on your blog or other Web sites.

Vishnu Haridas has a post that echoes my feelings. In his case, low contrast dark mode sites mess with his eyes and even afterwards he sees artifacts induced by the dark mode text. He also finds high contrast text unreadable although that doesn’t bother me. I just need the text to stand out so I can distinguish it from the background.

Haridas notes that there are, in fact, standards about all this. Although he doesn’t find them completely satisfactory, at least they help make text readable. Of course, all this could be avoided if folks would only embrace the light and eschew the loathsome dark mode.

Posted in General | Tagged , | Leave a comment

Escape From Walled Gardens With RSS

I am not on Facebook. I’ve never been on Facebook. I’m not on Twitter/X. I’ve never been on them. My entire social media profile consists of Irreal. I’ve always had an aversion to things like Facebook and Twitter without really understanding why. Even after it became clear that that they were mainly about harvesting your information for advertising purposes, I didn’t really think much about my initial aversion.

Taliesyn Walker has a nice post that helps explain some of this. The problem with Facebook and the others, he says, is that they’re walled gardens that curate the information they show you in such a way as to increase your engagement and influence you in various ways. The problem is that you have no control over what you see and what you don’t see.

The answer, according to Walker is RSS. He describes it as a distributed information system that lets you choose whatever content you’re interested in without any intermediaries filtering it for nefarious reasons. I agree with all that and have, in fact, said much the same.

If, like me, you’re already convinced that RSS is the way to get your content, Walker’s post is still very valuable. One of the supposed downsides to RSS is that it’s harder to discover content. Walker shows lots of ways of doing that and to do things like follow YouTube feeds without having to actually subscribe to YouTube and deal with Google.

Finally, there’s the issue of RSS readers. Walker has many suggestions but neglects to mention the best RSS reader, Elfeed. I’ve been using it for a few years and it’s just perfect for me. I can customize what I see in a number of ways and, of course, the source code is right there if I need it to do something completely new. It runs under Emacs, of course, which is another benefit.

Lots of folks say they use Emacs just to get Org-mode or Magit and I’d add Elfeed to that list. It’s that good. In any case, take a look at Walker’s post. It’s well worth a read.

Update [2025-01-25 Sat 11:08]: Majit → Magit. Thanks to Andrés Ramírez for the heads up.

Posted in General | Tagged , | Leave a comment

Reliability

We often see claims that such and such an application has \(99.\cdots\) reliability. That seems pretty definitive but what does it really mean? Here’s the answer. The difference between 99.9% and 99.99% is significant. By the time we get to 99.99999%, we’re essentially at zero downtime.

We see these types of numbers all the time but it’s nice to see what they really mean in terms of downtime.

Posted in General | Tagged | Leave a comment