Revisiting Recent Files

When you open a file, do you like Emacs to remember where you were when you last visited the file and return you to that place? I’m probably a minority but I find that behavior annoying. Of course, I can see why people would like that capability. The nice thing about Emacs is that you get to choose. As with most things in Emacs, you can have it your way.

James Dyer is one of those people who like having Emacs take him right back to where he left off when he opens a file. It’s a small part of his larger workflow for dealing with recent files. What he wanted was a list of recently used files, ordered by most-recently-visited, that would allow him to easily revisit a file and be positioned at the cursor’s last position. He discovered that recentf-mode and save-place-mode did almost what he wanted. The only problem was that recentf-mode opened its list of files in a separate buffer. Dyer wanted a more completion-like interface. It turns out that recentf-open-files does that but, annoyingly, the files get reordered.

Dyer solved this with a tiny bit of Elisp. You can read the details in his post. If you, too, like being able to revisit recently edited files and be taken back to the exact position where you left off, take a look at his post.

To me, the most interesting part of Dyer’s post comes at the end. His changes, he admits, are a small optimization but one that makes his workflow a tiny bit smoother. As he says,

That’s the kind of workflow improvement that makes every day at the keyboard just a little bit more pleasant, and those small pleasures add up to something significant over months and years of coding.

Who can argue?

Posted in General | Tagged | Leave a comment

The org-copy-visible Command

This post is about a posting by Marcin Borkowski (mbork) from a couple of weeks ago that I’ve had sitting in a browser tab since then. Sacha already covered it so I wasn’t going to replow that ground but I kept thinking that the day would come when I would need to know how to copy some Org mode text without including the link markup. So this post is sort of a note to myself but also to anyone else who missed seeing the original or its mention in Emacs News.

