Update to Writing a Thesis With Org Mode

Last year I wrote about Daniel Gomez’s post on writing a PhD thesis with Org-mode. Gomez’s post was an excellent exposition of the workflow that he used to write his thesis using Org. One of the most useful features was how he handled his “research chapters,” which had already been submitted to journals for publication. The journals, of course, had their own formatting requirements and some content in the journal article was not appropriate for the thesis (and vice versa).

Gomez put together a framework to handle all these—and other—issues that he described in his post. He did not, however, include the framework itself, although he did say he was considering making a repository for it. Happily, he has done just that and made it available on GitHub.

Formatting content for a Thesis suffers from the same problems that formatting it for a journal does: every school—indeed, every department—has its own rules and standards rigidly enforced by a little old lady in the graduate school who can hold up acceptance of your thesis until those standards are satisfied. It is, therefore, impossible to provide a single framework that will work for everyone, everywhere but you can take a framework such as Gomez’s and tweak it to work for your situation. Mostly that’s going to involve choosing the proper LaTeX class for your thesis. Gomez uses the mimosis class but says everything will probably work with other classes.

If you’re getting ready to write your thesis and would like to do it in Org-mode, be sure to take a look at Gomez’s original post and the framework itself. Even if you don’t use it, there are plenty of good ideas to make the mechanics of the writing easier.

Posted in General | Tagged , | Leave a comment

Is Emacs an Editor Framework?

Over at the Emacs sub-reddit, yep808 says that he thinks of Emacs not as an editor but as an editor framework that allows you to build the editor you really want. He asks if others share this view. It is, of course, a widely held perspective but as Irreal oldtimers know, not one that I think is precisely accurate.

My view is neatly captured by rhabarba’s comment which posits that, “GNU Emacs is a Lisp machine emulator which can (but does not have to) start a text editor application by default.” I’ve long held that the real power of Emacs comes from that fact: that Emacs is, in fact, a light-weight Lisp Machine.

Sadly, it’s nowhere nearly as powerful (a software system) as the original Lisp Machines but it does allow us to do all sorts of non-editing things like using it as an RSS reader, or music player, or Email client, or any number of other things. And, of course, we can easily build our own applications in Emacs Lisp.

It might seem as if it doesn’t matter how you view Emacs but I believe thinking of it as a Lisp Machine has a definite benefit: it encourages the view that Emacs is a programmable environment in which you can build all sorts of applications that are only peripherally, if at all, related to text editing. Once you adopt that point of view, you can start really tapping into the power of Emacs by writing code to solve your own problems.

Posted in General | Tagged | Leave a comment

Long Lines in Emacs

One of the (legitimate) complaints about Emacs is that it doesn’t do very well with excessively long lines. Happily, this isn’t a problem for me. I write my blog posts with visual line mode enabled and fill disabled so Emacs sees each paragraph as a single line. Despite that, I never run into problems so it’s not a issue for many (or perhaps even most) users.

Still, if it does effect you, it can be a real annoyance: Emacs can take a considerable amount of time to render the text. Happily, help is on the way. A fix for the long lines problem has been added to the 27.1 Master branch. Some early 27.1 adopters are reporting excellent results with the fix.

If you follow the link at the top of reddit link above, you will see the documentation for the changes. It’s worth reading that to get a feel for how the changes will affect working with long lines.

This change should—but probably won’t—put to rest the notion that Emacs is an old, moribund editor still alive only because a few gray beards refuse to let go. It shows that development is strong and on-going and even long standing issues are being worked on and resolved.

Posted in General | Tagged | Leave a comment

Reverse i-search With Ivy

As I’ve written many times, one of my most used and useful packages is abo-abo’s Ivy/Counsel/Swiper suite. Happily, he is always tweaking it, making it better with each iteration. He latest tweak rethinks the reverse i-search command (Ctrl+r) used in Bash. The problem, he says, is that you have to invoke Ctrl+r repeatedly while you search for the command you want.

Abo-abo applies the Ivy UI to this action so that you get a list of possible completions that can narrowed in a fuzzy manner. That’s great for when you’re in shell mode but abo-abo, of course, brought the functionality back to Emacs itself so that you can, for instance, use it when opening a file with counsel-find-file.

The updates are already in Melpa so if you’re up-to-date with your packages, you can start using the functionality immediately. You’ll need to set a couple of key bindings but that’s all. Take a look at abo-abo’s post for the details of setting things up.

