Some Configuration To Solve Common Problems

Remember how, when you first started using Emacs, there were all those strange defaults that just didn’t seem right. The worst one, for me, was scrolling. I hated the way the screen would jump when you got near the top or bottom. That feature alone caused me to abandon Emacs more than once.

Of course, like everything in Emacs, that’s configurable but it’s hard for n00bs to know what to do about such things. Sooner or later we all discovered the magic spells to get things more to our liking.

Over at The Emacs Cat, there’s a nice post that shows how to configure things in what many of us consider a saner way. Decent scrolling is covered as is making Emacs Emacs talk UTF-8 exclusively. Both of those took me a long time and a lot of experimentation to get right.

There’s also a section on getting rid of the common annoyances such as having to type “yes” instead of simply “y”, making tabs sane, getting rid of the bell and tool bar, and—for those of you who love controversy—ending sentences with a period and single space.

There’s also a section on some useful modes that you can enable, such as winner-mode, global-hl-line-mode, desktop-save-mode, and help-window-select. I didn’t know about that last one but I’ve frequently been annoyed that I have to switch over to the Help window so it seems useful.

There are a few more useful tweaks that you may or may not want. I found it surprising how closely Emacs Cat’s choices echoed mine. We don’t agree on everything but it’s surprising how much we do agree on. In any event, take a look and see if there’s an answer to a problem you’re having.

Posted in General | Tagged | Leave a comment

Styling Text In Org Mode

As most of you know, I follow Charles Choir’s work and often use and recommend his apps. I especially like his Casual Apps, which generally make dealing with little used features easier. I was, therefore, eager to read his latest announcement about Styling Text via Keyboard in Org and Markdown. I have to admit, the whole thing left me scratching my head.

When I read the headline, I thought, “What do you mean via keyboard? Isn’t that what happens right now?” It turns out that what he means is specifying the styling markup with a word—“bold”, “italic”, “code”, etc—rather than the single character markup that Org already uses.

I’m not sure why anyone would want to do that. I suppose it’s marginally easier to remember “bold” than it is to remember “*” but not much. I can’t remember ever having a hard time remembering the single characters. Of course, different strokes for different folks as the hippies were fond of saying so I don’t really object to using the words instead of the characters.

What I do object to his having to interrupt my writing flow to bring up a menu for the styling. Take a look at the video to see what I mean. One his goals was to have his system figure out what to apply the styling to based on the position of the point. With the current system, I get to determine that exactly how I want it. I just surround the text I want styled with the appropriate markup character. Yes, there are some edge cases but they never get in my way and even if they did, it’s usually fixable by adjusting a regex.

Still, if you’re one of the people who like specifying your markup in longhand, Choi’s system looks worth checking out.

Posted in General | Leave a comment

Sorry, No Posts Yesterday Or Today

The Irreal bunker is in the midst of a family health emergency and I haven’t had time to prepare the usual drivel for your amusement. Everything seems to be settling down so I’m hopeful that the bunker and the Irreal blog will be back to normal soon.

In the mean time, please bear with me. We’ll get back to our regularly scheduled bloviating as soon as possible.

Posted in Blogging | Tagged | Leave a comment

Digital Vs. Analog Notes

Over at The Art Of Not Asking Why, JTR has a couple of posts that explore his struggle with deciding between digital and analog note taking. None of you will be surprised where I come down on the issue—I’m all in on living a digital life and eschew using pen and paper as much as I can—but it’s informative to read about JTR’s thought process about how he decides which method to use.

To be honest, I don’t understand his ambivalence about the matter. He lays out the case for both and shows that, except for a vague feeling of attraction to writing with pen and paper, the digital method is more efficient and satisfying. The digital product is so much more useful and flexible that it seems there should be no question as to which to use.

One thing he says that really resonated with me is that if he writes a lot with a pen, his hand cramps. That definitely happens to me too. Related to that is speed.

When I was still young and was hunt and pecking on an actual typewriter, an adult told me that it was really hard to type faster than you can write by hand. That seems laughable to me now. I can type much faster than I can write. A lot of that is probably because my handwriting is so bad that I print everything but it’s still a fact.

I, too, like the idea of sitting down with a beautiful paper journal and good pen but the results aren’t that useful. I can’t back them up. I can’t carry them on my iPhone. I can’t easily link them to and from other notes.

I write virtually everything in Org mode. The main exception is the memo book that resides on my iPhone and I simply import those notes directly into an Org mode table so that they, too, end up living in Org. All of this is automatically backed up, searchable, portable to my iPhone, and easy to link to.

If you really need the feel of pen on paper, take up calligraphy. It will satisfy your need for handwriting without sacrificing the usefulness of your notes.

Posted in General | Tagged , | Leave a comment

Getting Car Sick With Lisp

Just a quickie today. Over at the Lisp subredit, breck says that he used to program in Lisp but got car sick. It’s a pretty weak pun but the commenters took up the challenge and kept the ball rolling. DrownNotably says, “you cdr done better.”

The rest of the comments were similarly funny. If you have a couple of minutes free and want to spend them enjoying some humor, take a look at breck’s post. The whole thing, including the comments, is short so you won’t have to spend much time.

Posted in General | Tagged , | Leave a comment

Writing A Book

Over at Parenthetically Speaking, there’s an interesting post on why you should write a book. It’s mainly aimed at academics but its lessons apply to anyone who has something to share. That’s actually a lower bar than you might think. You don’t have to have a PhD to have something worth saying. Most practicing engineers with a bit of experience have things to say that would be useful to other, especially younger, engineers.

The post is is divided into three parts:

  1. You can write a book
  2. You should write a book
  3. Mechanics

