Red Meat Friday: See? This Is Why We Needed The Revolution

As a nice coda to yesterday’s post, Liam Proven offers this bit of heresy:

Spaces around em-dashes? Reason enough to split from Great Britain.

Actually, this is interesting. I didn’t realize em-dash spacing was a British/American thing. I sometimes see spaces around em-dashes and it always looks wrong to me. It seems like it negates the whole purpose of the dash. Of course, it’s not a moral question. Folks are free to put spaces around the em-dash if they like. Even if it is blasphemous.

Posted in General | Tagged , | 2 Comments

Em-dash, The Video

Family obligations are intervening today so all I have to offer you is this video paean to the em-dash. If you’ve been around Irreal for a while, you know I’m a big fan but not nearly so much as Alexis Gay.

Thanks to John Gruber for the link.

Posted in General | 1 Comment

Emacs Dev Update 2021

Another talk in the 2021 EmacsConf program is John Wiegley’s video on what’s coming in Emacs. Almost all of the talk is about new features in Emacs 28, of course. The talk is only 7 minutes, 17 seconds long so you should watch it if you have any interest in Emacs and where it’s going.

Here’s a list of the features Wiegley covers, cut from the talk transcript:

  • Native compilation
  • Build with Cairo by default
  • New mode, but off by default: context-menus
  • Tab-bar and tab-line received many enhancements
  • A command can marked as specific to a mode
  • Transient input methods
  • show-paren-mode is enabled by default
  • We now have a Non-GNU ELPA
  • repeat-mode
  • project.el has dozens of new commands
  • Shorthands for Lisp symbols

Again, if you’re an Emacs user, you should definitely spend the time to watch this.

Posted in General | Tagged | 0 Comments

Orgdown

This is another post that discusses a talk from EmacsConf 2021. This one, by Karl Voit, is about the Org-mode markup language. Org markup is superior to its competitors—sorry Markdowners, you know it is—but suffers from the fact that it’s strongly tied to Emacs. Part of the problem is that the name “Org-mode” is used both for the markup language and for the implementation of the Emacs package that includes the language and much more.

Voit’s suggestion, as discussed in his talk The use of Org mode syntax outside of GNU/Emacs, is to consider the markup language as a separate entity and rename it to Orgdown to avoid confusion between the language and its implementation in Emacs. In addition to his post about Orgdown, you can watch his EmacsConf talk about it.

He has more to say, of course, than just, “Hey, let’s rename the Org-mode markup language.” His proposition is well thought-out and already supported by a repository on GitLab with documentation. His video is just over 12 minutes and definitely worth watching if you have any interest in the Org-mode language even if you aren’t an Emacs user. It’s also enjoyable to watch because it has excellent production values.

There has been some pushback on his proposal but most of it seems to be borderline ankle biting about his choice of name, “Orgdown”. There’s a lot more to his proposal than a name, of course, so be sure to read or watch what that proposal is before you make up your mind about it.

As an Emacs user, none of this is vital to me but I do think it’s a good idea and that it could provide a much needed standard lightweight markup language. Markdown, of course, was intended to fill that roll but it has splintered into several dialects. Voit’s suggestion is intended to avoid that.

Posted in General | Tagged , | 0 Comments

Org Executables

Over the weekend, the 2021 EmacsConf took place and presented a slue of great talks. Irreal will mention at least a couple of them starting with Tom Gillespie’s astounding talk on how to make Org files executable.

The first question is what does it mean to make an Org file executable? The TL;DR is that you add some boiler plate to the Org file so that you can call it as if it were a shell script. The resulting file works under all the common shells including, even, powershell. That turns out to be harder than you might think but happily Gillespie has made the process essentially turnkey.

He has added a package to Melpa to initialize an org file with all the needed boiler plate so that all one has to do is add the code block to implement whatever the script is intended to do. You can get all the details from the video of the talk or from the transcript of it. Both are available at the above link.

The video it short—only 7 minutes, 9 seconds—so it should be easy to fit in. People are always asking how to make Elisp programs executable without explicitly calling Emacs. Gillespie’s package lets you do this almost automatically. Take a look at the video; you have nothing to lose but seven minutes.

Posted in General | Tagged , | 0 Comments

V7 and the History of Unix

Among Unixheads, the Seventh Edition (V7) holds a special, almost mystical, place. Many consider it the best of the various Unix versions. In his Minix book, Tanenbaum remarks, “It is sometimes said Version 7 was not only an improvement over all its predecessors, but also over all it successors.” The source code has long been available and I have always found it the easiest to read and learn from.

Chris Siebenmann has a blog post with his own take on the importance of V7. He agrees with most of what I’ve written above but notes that V7 is historically important because it is the base from which (almost) all subsequent Unices are derived. If you understand V7, you’re well on your way to understanding everything that came afterwards.

Siebenmann goes further and says that V7 was the last pubic release from the CSRC (the Bell Labs researchers who invented Unix) and thus represents the last release made by those who really understood the Unix way. Those who came later, Siebenmann says, brought their own sensibilities to table and lacked the appreciation and understanding of Unix that its originators had.