As I’ve written before—most recently here—if you haven’t yet tried Ivy/Counsel/Swiper, you owe it to yourself to give them a try. Different people like different things, of course, but it’s hard for me to see why anyone wouldn’t like the Ivy/Counsel/Swiper suite. Helm users have basically the same functionality but Ivy and friends are a bit lighter weight and at least one Helm user that I know of switched after trying Ivy out.

Posted in General | Tagged | Leave a comment

Internet Villains: Never Mind

Last Saturday, I wrote about the UK ISP trade group that decided to nominate Mozilla for the annual Internet Villain award for the crime of making DNS lookup safer and more secure. Of course, it also made it harder for the ISPs to spy on their users, build profiles of their interests, and redirect bad DNS requests to a page that tries to sell the mistaken domain. You can see why they were upset.

Don’t worry they say. It was all a joke. Just a little lighthearted humor. And besides, we’ve withdrawn the nomination even though we still think they’re guilty as hell. The Register decided on a bit of lighthearted humor of their own. They were merciless in their ridicule of the group, its behavior, and its inadequate apology. The takedown is worth reading even if you don’t care about the issues.

The piece begins with “The brain-dead Internet Service Providers Association (ISPA) has backtracked on its nomination of Mozilla as an ”internet villain“ for 2019 after online outcry.” and ends with “ISPA is another warm chunk of sloppy garbage floating in the toxic hell soup of the modern internet that’s made the 2010s so joyless and tiresome at times. Ah, oops, there we go again, being all light-hearted and that.”

Sandwiched between those two quotes is a takedown so devastating that I wouldn’t be entirely surprised to see the ISPA disband. Or at least change their name. One thing for sure, no one is going to take them seriously anymore.

Posted in General | Tagged | Leave a comment

The Cool Kids Don’t Use Emacs

I was a bit put off by this tweet:

The problem isn’t LIBRENEITOR, who is, after all, an enthusiastic Emacs user despite what the cool kids say or do. My problem is with the notion that the “cool kids” don’t use Emacs.

I don’t think it’s true. At least not for any reasonable definition of “cool kids.” But suppose it is true. Who, then, are the cool kids? I submit that by and large they are just like the cool kids in high school who ended up pumping gas after graduation. In modern terms, they are the hipsters. Or to put it a third way, they are unserious people.

If you’ve been around Irreal for a while, you know what tools I think serious developers prefer. Maybe that’s just because I’m an older developer and don’t know any better but it seems to me that people who wax rhapsodic about editors like VSCode or Atom always say the same thing: “It’s so much prettier than Emacs.” They never claim that they’re more powerful because, of course, they’re not, just that they’re prettier. I agree with Vivek Haldar: “why should you ever care how your editor looks, unless you’re trying to win a screenshot competition?

Sadly, even Emacs users can be affected by this silliness. Consider this reddit post bemoaning that out-of-the-box Emacs is so ugly. Notice that the complaint isn’t about lack of functionality; it’s about appearance. Experienced Emacs users get rid of as much appearance as they can. They disable the tool bar, the menus, and the scroll bar. They value usable screen real estate over eye candy and they certainly don’t want to have to use the mouse. And by the way, light themes are better; it’s science. You don’t want to be a science denier, do you?

By now many of you probably have a mental image of me waving a cane and yelling at kids to get off my lawn. That’s probably not entirely unjustified but I do wish folks would treat their editors as tools to be valued for their functionality instead of as an extension of their wardrobes.

Posted in General | Tagged | Leave a comment

Pausing Emacs Keyboard Macros

Seven or eight years ago when Tim Visher was still producing his VimGolf in Emacs videos, one of his favorite tricks was using the full power of Emacs keyboard macros. Most Emacs users know about keyboard macros and can manage straightforward applications of them to perform a repetitive task. Visher, though, was a master and knew how to use them interactively to accomplish amazing things.

One of his tricks was to place a prompt for a query in the middle of a macro that would allow the user to perform some special action specific to the current item the macro was on (see this episode for example). I learned those methods at the time but because I seldom have need to use them, I’ve mostly forgotten about them.

