🥩 Red Meat Friday: AI FOMO

Observant Irreal readers will have noticed that I hardly ever write about AI and its attendant hoopla. I recognize that it has shown itself useful in certain restricted domains but I can’t shake the feeling that it’s mainly a magic trick powered by statistics, about which Benjamin Disraeli purportedly said, There are lies, damned lies, and statistics.

Everyone in the tech world, and elsewhere, is talking about AI and there is a strong, if subtle, pressure to get onboard. Terence Eden says no and rejects the pressure to avoid being left befind. He compares the AI hype to the previous hype about cryptocurrencies. Remember them?

Eden recalls being told to avoid being left behind on cryptocurrencies or “enjoy being poor”. The whole argument struck him as strange. From what was he going to be left behind? If, and when, he said, BitCoin and its siblings became useful, less volatile, reliable, and easier to use, he could adopt them then without the attendant risk of being an early adopter.

He feels exactly the same about AIs. As I said above, he has found them marginally useful in specific domains but not generally ready for widespread use. Indeed, in the journalism business, for example, they seem mainly useful for getting journalists fired.

If the AI tech proves to be as amazing as they claim, he says, there will plenty of time for him to adopt it. In the mean time, he’s not wasting time and effort on what may prove to be another technology that never realizes its claimed potential.

Posted in General | Tagged | Leave a comment

Some New Packages

Over at Bicycle For Your Mind, macosxguru reports that despite his good intentions to stop tweaking his configuration and absorb what he already had installed, he found that there were so many excellent new packages that he had to add them.

I can confirm that the packages he lists are, indeed, brand new and just released. There were so many of them last week that I couldn’t write about them all. Here, for the record, are the new packages that he’s just installed. Take a look at macosxguru’s post for more details.

Kirigami
A sort of general fold and unfold package that works everywhere. I almost wrote about this last week but ran out of time.
Visible-mark
Make the marks visible. Which marks and their appearance is configurable.
Javelin
Quick bookmarks for Emacs.
OPML to Org
Converts OPML files to Org files.
Appine
App in Emacs. This is a very interesting package that allows the embedding of macOS views such as WebKit, in Emacs. I didn’t get a chance to write about this but I definitely want to research it more. It looks like it could be very useful.
Buffer-guardian
I did write about this in conjuction with super-save. It automates the automatic saving of buffers when various events like loss of focus or timer expiry happen.
Isearch-lazy-count
A package that numbers the targets for isearch.
Markdown-table-wrap
Wrap Markdown tables to a fixed character width.
Surround.el
I wrote about and installed this package. It deals with adding and deleting surrounding delimiter pairs and more. I really like this package.

All of these packages are worth looking into if you have a need for their functionality.

Posted in General | Tagged | Leave a comment

Moving From Obsidian To Emacs

Curtis McHale runs an online book club where readers share their posts on the current book. He’s been using Longform in Obsidian but it kept corrupting his data organization so he decided to move to Emacs. His site requires Markdown but he decided to go all in on Org mode so he needed a way to convert his old Markdown posts to Org and then to export his Org files to Markdown.

Migrating from Markdown to Org was easily handled by Pandoc. When exporting from Org to Markdown there were a couple of problems. The easiest problem was smart quotes: " and ' are mapped to the HTML entities &ldquote;, &rdquote;, &lsquote;, and &rsquote;, which is not what McHale wanted. He fixed that by simply turning off with-smart-quotes.

The slightly harder problem was footnotes. The Org exporter handles them correctly but presents them as a Top Level heading, which doesn’t work for him because he has each post for a book as a separate subtree in the book’s Org file. He fixed that with a bit of post-processing that mapped # Footnotes to #### Footnotes.

His post has a video that shows him stepping through all this if you prefer a visual presentation. He uses Doom Emacs so that may be a bit disorienting to those who are used to vanilla Emacs.

In any event, it’s a nice post that shows how Emacs can easily handle tasks that you were using more complicated apps like Obsidian to do.

Posted in General | Tagged , | Leave a comment

OrgFolio

Chris Maiorana takes a lot of notes. He’s a writer after all. Once he’s taken those notes, he wants an easy and convenient way of viewing them. These days that usually means viewing them as a Web page.

Org mode, of course, has all the machinery in place to do this essentially automatically but Maiorana has some problems with it. He has multiple notebooks and finds it a pain to set up the ox-publish scaffolding for each one.

