Internationalization of Text Strings with Emacs

I’ve had this topic in my blog queue for a couple of weeks but I noticed literally scores of tweets pointing to the post in question. That was enough to make me forego my own post on the subject but on rereading the original post, I realized there are some good ideas in it regardless of what’s going on with the tweets.

The post, by Dylan Kirby of MojoTech, discusses to problem of internationalizing text strings in an application that will be used in more than one country. Kirby discusses the problem in terms of the React framework but almost exactly similar problems occur anywhere you need internationalization. I’ve done my share of that in C where we used the GNU gettext library. It’s always a pain and, truth to tell, I avoided working on it whenever I could slough it off to my colleagues. I’m a bad person, I know.

Regardless, Kirby and his colleagues were stuck with doing it and he noticed that it was mostly repetitive work. They used Google Translate to provide a first order translation that was later refined by a human translation service so a first hack at the translation could be automated along with the rest of the mechanics.

You can get the details from Kirby’s post but the most important lesson from his account for me is that it serves as an answer to why you might prefer an Emacs “lisp-machine-like” environment to the pure editing environment of Vim. Kirby’s problem is representative of a common class of problems that are easy to automate with Emacs. My Vim-foo is rusty enough that I don’t see an easy way to do the same thing in Vim, especially the querying of Google Translate. You can argue that you don’t want to read emails in Emacs or use it to listen to music but, believe me, if you have to deal with internationalization, you’ll be happy to have a way of automating it as much as possible. It’s just one more reason that I’m glad to be an Emacs user.

Posted in General | Tagged | 1 Comment

How The Teletype Works

If you’re like me and enjoy seeing how the mechanical marvels—like the Mergenthaler Linotype typesetter—that were used before computers took over everything worked, you many enjoy this film on how the teletype operates. It’s from 1940 and considers the mechanics of sending telegrams at that time.

The subject came up in The Unix Heritage Society mailing list in a thread about the Model 37 Teletype (a common early Unix input device) and the observation that it implemented a mechanical shift register. You can see that in the linked film even though it’s not about the Model 37.

Another interesting thing is the production quality of the film. These days, something like this would be a YouTube video, probably of dubious production quality. This film is like an eleven minute movie. Of course, that’s all there was then. They had enough trouble digitizing a telegraph character: digitizing video was doubtlessly still a distant dream, although television was starting to become available.

Posted in General | Tagged | 0 Comments

Line Numbers in Emacs 26.1

As you’ve probably heard, Emacs 26.1 has replaced the old linum-mode with a faster and less cluttered implementation. I almost never need or want line numbers so they’re normally turned off but for the occasional times when they’re useful, I have a custom key sequence to turn on linum-mode on a buffer basis. I replaced that call to the new facility by calling display-line-numbers-mode instead. They look a lot nicer and don’t slow things down as much for large files but I still don’t use them much.

Others disagree. I just watched a Xah Lee video on Abrev mode (I’ll be writing about that later) and noticed he had them turned on globally, presumably with global-display-line-numbers-mode. David Crook also likes to turn them on globally but he didn’t want them to display in his neotree buffer. He’s posted what he had to do to stop them from cluttering up his neotree buffer. It was harder than you might think so if you have the same or similar problem, you should take a look at his post to see how to fix things.

If you’re one of the people who likes line numbers in your buffers, you’ll appreciate how much the facility has been improved. Just another example of how vibrant our developer community is and how far from moribund Emacs is, no matter what the naysayers tell you.

Posted in General | Tagged | 2 Comments

The Macalope Takes Down Tech Addiction

I keep writing about the silliness known as “tech addiction.” I can’t help myself but I’m not going to seek help. I’m not going to seek help because somehow has to call BS on this nonsense. Now the Macalope comes galloping—or is it loping—to my aid with his own takedown. It’s the Macalope so of course his article is written from an Apple-centric point of view but what he says travels well.

He starts with a story in Wired of a picture from Apple’s latest WWDC in which a person is looking at his iPhone rather than following the events on stage. See? Tech addiction. It’s robbing us of our ability to concentrate and focus. The thing is the person is Rene Ritchie, the editor-in-chief of iMore and as he later tweeted, what he was doing was taking a picture. In other words, he was using his iPhone to do his job by taking a picture of the action. Some might say the very definition of focus and concentration.

That’s not an isolated example. The Macalope offers another story where the Twitter set lose their collective minds over a group of school children who appear to be ignoring a Rembrandt painting while they stare at their smartphones. Of course, it turns out that the students were doing research for a school project on the art.

As amusing as these stories are, they are examples of how the Tech Addiction Police go looking for trouble and keep finding it where none exists. As I pointed out in my Tech Addiction is Not Real post, even experts in addiction psychology don’t believe there is such a thing. Others though, those with something to sell, are pushing the meme and, for example, offering Apps to provide a “less distracting” home screen.

It’s no doubt true that not everyone pushing tech addiction has a financial motive but they should consider that, as the Macalope says, we keep using our smartphones because they’re useful. They’re how we catch up on the news, keep in touch with loved ones, listen to music, read books, and do research. Of course we use them a lot.

Posted in General | Tagged | 0 Comments

We Have Always Been at War with Spam

Via Wilfed Hughes we have:

Over 150 years and we still haven’t won. Or made any progress for that matter. Maybe if we all complain to The New York Times.

Posted in General | Tagged , | 1 Comment