Happily, Marcin Borkowski (mbork) recently posted an update to his previous post on keyboard macros that I wrote about last week. In his new post, he talks about pausing a macro and also about adding a query prompt that allows you to enter a recursive edit and perform an action unique to the current item. It’s really great to be reminded of this because while I may not need it often, when I do it’s extraordinarily useful. Take a look at Borkowski’s post for details on how to add a query to a macro. As I say, you probably won’t need it too often but when you do, you’ll be glad you now how.

UPDATE [2019-07-10 Wed 13:43]: Added link to Borkowski’s post.

Posted in General | Tagged | Leave a comment

Files As Org Capture Templates

Josh Rollins has a very nice tip on a feature of Org-mode capture templates that I didn’t know about. It turns out that you can store a capture template in a file. It’s not immediately clear what that means exactly or why you’d want to do it in the first place.

The main use case appears to be a long and complicated template, possibly with formatting. In Rollins’ case, the template is a check list for setting up new computers (Rollins is an IT support technician). When a request is initiated for a new computer, he wants to capture the essential data and add the check list to his project file. I have a similar requirement that I handle by having a yasnippet expand to my desired body but that’s not as seamless as Rollins’ method.

What goes into the file is the string containing the text and substitution escape codes. That makes it easy to have a complicated body of data along with special formatting. In Rollins’ case, he wants the indentation of sublists to be correct, something he couldn’t figure out how to do with the usual method of specifying templates. The file mechanism is invoked by replacing the string containing the text and escape codes with the form

(file "file-containing-template")

where the "file-containing-template" contains the text that would normally be in the text string of the capture template. Take a look at Rollins’ post for more details. If you use the capture facility a lot, this tip will probably be useful to you.

Posted in General | Tagged , | Leave a comment

Ten Years

Ten years ago today, the first ever Irreal post appeared on Blogger. It’s amusing to read what I thought the blog was going to be about. To be sure, I do sometimes write about Lisp and Scheme—although not so much lately—but these days Irreal mostly covers Emacs, privacy, and the occasional technical subject that strikes my fancy.

After a couple of years, I moved Irreal from the Blogger platform to my own domain running WordPress on a rented virtual server. About 7 years ago, I started posting everyday. As I said at the time, that’s way harder than you’d think it would be but by now it’s become second nature. Since June 1st of 2012, I’ve posted everyday except for a very few occasions when I was sick, there were network issues, or a hurricane came calling.

Going forward, I don’t expect much to change. Doubtlessly, Irreal will continue to evolve reflecting my interests at the time but I don’t envision any sudden shifts in emphasis or content. I’ve been using Emacs for more than a decade and have learned that I still have a lot to learn so I’m pretty sure that Emacs coverage will continue at about the same level as it has now. Privacy violations by governments and corporations infuriate me as much as they ever have so expect coverage of that to continue as well.

I’ve become more interested in leveraging my digital lifestyle as a way of simplifying my life. My post on everyday carry reflects that and I expect I’ll be writing more about such things in the future. I’m far from mercurial but my interests do mutate so I’m sure I’ll be writing about entirely new things too.

I’m looking forward to Irreal’s second decade. I hope you are too.

Posted in General | Tagged | Leave a comment

VisiCalc Redux

A month ago, I wrote about Dan Bricklin’s TED talk on VisiCalc. Bricklin’s talk was in honor of the 40th anniversary of the modern spreadsheet. The spreadsheet idea was an old one but it was so labor intensive that it was used sparingly. Bricklin’s idea of implementing the spreadsheet on a low cost personal computer—the Apple II—changed everything. It’s hard to overstate how much VisiCalc, Lotus 123, and the others revolutionized business.

Happily, we don’t have to imagine. Steven Levy, famous for being a chronicler of the computer revolution has reprinted a 1984 article that explored the then new spreadsheet and how it had to a large extent turned businesses upside down. In typical Levy style, it’s a long and thorough article. It’s well worth reading whether or not you were there at the time.

David Cassel has a shorter article on the same subject. He also makes the point that VisiCalc was the first killer app. People were buying Apple IIs just so they could run VisiCalc. Steve Jobs credits VisiCalc with driving the success of the Apple II.

These days the original spreadsheets are all gone. Microsoft’s Excel and, to a lesser extent, Apple’s Numbers have almost all the mindshare. Still, it’s hard to imagine running any business (or even personal finances) without a spreadsheet. It’s interesting to see how it all started.

Posted in General | Tagged | Leave a comment