If you like Unix and are interested in its history, you should definitely take a look at Siebenmann’s post. It’s interesting and reasonably short.

Posted in General | Tagged | 1 Comment

Tree Sitter and Syntax Highlighting

Mickey Petersen author of the the excellent book Mastering Emacs and the blog of the same name has another of his comprehensive and informative articles on his blog. This time it’s about tree sitter and its application to syntax highlighting in Emacs.

Even though we take it mostly for granted, syntax highlighting is actually a devilishly difficult problem. Emacs and almost every other editor does it with a witches’ brew of regular expressions and ad hoc functions. The results are usually, but not always, good enough. The correct method, of course, is to build a syntax tree of the code and use that to inform the highlighting. There’s a whole host of problems with that approach. In the first place, the code you’re editing probably isn’t syntactically correct because it’s incomplete. Secondly, the naive solution of rebuilding the tree with every keystroke is too slow to be practical and there are other problems as well.

Mickey has a solution: use tree sitter to drive the highlighting. If you don’t know about tree sitter or what it’s used for, head on over to Mickey’s post for the details. Tree sitter can do more than just figure out syntax highlighting. Mickey mentions the excellent ParEdit and its use in Lispy languages. Mickey wanted to extend that capability to other languages, Python in particular.

He’s built a package to do just that. He calls it combobulate. It’s still alpha software but you can try it out if you like. Mickey says he’ll put it on Melpa as soon as he works out a few more issues. Mickey believes that the tree sitter approach is the future for addressing these types of problems.

I know I keep saying this but tree sitter and Emacs’ embrace of it once again puts the lie to the notion that Emacs is moribund technology. The reverse is true. Emacs keeps introducing new capabilities that other editors copy and then use to support their claims of superiority.

Posted in General | Tagged | 2 Comments

Emacs as a Lifestyle

Bozhidar Batsov made an interesting observation that several people have mentioned or commented on. The TL;DR is that Batsov thinks that Emacs can be considered a lifestyle. If you’re an Emacser your reaction is probably like mine: it’s not literally true but it does capture a certain truth concerning how we feel about Emacs.

For me, the essence of that feeling is captured by Stephen Ramsey’s reply to the tweet that started the whole thing off.

I usually express this by comparing my Emacs configuration to a Japanese garden: It’s a work that’s always in progress but never finished. The gardener spends his life improving the garden little by little and striving for a perfection that is never reached. So it is with our Emacs configurations: A neverending search for an ideal never achieved.

Posted in General | Tagged | 0 Comments

Proportional Fonts in the Mode Line

Lars Ingebrigtsen has an interesting post about proportional fonts in the Emacs mode line. His post shows the same mode line in both fixed and proportional fonts. There’s no arguing that the proportional fonts look better and that they allow for the display of more information on the mode line.

Still, the suggestion to move to proportional fonts is an old one and has always been controversial. There are some serious objections. For one, things like the point position are updated with every character typed and that can cause the mode line display to shift right or left.

Ingebrigtsen says that they’re running a month long test on Emacs Master in which proportional fonts on the mode line are enabled by default. They’ve installed a fix for the problems of things like the point position and the developers are hoping that that will address previous objections to using proportional fonts.

Regular readers know that I don’t care much about this sort of thing. All in all, I’m happy with a fixed width font mode line but I don’t find the idea of proportional fonts objectionable either. If you’re tracking Emacs Master, be sure to let the developers know what you think.

UPDATE [2021-11-26 Fri 13:15] Emacs 28 Master → Emacs Master.

Posted in General | Tagged | 1 Comment

Guile Hacker Handbook

I recently came across the Guile Hacker Handbook, a work in progress that’s worth a look for any Guile hackers. After some sections on installing Guile (and Emacs) the handbook considers various Scheme constructs and how to use and test them in Guile.

It’s a nice resource. My only criticism is that it jumps right into using modules and bypasses one of Scheme’s virtues: its simplicity. The R5RS Scheme specification that I learned from was 50 pages long, eminently readable, and told you everything you needed to know. You could spend an hour reading it and start writing Scheme programs. It’s absolutely the easiest programming language to learn that I’ve every encountered. It was amazing how far you could get with this simple language.

Still, it wasn’t really great for “professional development” because it didn’t have many of the amenities that modern languages provide. Subsequent versions of the language added things like modules to address these deficiencies. The additions have been controversial. The purists pine for the R5RS days and those who want to use Scheme for “real” programs wanted to move forward. R6RS Scheme, in particular, was controversial and never achieved traction.

The thing with Guile is that it’s an extension language. The original idea was to replace things like TCL as an extension language for GNU programs. R5RS is perfect for that. The current Guile implements most of R5RS and R6RS and is often used as a primary language for programs. Still, it’s useful to approach Scheme through its simplicity and then move on to modules and all the rest. I believe the handbook would do better to follow that path.

Even so, the Guile Hacker Handbook is useful to those who want to use Guile and is definitely worth a look. Again, it’s still a work in progress but what’s there is useful.

Posted in General | Tagged , | 3 Comments