It Can Be Done

The Dutch people have done a remarkable thing and as such serve as an
inspiration to the rest of us. This week the voters rejected a bill
that would have given the government sweeping powers to wire tap their
citizens communications and to retain and share the captured data with
other intelligence agencies. The vote was fairly close with younger
voters providing the edge to the no vote.

It remains to be seen, of course, whether the government will, as they
promised, respect the vote or will mumble the usual “national
security” code words as an excuse to break that promise. The vote
itself is legally non-binding so the government has some wiggle room.

Regardless of the outcome, the Dutch people have shown the rest of us
that it is possible to get past the usual Four Horsemen of the
Infocalypse
scare tactics and insist that the government respect the
law and their citizens’ privacy. We could use a little of that in the
U.S. but, you know: Terrorism! Child Porn!

I hope, but don’t really expect, that this will inspire folks in the
U.S. to similarly insist that our laws and privacy be respected. I’m
sure that those of you in other lands feel the same.

Posted in General | Tagged | Leave a comment

A Reasonably Safe Windows Email Reading Environment

If you are unfortunate enough to work in a Windows/Outlook/Exchange/MS
Office/Adobe/Flash environment, you know that you are constantly at
risk of being infected with email viruses. Needless to say, no system
is completely secure but there are safer alternatives. Of course, if
you’re in that environment it’s probably because you work for an
organization that insists on it so you don’t have the option of moving
to something safer.

Karl Voit is in that situation and has developed a reasonably safe and
sane way of dealing with email
in it. You should read his post for the
details but the TL;DR is that he set up a virtual environment on his
Windows machine that runs an instance of Debian Linux. That instance
gets mail from Outlook on the Web and reads attachments using a
hardened PDF reader (Ocular) and LibreOffice for MS Office files.

Is it 100% safe? Of course not but with a little care you can avoid
most of the problems. Voit took pains to make the environment simple
to use and familiar for Windows users. Having been Windows-free for
decades, I haven’t used his setup but it looks very nice and Voit
appears to have addressed the weak security spots.

If you are someone you know is stuck with an insecure email
environment, take a look at Voit’s post and see if his solution will
work for you. It’s bound to be safer and it doesn’t appear to be
terribly inconvenient to use.

Posted in General | Tagged | Leave a comment

Calc For Programmers

After writing about Florian Adamsky’s post on acronyms in AUCTeX,
I snooped around on his site and came across a nice post on Emacs Calc
from a programmer’s and computer scientist’s point of view. As regular
readers know, I’ve been working to increase my calc-fu lately so I
read the post with interest.

Adamsky demonstrates some of the Calc functions that are useful to
programmers and computer scientists. This includes such things as
entering and displaying numbers in various radixes and performing the
standard logical operations on (the usually binary representation
of) numbers. He even shows how to add a new “units” representation to
Calc—in this case bits/bytes/bits per second.

Calc is a large subsystem and famously hard to master but worth the
effort. It’s been described as a “poor man’s Mathematica.” It’s not
nearly as powerful as Mathematica, of course, but it’s surprising how
many things it can do. If you’re a programmer/computer scientist and
an Emacs user you should spend a little time investigating Calc. It
really can make your life easier. An easy way to get started is to
read Adamsky’s post. It covers only a small slice of Calc but will
give you an idea of its power.

Posted in General | Tagged | Leave a comment

New Release of Org Mode

Bastien tweets that there’s a new Org mode release:

