Stories From The Internet

If you’re like me, you love those weird stories about seemingly impossible things happening with computers and the Internet. My favorite is A Story About Magic. Even if you know the story, follow the link to see a picture of the actual switch in one of the comments.

One of the most perplexing stories is The 500 Mile Email. A seemingly impossible tail that turns out to have a simple answer.

And, of course, there’s the famous The Story of Mel, a real programmer. Every computer geek of my generation knew the story and none of us believed it was real but it was. Follow the link above to find out about Mel.

If you love these types of stories, here’s a wonderful reference for you. It’s got links to the stories above as well as many others. I’m keeping it in an open tab in my browser so I can read one or two stories a day. They’re not all as good as the Magic story or as baffling as the 500 mile email but they’re all worth reading and fun for the real geek.

Posted in General | Tagged | Leave a comment

Installing By Default With =use-package=

Bozhidar Batsov has a handy tip in his latest post. He, like me, organizes the package management of his init.el around use-package. It works well for him but he has a complaint. He almost always wants to install the packages by default but has to specify :ensure t for each package that he wants loaded by default. He has, he says, more than 50 packages so this is a nuisance.

There is, however, an easy solution. You can simply set use-package-always-ensure to t and all packages except those with :ensure nil will be loaded by default. Batsov notes that some people don’t like loading packages by default because of version issues but that this has not been an issue for him.

It hasn’t been an issue for me either. But neither has specifying :ensure t for each package. I have, according to a quick check with keep-lines, 70 instances of use-packages. All of them specify :ensure t and I’ve never considered this an irritant even though I know about use-package-always-ensure.

Still, I understand and support the urge to make everything as simple as possible so if you’re an use-package user and want to load all or most of your packages by default, Batsov shows a way of doing that with a little less effort.

Posted in General | Tagged | Leave a comment

Watch Duty

As most of you know, I’m an Apple user so Six Colors, a site dedicated to Apple news, is in my feed. I just noticed this article about Watch Duty, an app that tracks wild fire information and makes it immediately available to those at risk from the fires. The Six Colors article is fairly short but it points to a longer article from The Verge about the app and the people behind it.

Despite being featured on Six Colors, Watch Duty is cross platform and available on both iOS and Android. The entire point of Watch Duty is about protecting people from the fires. It’s not about engagement, tracking users, gathering user information, or making money.

Take a look at The Verge article to see why this app is needed. The fires, often driven by 90 MPH winds, can overwhelm an area in just a couple of minutes. The current government based warning systems often have a 15 minute lag time. The difference can be measured in lives. Watch Duty’s primary objective is to provide useful information in the shortest possible time so that people can make informed decisions on what to do.

Currently all the attention is, of course, on the California wild fires but Watch Duty plans to extend coverage to the entire U.S. and even over seas. It’s a perfect example of what the Web and current technology can and should provide: an apolitical, not-for-profit service dedicated to helping people and saving lives.

There’s plenty of room on the Web for making money too and Irreal’s not against that but sometimes there are more important things. I know this first hand because members of my family lost their house in the California fires. By lost, I mean nothing left but ashes. Happily they’re safe and I don’t know if they used Watch Duty but this is an app that can save peoples’ lives. We should all support it as much as we can.

Posted in General | Tagged | Leave a comment

Class Notes In Emacs: Teachers’ Edition

I’ve written in the past on my astonishment about people who are able to take mathematics class notes in LaTeX fast enough to keep up with the instructor: 1, 2, and 3. Some people who do this use Emacs, some use Vim. In either case, it’s breathtaking to watch them.

Now Matt Maguire takes a look at it from the other side: producing class notes for students. Speed is not an issue here, of course, but getting a workable system involves more than just writing some LaTeX formulas and publishing them.

Maguire has a specific format in mind and has been producing notes in it for some time directly with LaTeX. But as an Emacs user, we wanted to leverage Org mode to simplify the production of the notes.

The nice thing about his exposition is that it’s widely applicable. You may not be a teacher or you may not want to produce notes involving mathematics but if you want to use anything other than the standard LaTeX article class, you have some work to do. Maguire’s post tells you how to set up another class and other custom settings you need for your unique environment.

All this may seem like a lot of work but you only have to do it once. After that, you just write whatever it is in Org as usual. The post demonstrates one of the (many) strengths of Org mode.

Update [2025-01-12 Sun 11:22]: Added link to Maguire’s post.

Posted in General | Tagged , | Leave a comment

Converting Markdown to Org

Charles Choi has a handy tip on converting from Mardown to Org. My first thought was that I don’t care about this because I write everything in Org Mode and never use Markdown. But then it occurred to me that the same is doubtless true of Choi as well and that someday I’m going to want to import a Markdown document into Org.

Choi’s basic process is to cut and paste the Markdown document into Emacs and then use Pandoc to convert from Markdown to Org. But there’s a problem. Pandoc will wrap lines while Choi likes to keep paragraphs as a single line. I do that too because it’s how visual line mode works. The excellent Pandoc has us covered, of course. You need only specify --wrap=preserve to get the desired behavior.