But this is Emacs so, of course, it’s easy to automate the process. Maiorana did that by writing a simple script, he calls OrgFolio, that

  1. Deletes the existing Web content
  2. Builds the scaffolding to export the Org files and exports them
  3. Copies any static content, such as CSS files
  4. Spins up a local Web server to show the content

All of this is kicked off from the command line with a call to Emacs in batch mode. It’s easy and has no overhead. It does require building everything from scratch,. which could be a problem for a large set of notes. That’s one of the reasons that Maiorana keeps a separate notebook for each topic.

I take copious notes about everything but they’re mainly for me so I see no need to export them to HTML. I’m perfectly happy to see them in plain text, just as I wrote them. That said, I do write them—complete with Org markup— as if they were going to be exported.

Still, if you take a lot of notes and would like to consume them as a Web page on your own private Web site, take a look at Maiorana’s post. His Elisp script is easy to read and modify if you want to adjust it for your own needs.

Posted in General | Tagged , | Leave a comment

Mistake: Not Embracing Emacs Fully From The Beginning

Eric MacAdie has a contribution to this month’s Emacs Carnival that talks about his major mistake in learning and using Emacs. That “mistake”, he says, was not embracing Emacs completely when he was introduced to it. Instead, he learned only a few commands—he estimates about a dozen—and limped along with those. He might as well have been using Notepad.

Fortunately MacAdie did finally fully embrace Emacs and started to learn as much as he could about what it had to offer. This wouldn’t have been much of a story except that I keep seeing people expressing the attitude that they’re too busy to learn Emacs. “Why doesn’t it just work out of the box?”, they ask.

The thing is, it does work out of the box. To be sure, your Emacs life will doubtless involve customizing it to fit your specific workflow but Emacs is perfectly usable without making a single change. The thing is, you have to be willing, as MacAdie was, to actually make the effort to learn Emacs in order to realize its full power.

Learning Emacs is not trivial but it’s also not that hard. Irreal has published plenty of stories detailing its advanced use by non-technical people, most recently here. If you want to advance beyond, say Notepad, put in the effort to learn Emacs. It will reward you far in excess of your effort.

Posted in General | Tagged | Leave a comment

Chris Maiorana On Hl-line-mode

A couple of years ago, I wrote about Chris Maiorana’a post suggesting that writers adopt a one-line-per-sentence workflow. You can read his post on the matter to see his arguments on why. At the time, I wrote that I used that method for my two books but because it worked better with the [GT]roff typesetter rather than for any writer workflow reasons. Since moving to Org mode for my writing I’ve given it up not least because it doesn’t play well with WordPress where a lot of my writing ends up.

Maiorana is back with another post on the subject that those who embrace the method may find useful. His idea is to use Emacs’ hl-line-mode to highlight the current line. That brings some other benefits to the one-line-per-sentence method that Maiorana describes in his latest post.

I used to use hl-line-mode, although not in conjunction with one-line-per-sentence, but stopped because it interacted poorly with some other mode—probably visual-line-mode where it highlights whole paragraphs. Even when I was using it, I sometimes found it annoying despite it being useful for locating the current line. I’m sure I’m in the minority on that so you should definitely give it a try if you’re not familiar with it. It’s builtin so you can simply toggle it on for the current buffer with Meta+x hl-line-mode to try it out.

Posted in General | Tagged | Leave a comment

Saving Emacs Buffers Automatically

A couple of months ago, I wrote about friction in saving files. Emacs, of course, tries to protect you from unsaved buffers by periodically backing them up to a special file. Recovering data from that file can be a bit finicky and since Emacs and modern computers don’t crash very often, you don’t get a lot of practice.

A long time ago, Bozhidar Batsov solved that problem with super-save that saved buffers whenever the buffer loses focus or perhaps every few seconds. It’s all configurable, of course. In the mean time, James Cherti wrote buffer-guardian.el that does pretty much the same thing.

Cherti’s solution took advantage of more recent Emacs features to provide a more reliable solution. When Batsov “stumbled upon buffer-guardian.el” he decided to revisit super-saver, which he hadn’t touched since 2023. He’s improved the detection of buffer focus change no matter how it’s invoked. There are a several other improvements that you can read about in Batsov’s post.

I’m inclined not to like my software doing things automatically that I’m used to asking for explicitly so neither buffer-guardian nor super-saver appeal to me but I’m probably in the minority on this so many of you probably will like using one of these packages. As I say, I don’t use either one so I can’t comment on their relative merits but they both seem like useful and worthy packages.

