Video Trimming In Emacs

On Monday, Marcin Borkowski (Mbork) published a post on extracting a video clip from within Emacs. It seemed like a useful tool to have and I was going to write about it but Sacha mentioned it on Emacs News before I got a chance. Unless I have something pertinent to add to the discussion, I generally don’t write about things that Sacha has already covered.

This time, Álvaro Ramírez came to my rescue by publishing his own take on the problem. Ramírez says that he’s been meaning to implement such a feature to his Ready Play Mode and that Mbork’s post gave him the nudge that he needed to do it. His post has a nice animated GIF that shows the result in action. It’s pretty impressive.

Ramírez says that the whole thing took about 300 lines of (Elisp) code and rather than adding it to his post, he provided a pointer to it in his repository because, as he says, he’s probably going to be tweaking it so you might as well get the latest version.

If you’re an Emacs user and sometimes want to extract a clip from a video, you should take a look at these two posts.

Posted in General | Tagged | Leave a comment

The James Bond Logo

As a teenager, I loved the James Bond novels. I would buy them from the supermarket when they appeared and even drove to the library a couple of towns away to check out the ones I couldn’t find in the supermarket paperback stand. I read them all and later I enjoyed seeing the early movies.

All the movies were fun, I guess, but the later ones became a bit silly. After Sean Connery quit the franchise, I pretty much lost interest in the movies but still saw most of them if only out of habit. As an adult, the James Bond stories, other than the annual movie, faded from my consciousness. A couple of years ago, I reread my childhood favorite, On Her Majesty’s Secret Service and found it a bit boring.

Lately I’ve rekindled my interest in Bond by reading Jeffery Deaver’s Carte Blanche.. Ian Fleming is, of course, long dead but Deaver has, I think, captured his tone well and the story seems as if it could have been written by Fleming.

None of this would be worth writing about were it not for this post from Dariing Fireball. If you’re a Bond movie aficionado, you’ll be aware of the iconic Bond logo formed from “007” in the shape of a gun. Here’s an example. If you’re like me, you probably thought it was sort of cool but never gave it much thought. It turns out, though, that there’s an interesting back story about the logo. The Daring Fireball post is reporting that Joe Caroff, who designed the logo, has died at 103. Take a look at the post to see the story of logo and how Caroff came to design it. It’s an interesting piece of Bond lore.

Posted in General | Tagged | Leave a comment

Hey! I know. Let’s Make Another Boeing

In an apparent attempt to prove that stupidity is a bipartisan trait, the current administration has decided to force Taiwan to acquire a 49% interest in Intel. The U.S. government thinks that the survival of Intel is essential to the national interest and is using the threat of tariffs to force the Taiwanese chip manufacturing sector to essentially merge with Intel.

They have some precedent. A little more than 25 years ago, the Clinton administration decided that McDonald Douglas was in trouble but needed to survive so they pressured Boeing into merging with them. We all know the result of that. The suits from the failing McDonald Douglas captured control of the new company and destroyed the engineering culture that had made Boeing the apotheosis of aeronautical manufacturing. What happened next was that planes started falling from the sky.

If Intel is failing it’s because they’ve made some bad decisions not because they need some new patsy’s money. Extorting money from Taiwan will probably do little to solve Intel’s problems and it could, as with Boeing, contribute to the failure of both Intel and the Taiwanese chip industry. I’m pretty sure that that wouldn’t be in the U.S. national interest either.

Government meddling in engineering is even worse than management doing so. It almost always ends in tears and the purported benefits never seem to appear. It’s practically a cliche that government attempts to pick winners and losers never achieve anything but grief. But, it seems, we never learn.

Posted in General | Tagged | Leave a comment

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