The first two parts are written specifically for academics but can, as I say, can apply to anyone with something to say. The interesting part, to me, is the mechanics. “Mechanics” in this context means not so much the tools you use as the actual means of publishing. The idea is to eschew “professional” publishers and make your material available for free.

I published both my books through a publisher and although it can be a bit more work, you do have the cachet of having an actual publisher putting out your book. On the other hand, making your text freely available gets the word out to more people more efficiently.

Currently, it’s easier than ever to write a book. These days, I prefer to write everything in Org mode. With Org, it’s easy to rearrange material and edit your text. When you’re happy with what you’ve written, you can export to HTML, PDF, or even Docx with a simple key press. The process could hardly be easier. The writing part is still hard, of course, but the mechanics are easy, especially if you leverage Emacs and Org.

Update [2024-11-18 Mon 12:16]: Added link to post.

Posted in General | Tagged , , | Leave a comment

On Standing Desks And Received Wisdom

Some of you may have noticed that I can occasionally be cantankerous—I prefer to think of it as being charmingly eccentric—about certain topics. Whatever you call it, there’s no denying that I’m inclined to view any subject that could be described as “received wisdom” through nasty, suspicious eyes.

It all began with chocolate. When I was a child, I was told not to eat chocolate because it caused cavities. When I was a teenager, they told me it caused pimples. As a young adult, they said it was full of fat and would cause heart problems. All those claims turned out to be false and now they’re telling me that all that sugar will cause my liver to fail. That claim will probably turn out to be false too.

If you were lucky enough not to have suffered from the chocolate myths, here’s another: the food pyramid. For my entire life and almost certainly yours, the food pyramid was received wisdom and everyone was encouraged to eat what turns out to be an unhealthy diet. Fifty years of bad diet because, you know, the food pyramid. It was received wisdom so it must have been true.

That brings us to today’s topic: standing desks. I don’t use one and I’ve never thought much about them but every time I saw something about standing desks and their putative benefits I got that little tingling that is my received wisdom alarm. Now from Science Alert we have this article claiming that standing desks may be less healthy than sitting. When you do actual studies, you find that

  1. Standing desks are no better for cardiovascular health than sitting
  2. Standing desk may actually be more harmful than sitting

Like all such examples, this conventional wisdom make sense. It seems like it should be true. Only like chocolate and the food pyramid it probably isn’t.

So what’s the takeaway? View all instances of received wisdom through skeptical eyes. Then maybe you can be a curmudgeon too.

Posted in General | Tagged | Leave a comment

M-x Occur

Kristoffer Balintona has a nice post on Emacs occur. If you have moderate familiarity with Emacs, you have probably used occur on occasion. I use it all the time but still wasn’t aware of everything it could do.

Happily, Balintona is here to fill in the blanks. The information is all there in the documentation, of course, but it’s easy to miss it when skimming through the doc looking for the information that you need.

The first significant thing is that you can restrict the action of Occur to a specific region of the target buffer. You probably won’t want to do this very often but it’s easy to see how it could be useful. The second significant thing is the number of lines of context.

You can specify how many lines of context before and after the matching regex to include but you can also specify a string in which case what is displayed acts as a replacement string. You certainly won’t need that capability a lot but when you do, it’s perfect.

Take a look at Balintona’s post or the documentation for the details. This is another example of how learning Emacs is a lifelong endeavor. You learn bits and pieces of a certain functionality but later discover that it’s much richer than you believed.

Posted in General | Tagged | Leave a comment

Is Emacs Practical For Real World Use

In another in a seemingly unending sequence of such questions, sav-tech, over at the Emacs subreddit asks if Emacs is useful in practical life. I’m not sure what he thinks all we Emacs users are doing if it’s not practical but let’s take his question as being in good faith.

As usual, all the action is in the comments. The main thing that I noticed is that people using VS Code and the like always say that it does what they need right now. That’s because those editors are configured to provide the conventional services. It’s great. There’s no setup required, you just start using it to do what you need to do.

The problem is what comes next. Sooner or later you’re going to need to do something that the VS Code developers didn’t consider and you’re going to be out of luck. With Emacs, you’re also going to find yourself wanting to do something the developers hadn’t anticipated. The difference is that with Emacs you can simply add the capability. Often this doesn’t require anything more than a keyboard macro or some shortcut configurations. If you learn a little Elisp, you can make Emacs do anything you want.

Sav-tech says that someone on Discord told him that Emacs is a monolithic editor, takes only 20–40 minutes to learn, and, anyway everyone is using VS Code now. That’s a fact free statement by someone who has no idea what he’s talking about. Read the comments if you want your faith in the judgment of software engineers restored.

You can use Emacs, VS Code, or whatever works best for you but let’s at least try to keep the discussion informed.

Posted in General | Tagged | Leave a comment

Compile Angel

James Cherti has announced a new package, Compile Angel. The idea is to keep all your Elisp files compiled with both the byte compiler and the native compiler. It has modes to compile any outdated “binaries” when a modified Elisp file is saved or when one is loaded. Both compilations are important because byte compilation helps Emacs to load faster while native compilation, of course, help Emacs run faster by generating native hardware code.

In his announcement, Cherti explains how Compile Angel differs from auto-compile. The TL;DR is that Compile Angel is lighter weight and compiles more files than auto-compile.

This seems like a nice package. Strictly speaking, it’s not necessary, of course, but it’s another way reducing the friction of maintaining your Emacs installation. Unless you’re the type of person who enjoys a completely hands-on approach to system maintenance, Compile Angel is probably worth looking into.

The project GitHub repository is here but except for the code is essentially the same as the announcement.

Posted in General | Tagged | Leave a comment