It’s already available in Org ELPA repository
(https://orgmode.org/elpa/) so you can install it at your leisure.

Posted in General | Tagged , | Leave a comment

Acronyms in LaTeX Documents

Florian Adamsky has a very nice post on handling acronyms in LaTeX
documents
. Good style dictates that the first time you use an acronym,
you should provide the full written out definition. Later instances
can just use the acronym. That’s pretty easy to do with a small
document but for larger documents where there’s a lot of editing and
restructuring, the definition may get moved so that it comes after a
use of the acronym by itself.

Fortunately, there’s an excellent \(\mathrm{\LaTeX}\) package that
handles all this for you and Adamsky shows you how to use it. One
problem with the package from Adamsky’s point of view is that you have
to list the acronyms and their definition at the beginning of your
document. That makes it inconvenient to add a new acronym where you’re
in the middle of the document. To solve that problem, Adamsky wrote a
bit of Elisp that lets you add a new acronym on the fly without losing
your position in the text.

If you write in \(\mathrm{\LaTeX}\), you should check out the acronym
package. It probably won’t make a huge difference in your workflow but
will help remove one annoyance. You will probably also want to grab
Adamsky’s code so that you can add acronyms to the table as you need
them.

Posted in General | Tagged | Leave a comment

RC1 for Emacs 26.1

Eli Zarestskii has announced that barring any difficulties coming to
light, the Emacs 26.1 RC1 should be released next week. Zarestskii
expects that that will be followed in short order by the release of
Emacs 26.1 itself.

Relative newcomers to Emacs will see this as simply the usual yearly
release that has become standard for software in our industry. Those
of us who have been around a bit longer know that it wasn’t always
this way for Emacs. Major releases could be years apart and came when
they came. Thanks to recent maintainers—especially John and Eli—we now
have a more predictable (and frequent) release schedule.

It’s good to remember that this is a lot of hard work and it’s all
done by volunteers. Guys like John, Eli, and the other contributors
have families and real jobs that need attending to but still make time
to keep the Emacs project going and flourishing. We all owe them a lot
of thanks.

Posted in General | Tagged | Leave a comment

Lightweight Literate Programming with Hydras

Grant Rettke has an interesting take on abo-abo’s Hydra package. His
idea is that you can use hydras for a sort of lightweight literate
programming
. Most Irreal readers are already aware of hydras’ utility
as a way of gathering related functionality into a menu-driven set of
keystrokes with a common prefix. Hydra functions can be configured to
easily repeat with a single keystroke rather than the longer complete
sequence needed on the first call.

Rettke uses hydras for all that, of course, but he also uses them when
learning a new package or set of related functions. Check out his post
to see how he uses a hydra as a sort of notebook to record what
functionality is available and what keystroke to use to call it. It
is, he says, executable documentation.

Posted in General | Tagged | Leave a comment

Exactly!

Karl Voit captures my feelings about Emacs exactly:

Posted in General | Tagged | Leave a comment

Auto-Yasnippets

I stumbled across the package Auto-YASnippet, by the prodigious
abo-abo, again the other day. I vaguely remember reading about it a
couple of years ago when it was first released. The idea is to create
a temporary yasnippet on the fly without leaving your current buffer.
That can be really useful when you want to create a series of nearly
identical entries in a program that differ only in a term or two.
Abo-abo describes it as a hybrid of keyboard macros and yasnippet.

You can do the same sort of thing with keyboard macros if you can
remember how to invoke the recursive editing features. Abo-abo’s
solution is much easier: you just write the body of your text, marking
the fields that will change by a ~. Then you can create as many
additional instances as you like, substituting different values for
the marked field(s). Take a look at the README for some examples of
how it works.

I’m not sure why this didn’t register with me more when I first saw
it. It’s probably because I don’t program in languages like Java or
JavaScript where a tool like Auto-YASnippet makes more sense and can
save some time. If you find yourself regularly writing nearly
identical definitions or other boiler plate, take a look at
Auto-YASnippet; it may save you some time.

Postscript: I had originally planned to publish this yesterday but
serendipitously Mike Zamansky scooped me by posting a video
demonstrating Auto-YASnippet in action. As I wrote then, that was
indeed fortunate because now you can see the package in action. If you
haven’t already, be sure to watch the video.

Posted in General | Tagged | Leave a comment

Zamansky 46: Auto-YASnippet

Mike Zamansky has another video up in his Using Emacs Series. This
time he discusses Artur Malabarba’s agressive-indent-mode and
abo-abo’s Auto YASnippet.

In what could be an example of great minds thinking alike but is more
likely simply a quotidian coincidence, I had planed on writing about
Auto-YASnippet today but I got scooped by Zamansky. Actually, that’s a
good thing because now you can see an example of them in action. I’ll
publish my post on Auto-YASnippet tomorrow.

Zamansky’s video is a couple of seconds over 9 minutes so you can
easily fit it in during a coffee break. As with all of his videos,
this one is well worth your time

Posted in General | Tagged | Leave a comment