If you’re bad about saving your files and worry that you may lose work, you should take a look at these packages. One or both of them may be just what you need.

Posted in General | Tagged | Leave a comment

🥩 Red Meat Friday: User Hostile Websites

A month ago I wrote about why I was still using an ad blocker. The TL;DR was that unfiltered websites have become too horrible to be usable. Ads popup to cover the content you’re trying to read, videos play—and loudly—without being invited, and the site doesn’t stabilize for quite a while. Sometimes this activity continues for as long as you’re on the site. Take a look at this site without an ad blocker to see what I mean.

I’m not the only one who has noticed this. Over a Daring Fireball, John Gruber has a post that discusses this problem by reporting on Shubham Bose’s post on The 49MB Web Page. Bose’s post gets its name from this experience:

I went to the New York Times to glimpse at four headlines and was greeted with 422 network requests and 49 megabytes of data. It took two minutes before the page settled.

Gruber and Bose explore this phenomenon and explain why it happens. It’s obvious that the dreadful user experience that these sites deliver aren’t for the readers’ benefit but, they argue, they’re also not for news sites’ benefit. The only ones who benefit are the diseased surveillance-based advertising industry.

The readers lose because it takes time and cognitive overload to read a simple story. The news sites lose because abusing readers is not sustainable and those readers will abandon the news sites when they’ve had enough. But the news sites have decided on the short term advantage of a few ad impressions rather than the long term advantage of sustaining and growing their readership. As I said, only the execrable surveillance-based advertisers win.

It’s way past time that we, the readers, started refusing to play this game and simply ignore the sites that abuse us. My guess is that it would have already happened were it not for the fact that every sane person is using an ad blocker.

Posted in General | Tagged | Leave a comment

Surround.el

That didn’t take long. After yesterday’s post on adapting Bozhidar Batsov’s delete-surrounding-pair function to handle Org markup, Batsov is back with a post on surround.el, a port of surround.vim from Michael Kleehammer. The point of delete-surrounding-pair was to (sort of) emulate Vim’s surround plugin. Now with support.el, there’s no longer a need for delete-surrounding-pair.

Surround does everything delete-surrounding-pair did and a lot more. You can delete surrounding pairs, add pairs, change pairs, mark or kill the content between the pairs, or even kill the text and the surrounding pair. It really is a splendid package and I’ve already added it to my configuration and deleted my adaption of delete-surrounding-pair.

Surround will check if the pair you’re operating on has different opening and closing characters and do the right thing automatically. The other nice thing is that there aren’t a lot of key sequences to remember. Once you pick a prefix that you’ll remember the (single) action keys are mnemonic and easy to remember. In any event, which-key pops up a reminder.

I installed it with the recommended prefix of Meta+ but keep wanting to invoke it with Hyper+ so I’ll probably change it but, regardless, I’m already enjoying using it.

Take a look at Batsov’s post or the Github repository for all the details. Batsov’s post has some recommendations on when you should use it and Kleehammer’s repository has information on shortcuts and auto mode, which you should read. This is a really useful package and I recommend that everyone take a look at it.

Posted in General | Tagged | Leave a comment

Delete Org Markup Pairs

The other day I wrote about Bozhidar Batsov’s post on deleting paired delimiters in Emacs and mentioned that he included a bit of Elisp that—sort of—duplicated the behavior of Vim’s surround.vim. The idea is that if you are in a delimited expression and invoke the function, it will ask what delimiter you want to delete and will delete the closest enclosing pair. That obviously has some shortcomings such as not recognizing if one of the delimiters is in, say, a string. Still it’s handy code that does the right thing in most cases.

The code was interesting but I thought I didn’t need it because delete-pair already handled all the cases I was concerned with. As I was writing about Batsov’s post, I had something like =some text= and realized that I didn’t want it displayed in monospace after all. Since delete-pair was on my mind, I tried it but of course it didn’t work because = isn’t a delimiter that delete-pair recognizes so I deleted them by hand.

Later, I realized that I could simply add the Org markup pairs I was interested in to Batsov’s code so I did that and added it to my init.el. It worked perfectly and now I have an easy way of deleting Org markup .

It’s worth noting that Org mode gives you a way to do the opposite too: if you highlight some text and call org-empasize (Ctrl+c Ctrl+x Ctrl+f) it will add the Org markup you choose to the highlighted text.

Note

After I wrote this post, I found out about surround.el. More about that tomorrow.

Posted in General | Tagged , | Leave a comment