With that bit of wisdom, Choi gives us a handy function that will convert the Markdown in the current region to Org. It’s probably worthwhile adding his short function to your init.el just so you’ll have it when the need arrives. If you don’t like cluttering up your init.el with things you’re not actively using, at least bookmark his post so you’ll know what to do when the need arises.

Posted in General | Tagged , | Leave a comment

🥩 Red Meat Friday: Notepad Vs. Emacs

Of all the pretenders to the Emacs crown, notepad strikes me as the most ludicrous. I am not, apparently, the only one. This cartoon captures my feelings exactly.

The Emacs haters were, of course, out in force trying to deflect your attention from the essential truth but we keepers of the faith were not deceived.

Posted in General | Tagged , | Leave a comment

Using Ediff On Regions

One of the Emacs powerhouses is Ediff. Every time I think I’ve found a better way of comparing files, it turns out that I just didn’t understand Ediff well enough. It can seem intimidating but as Prot informed me it really pretty simple if you ignore all the complications. I took his advice and can only agree with his assessment.

Now James Dyer has his own take on Ediff. His particular use case is comparing regions rather than whole files. It turns out that there are two functions, ediff-regions-linewise and ediff-regions-wordwise that will use Ediff to compare two regions in the usual Ediff way.

The documentation recommends that you use ediff-regions-wordwise for small regions and ediff-regions-linewise for larger regions. In either case, once you set up the regions to be compared you use Ediff in the usual way. Take a look at Dyer’s post to see how to set up the regions. It’s straightforward and easy to remember once you use it a couple of times.

It’s a nice post and well worth reading even if you don’t need to compare regions right now. You probably will in the future and even if you don’t remember the details, you’ll know what to look for when you do.

Posted in General | Tagged | Leave a comment

Extracting Email Addresses

Mike Zamansky has a late Christmas present for us but, as they say, better late than never. This particular present is another video in his Using Emacs series. In this video he considers the problem of extracting all email address from an Emacs buffer.

The original problem was that Zamansky had several documents, including spreadsheets, that contained email address and he wanted to get a list of all those addresses for further processing. Being an Emacser, his first thought was to extract all the text into an Emacs buffer and work from there.

That extraction amounted to cut and pasting, which, while not particularly satisfying, is probably optimal considering the many types of documents involved and the fact that is was a one-off. Once he has all the text into an Emacs buffer, the rest is relatively easy. Zamansky’s solution was to put together a bit of Elisp to do the job. The value of the video is his walking us through the process of doing that.

One of the things I really like about Zamansky’s videos is that he doesn’t clean them up. You see his mistakes and fat fingering and that helps you understand the process much better than just viewing a polished video of the final result.

Accomplished_Will_31, in a reddit comment, notes that occur can do a lot of this more easily. That’s probably true but the real value of the video is seeing how Zamansky puts together his Elisp solution. His process is applicable to a wide range of problems whether or not occur offers a shorter solution.

The video is 17 minutes, 56 seconds so plan accordingly. Like all of his videos, this one is well worth spending the time on.

Posted in General | Tagged | Leave a comment

Shopping Lists With Emacs

Kris Carta has a nice post on a problem we all have: handling grocery shopping lists. If you’re single and a geek, this is not a problem. All sorts of solutions suggest themselves. The problem comes when you have a significant other that is not a geek but still likes to organize things on the computer.

If one or the other of you does all the meal planning and shopping it’s not too big a problem but in most households, both partners are making suggestions and adding things to the shopping list. If, in addition, the technical partner is an Emacs geek, the problem becomes how to import the non-technical partner’s suggestion into Emacs and how to export a final list to a smartphone application that either or both can use while shopping.

I wrote about this eight years ago and not a lot has changed. Carta is an Apple user and wanted to produce a shopping list in the iOS Reminders app. That’s what we do at the Irreal bunker too and it works well. All of us here, geek or not, is perfectly capable of using Reminders and marking off items as we buy them.

Carta has a separate wrinkle. He and his wife have always planned their meals in Notion and they wanted to export the items on their meal lists to their shopping list. Even though Carta is new to Emacs, he was able, with help, to figure out how to get the Notion data into Emacs and from there to isolate the food items for the shopping list and export them to Reminders. This leverages Applescript, which is definitely a pain, but provides functionality not available on other platforms.

Here at the bunker, we just enter the list into Reminders directly. That’s easier but not as pleasing to our geek sensibilities.

Posted in General | Tagged | Leave a comment

Recognizing Repeated Tasks In The Org Agenda

Thanks to Alex Popescu for pointing me to this nice post from Wai Hon about marking repeated tasks in the agenda listing. Why would you want to do that? Han explains it in his post: if you mark a repeated task as done but forget to readd the repeater, the task can disappear. Marking agenda tasks as repeated helps to prevent that.

Fixing the problem is pretty easy but involves a few lines of Elisp. Take a look at Han’s code for the details. It’s only a few lines and relatively simple. If you object to having to use Elisp, Han provides a couple of alternative solutions one of which doesn’t involve writing Elisp.

One could dismiss all this as a non-problem or at least a problem too small to worry about but we Emacers are all about reducing friction wherever we find it and this is a nice example of that. Regardless, if you sometimes find yourself having to base your next action on whether or not the current task is repeating, take a look at Han’s post.

Posted in General | Tagged , | Leave a comment