The basic idea is that you have some Org text that contains links and you want to copy it to some
inactive text where the links aren’t live. Rather than have the link appear as [[https://someplace.com][a link to some place]], you’d like them to appear simply as a link to some place.

This is Org mode and Emacs so of course there is a way. Org has the command org-copy-visible that does just what you want. It even has a keyboard shortcut: Ctrl+c Ctrl+x v.

You’re probably not going to need this often but when you do, it can save a lot of tedious labor. That’s why I’m recording it here so that I can find it later when I need it.

Posted in General | Tagged , | Leave a comment

Emacs 30.2 Has Been Released

Eli Zaretskii writes that Emacs 30.2 has been released and is ready for download. It’s a bug fix release but still worth installing. As usual, I built mine from source. I had a bit of difficulty downloading the tar and signature files because the mirrors hadn’t yet updated. By the time you read this, the mirrors should be up to date.

I’m writing this in Emacs-30.2 and haven’t experienced any problems. Once I got everything downloaded, the compile and install experienced no problems.

As usual, I want to express my thanks to Eli and all the other devs who selflessly contribute their time and efforts to keep Emacs the best in class editor. These guys are heroes and if you ever find yourself in the same bar as one of them, drinks should be on you.

Posted in General | Tagged | Leave a comment

What Is An Emacs Page?

I’ve been reading Peter Provo’s’ book Emacs Writing Studio and one of the points he makes early on is that “word processing” is different from what it used to be. The traditional paradigm considers word processing from the point of view of the printed page but that’s no longer a useful way of looking at it. Today the written word may be published as HTML on the Web, as an e-book, as a text file, or even as a traditional printed book. Prevos’ point is that GUI word processors are no loner fit for purpose.

Oddly, Emacs never embraced the traditional paradigm, probably because it started life as a code editor and only later came to be used for writing books and other “published” entities. That raises the question of what an Emacs “page” is and how you work with it.

Many Emacs users are probably unaware that there is such a construct. The closest thing they’re familiar with is the “current screen”, which can be paged forward and backward with Ctrl+v and Meta+v. But how much data is displayed on the that screen depends on how many lines there are in the current window.

A “page” is different. It doesn’t depends of the window size and doesn’t even necessarily have a uniform size even in the same file. A “page” in Emacs is simply the text between two special markers—line feeds, ^L, be default. Hardly anyone uses them these days but they can be useful for organizing a text file into sections for easy navigation.

Charles Choi notes that although there are forward page (Ctrl+x ]) and backward-page (Ctrl+x [) commands, they don’t act in the way you might expect, which is the put the top of the page at the top of the screen.

Naturally, Choi has a solution. It’s a bit of simple Elisp that calls forward/back-page and then recenters it so that the top of page is at the top of screen. If you’re interested in working with pages, take a look at Choi’s post.

Posted in General | Tagged | Leave a comment

Save It In Markdown

My recent post on Markdown Versus Org Mode engendered some limited but spirited engagement so I thought it would be nice to followup by writing about a post I’ve had sitting in a browser tab for sometime. Piotr Migdał writes that If it is worth keeping, save it in Markdown. The title may seem aggressively pro Markdown but the point of Migdal’s post is to embrace plain text as your data storage medium. He just happens to use Markdown but mentions Org mode as another equally good choice.

His point is that as long as there are computers and UTF-8, your data will be safe if you store it as plain text. That’s important because, as he says, “If you publish something online, sooner or later, it will vanish.” The only way to be safe is to save your data in some sort of plain text. This is consistent with my opt-stated rule not to entrust the only copy of your data to a third party.

A lot of Migdal’s post is how he goes about this. My case is simple. I write virtually everything in Org mode that gets saved in one Org file or another or, perhaps, in my email archive. The only exception is my texts which I generally write using emacs-everywhere but don’t bother saving. It wouldn’t be hard to put a wrapper around emacs-everywhere to save my side of the conversation but I’d still be missing the other side. In any event, most of my texts aren’t worth saving.

Migdal makes a good point and his post is worth reading.

Posted in General | Tagged , | Leave a comment

Two From Ridenour

I like the posts of Randy Ridenour because he’s (definitely) a non-technical user who nevertheless has managed to learn and use Emacs in an advanced way.

One indication of this is his post on inserting bible passages. As Ridenour says, it’s not a capability that many people need but what impresses me is that he managed—despite not being a programmer—to write some Elisp to help with this. Sure, maybe you could do better—even Ridenour admits this—but, again, he’s not a programmer. I find this inspiring and a testament to the power of Emacs and the ability of any reasonably intelligent person, even if they lack technical expertise, to make effective use of even the advanced features of Emacs.

Last week, I wrote about Ridenour’s contribution to the Emacs Carnival Writing Experience. This week, Ridenour accepts the Emacs Carnival Elevator Pitch challenge. I think his pitch is the response that best adheres to the restrictions of an elevator pitch. It’s short, non technical, and will make perfect sense to anyone, technical or not. Doubtless there’s someone who can adduce a counter example but all-in-all I find his argument persuasive.

As I’ve said before, I think the elevator pitch challenge is particularly difficult but Ridenour’s solution seems like the perfect response: short and persuasive.

Posted in General | Tagged | Leave a comment

Markdown Versus Org Mode

I think it’s fair to say that virtually everyone with knowledge of and an opinion on the matter would agree that on the technical merits Org mode is clearly superior to Markdown. The differences in syntax are trivial and don’t really matter. What makes Org superior is Babel—enabling the inclusion of executable code snippets that can effect the host document—and a single, official definition of the language as defined by its reference implementation. It’s also arguably true that Org has a better export system but Pandoc neatly fills that gap for Markdown.

Some people point to Org’s tight integration with Emacs but lots of editors, including Emacs, have “modes” that similarly integrate Markdown. Others claim that Org does a better job with metadata.

Markdown’s claim to superiority is that “everyone uses it”, making it a sort of lingua franca of markup languages. While Org mode is, as a practical matter, restricted to Emacs, Markdown can be used with any editor so of course its use is more widespread.

But what if you’re an Emacs user? I can’t think of a single reason to prefer Markdown to Org mode1. What to make of this then? Hezha98, an Emacs user, wonders if he should switch from Org mode to Markdown on the grounds that Markdown is more popular. That’s a silly reason, of course, but what’s surprising to me is that many of the commenters support his changing to Markdown. Not one of them used collaboration—which, I suppose, might be a reason to use Markdown in Emacs—to justify their choice. I don’t understand their choices.

But, of course, whatever you prefer Emacs is there for you. The Org mode support is better for sure but Emacs also supports Markdown mode. As always, Emacs has your back.

Footnotes:

1

There are some people who simply prefer the Markdown syntax but they’re pretty much outliers because, as I said, the syntax differs only in trivial ways.

Posted in General | Tagged , | Leave a comment

Two Elevator Pitches

As I mentioned last week, this month’s Emacs Carnival challenge is to make an elevator pitch for Emacs. It’s a pretty tough assignment. Realistically, you have less than a minute to convince your captive audience that they should give Emacs a try. I’m not sure I’d be up to it.

We do, however, have two bloggers willing to try. Christian Tietze and Jakub Nowak have each offered their take on the matter. Although they use slightly different approaches, their pitches are remarkably similar. They both emphasize that with Emacs you get a uniform interface and a minimum of context switching. Rather than dealing with separate applications and their different interfaces for your tasks, you can bring the majority of them under the Emacs umbrella and enjoy a single interface for all of them.

There are menus if you want them but, for me, a chief strength is that you can do everything without using a mouse. After all, Emacs was developed for use on a terminal long before the ascendancy of mice.

It’s interesting to me that both Tietze and Nowak chose to stress interface consistency. It is, for sure, an important aspect of Emacs use but, surely, there are more important aspects to discuss. The problem is that it’s hard to discuss those other aspects in the time required for an elevator ride. Perhaps interface consistency and lack of context switching is the best approach.

I’d guess that most people don’t think much about different interfaces and context switching until someone points the problem out to them. Perhaps that makes them a good elevator pitch. What do you think?

Posted in General | Tagged | Leave a comment

Emacs As A Word Processor

Many commentators, Irreal included, are fond of pointing out that even if you need to deliver your writing product in some sort of Word compatible format, you can still write in the comfort of Emacs and Org mode. All you need do is export your Org document as an ODT document. That sounds pretty simple but, of course, there are some annoying details to navigate.

Peter Prevos, proprietor of the excellent Emacs Writing Studio, has a very nice video that steps you through the process and covers all the bothersome details. Prevos starts with a sample Org file that contains a bit of mathematics, some citations, some tables, some figures, and various headings. The final goal is to produce a DocX document.

Getting to DocX is a two step process. First you have to produce an ODT document and then use something like LibreOffice to convert that to DocX. That’s not too onerous but there are lots of pesky details.

First, dealing with mathematics is hard because ODT doesn’t deal with the LaTeX markup so you have to either turn it into a png or convert it to math ML so ODT can deal with it. It’s a pain but neither option is too hard to actually do.

A similar thing happens with citations. If you’re exporting to, say, HTML or PDF, everything happens automatically but, of course, the Word sphere is different. Again, it’s not that hard to get it to work but it’s just another detail that’s hard to discover.

Finally, Prevos reminded me about his Emacs Writing Studio book. I’ve been meaning to get it for some time so I downloaded it from LeanPub. I’ve bought several books from LeanPub and have been very happy with them. Updates are free and they send you a notice when they become available. If you don’t want to use LeanPub, you can find links to various ways of ordering the book on the Emacs Writing Studio Website.

If you’re one of the poor souls who wants to write in Emacs but has to deliver a Word product, take a look at Prevos’ videos for some valuable hints.

Posted in General | Tagged , | Leave a comment

A Little Bit Of Humor

I have no idea if this is legitimate but I find it hilarious. It does seem like Google, though.

Posted in General | Tagged | Leave a comment