Mu4e-conversation

As I’ve said before, I’m not a fan of threading in emails. That’s mainly because it’s not that useful for the type of emails I deal with but I’m aware that most people have different workflows and probably do like threading. For those people who also use mu4e, Ambrevar has an excellent solution to some of the problems with threading.

Although it’s still in early development, Ambrevar has released his package, mu4e-conversation, to Melpa. The idea is to show all the messages in a thread together in a single buffer. That makes for a more natural reading of the thread and it’s possible to assign colors to each participant in the thread to further aid in understanding who’s saying what.

There’s also a tree-view, which presents the thread as an Org mode tree with each message a node in the tree. Since you can operate on the tree in the usual Org mode ways, that provides a powerful tool for dealing with the thread. It’s easy to switch between the linear and tree views so you don’t have to choose one but can use whichever’s most convenient at the time. You can see screen shots of both methods at the package’s GitLab repository.

Ambrevar shows you how to configure mu4e to always use mu4e-conversation but you don’t have to do that. You can install it and then call it when you want it from the mu4e headers view.

This seems like a really useful package and I’m tempted to try it out for the few times that I want a thread-view of my messages.

Posted in General | Tagged , | 2 Comments

Configuring Wanderlust

It was a great day for me when I finally got mu4e working and moved my email into Emacs. Emacsers who want to live in Emacs as much as possible will sooner or later look for a way of handling email from within their editor. I love mu4e and have no plans on trying something new but, of course, not everyone agrees and it is, after all, Emacs so there are lots of possible solutions.

One such solution is Wanderlust. It’s the email client that DJCB, the author of mu and mu4e, used before he wrote his own client. If you’re looking for an Emacs mail client and mu4e doesn’t fit your needs, you should definitely give Wanderlust a look. The Emacs Wiki has a page on Wanderlust with links to screenshots and other information.

Ahmed Khanzada has a useful post that explains how to configure Wanderlust. It’s actually easier than getting mbsync configured to work with mu4e. Khanzada’s post also explains how to get it to authenticate with Gmail. That’s a bit tricky so if you want to use Wanderlust and you’re a Gmail user, you should definitely check out his write-up.

Posted in General | Tagged | 0 Comments

A Complete Computing Environment

Irreal oldtimers know that I consider Emacs a sort of light-weight Lisp Machine and that I can sometimes be—ahem—obsessive about it. Recently, I came across a series of posts that reveal me to be a mere tyro in exploiting Emacs as the center of my computing workflow.

Ryan Rix has thought long and hard about what he wants from his computing environment and has put together a lengthy series of documents describing it. That document, Complete Computing Environment, consists of several Web pages that describe what he’s done to realize his vision and what he’s still planning on doing. The first page, linked above, provides an overview of his system and provides links to other pages containing the specifics and code.

Mostly, his Emacs usage and goals are like mine except that he’s far more organized and has a more or less complete idea of what he’s trying to accomplish. Because his machines are (mostly) Linux based he can use EXWM, which goes a long way towards making Emacs into a Lisp Machine. As a Mac user, I don’t have that advantage but I’m still able to use many of his ideas.

One thing that I found odd, or at least unusual, is his dislike of smartphones. They are, he says, underpowered, insecure, and mostly useless for real work. I don’t know Rix’s age but I’m guessing most of his life overlaps that of the age of smartphones. Those of us who were around before the smartphone—or cell phones for that matter—think of smartphones as modern miracles that have made our lives immeasurably easier. Still, I take his point that they’re suboptimal compared to an actual computer. Like him, I’m waiting the day when our smartphones completely replace our other computers and we always have our full computing environment with us in our pockets. In the meantime, Rix is making do with a GDP Pocket Computer, which is a computer small enough to fit in your pocket. I’m seriously thinking about getting one myself.

If you’d also like to make Emacs the center of your computing universe, give Rix’s document a read. There’s a lot of material but the first page gives a nice overview and will guide you to the rest. I’m very impressed and inspired by his ideas and will be working to integrate them into my own environment.

Posted in General | Tagged | 4 Comments

Format$

The other day, I wrote about John Kitchin’s experiment with bringing f-strings to Elisp. In the comments, Noonian Atall pointed to Alphapapa’s format$ macro that does the same sort of thing. I just saw a reddit post from alphapappa announcing that he had enhanced format$ to include interpolated sequences just like f-strings.

The format$ macro is part of alphapappa’s elexandria library that brings some of the features of Common Lisp’s Alexandria library to Elisp. If you’re interested in f-strings, you should take a look.

Posted in General | Tagged | 0 Comments

Org Mode is Awesome

I’ve written about John Kitchin’s Org mode is awesome video before (back in 2014) but recently Xah Lee tweeted about it and I watched it again. It’s a great video and worth mentioning again for anyone who hasn’t already seen it. Actually, even if you have seen it, it’s worth watching again.

Kitchin looks at the major things you can do with Org so it’s an excellent resource for n00bs who are wondering what all the excitement is about and whether it’s worth expending the effort to learn it. You wouldn’t think there are many such n00bs left by this time but I keep seeing questions asking what it’s all about and whether it’s worth learning so apparently there are.

One of the things Kitchin mentions is Org mode speed keys. I’d forgotten all about them so rewatching the video was definitely worthwhile for me. Perhaps it will be for you too.

Posted in General | Tagged , | 1 Comment