Loading Emacs Faster

Eric Cole has an interesting post on decreasing the Emacs load time. This is not something I’ve ever worried about because I tend to load it once when the machine boots and just keep it running. It makes no difference to me if it loads in 1 second or 10.

Cole looks at two strategies. The first is essentially what I do except he runs Emacs as a demon that gets started at boot time by systemd. I could do that too but I don’t bother. I just start it when my OS X desktop comes up.

The second approach is to profile Emacs’ startup, identify the hot spots, and do something to eliminate those hot spots. He does his profiling with profile-dotemacs. You can check his post for how he dealt with some of the startup time eaters.

As Cole says, lots of people enjoy spending hours to shave half a second off their load time. He even remarks that it helped him learn Emacs and become more efficient with it but worrying about load time always strikes me as fundamentally wrong-headed. If you’re worried about how long Emacs takes to load—assuming here that you don’t have some misconfiguration that makes it take a minute or more—then you’re probably importing habits you learned from another editor.

When I used Vim, I just started it every time I needed to edit something. It loaded almost instantaneously so there was no downside to that strategy. Experienced Emacsers tend to leave Emacs running and just pop open another buffer when they have something new to edit. As I say, who cares if it takes 10 seconds instead of 1 second to start? You hardly ever start it.

Still, if you enjoy fiddling with your init.el trying to wring out every unnecessary cycle, Cole’s post may give you some ideas.

Posted in General | Tagged | 1 Comment

Dired Hacks

Fuco, the author of the excellent smartparens package, has a collection of useful additions to dired. Rather than define a comprehensive package, he broken the functionality out into separate packages so that you can install just what you need.

He has a detailed README that describes the functionality of each package so you should take a look at that if you want details. Here’s a quick summary of the packages

  • dired-filter
    Filter the dired listing by one or more criteria. These are ANDed together by default but can also be ORed or NEGATED.
  • dired-avfs
    Seamless archive browsing. Requires avfsd.
  • dired-open
    Improves upon the functionality that opens files with external programs
  • dired-rainbow
    Extends the highlighting functionality
  • dired-subtree
    Improves the formatting of dired subdirectory listings
  • dired-ranger
    Adds some functionality from the ranger file manager that is missing in dired.
  • dired-narrow
    Provides a sort of live filtering in dired buffers.
  • dired-list
    Make a dired buffer from the output of a shell script.

If you like to anchor your workflow in a dired buffer, you may find some or all of these packages helpful.

Posted in General | Tagged | Leave a comment

Management Learns an Expensive Lesson

Many, or perhaps most, of us have suffered through a round of layoffs and have found ourselves suddenly unemployed. Often these layoffs are handled in a clumsy and uncaring way. One common tactic is to call the victim into the manager’s office, lay him or her off, and then have security escort him out of the building. Often the company takes pains to make sure the fired employees have no chance to talk to any of their colleagues.

The Register has a wonderful and deeply satisfying story of how this tactic blew up in the face of one unlucky company. I won’t spoil it by giving you the details; it’s short and you really should read it. The take away is how a failure to treat people going through a difficult transition with sympathy and understanding ended up costing the company £100,000.

Sometimes it really is necessary for companies to lay off personnel but that’s no excuse to be jerks about it. It’s also no reason to ignore best practices.

Posted in General | Tagged | Leave a comment

Tools to Protect You from Surveillance

Jordan Fried sent me a link to his excellent article on 150 Tools to Protect Your from Global Surveillance. The article covers

  • Encryption
  • Cryptocurrency
  • Using the Internet anonymously
  • Securing email
  • Securing your browser
  • Secure communication
  • The Cloud
  • Guide to antivirus, antimalware, and firewall software
  • Tips and tricks
  • NSA surveillance programs
  • Tools

This is a long, up-to-date, and comprehensive article on the steps we can take to keep our Internet use as secure as possible. We all know that if the NSA comes after you in particular there’s not much you can do to protect yourself but if you want to prevent yourself from getting caught up in their global dragnets, these tips can help. They’ll also help with securing your data from criminals.

Posted in General | Tagged | Leave a comment

DWIM Narrowing Improvement

A year ago I wrote about Artur Malabarba’s excellent narrow-or-widen-dwim function. Ever since I installed it, I don’t think I’ve once called one of the narrowing functions directly. Since then, Malabarba has posted some updates to his original post making the code better.

His latest update makes it work with any type of block supported by org-narrow-to-block. If you use narrowing at all, you should definitely install his narrow-or-widen-dwim function. It will do everything you need without having to remember all those other keystrokes. Malabarba has even replaced the normal narrowing keymap with a direct call to his function. If you are already using his function, take a look at his latest update.

Posted in General | Tagged | 1 Comment

The Real Problem in the Encryption Wars

The Washington Post has an interesting take on the on-going encryption wars. Daniel Weitzner, a former White House deputy chief technology officer for Internet policy, has an op-ed in which he lays out the usual arguments against backdoors in encryption applications. The interesting part, though, is that he says that even if it were possible to safely add such backdoors, it wouldn’t solve the problem.

The problem, he says, is that the government has lost the trust of its citizens. Through abuse and overreach they have forfeited any reasonable expectation that the government can

  1. be trusted to conduct surveillance in a nonintrusive way, restricting their activities to matters of national security
  2. safely manage the keys to the hypothetical backdoor

Their failure, so far, on both of these items are manifest and obvious to anyone bothering to look. What reason do we have to expect that things would improve if crypto-Tinker Bell suddenly delivered the government’s yearned for backdoor?

As things stand now, not much reason on either of the two items. Weitzner says that to address item 1, the government much embrace transparency and oversight. Even if that were to happen, it still leaves the second problem. Can we trust the government to safeguard the exceptional access they are asking for? The seemingly never ending stream of embarrassing breakins to government systems doesn’t give us much reason for confidence.

The answer remains what it has been. We must resist every government effort to bull their way into our private affairs. If they think a crime has been committed let them get a warrant and demand the user unlock the communication. Anything else is just an open season fishing license.

Posted in General | Tagged | Leave a comment

The TOR Attack

Fusion has a lengthy and informative report on the recent TOR attack. To some extent, the TOR project dropped the ball and failed to understand the seriousness of what they were seeing. The real villains, though, appear to be two Carnegie Mellon researchers.

One of the weaknesses of the TOR system is that it’s possible for someone with malevolent intent to participate in network by providing one or more relay nodes. Usually, these attacks focus on the exit nodes because the data is unencrypted as it leaves the TOR network. This attack used intermediate nodes so even though the suspicious activity was detected by the network monitoring system, it was initially ignored because the TOR team believed that a successful attack must involve the exit nodes.

By the time the TOR team realized the seriousness of the situation, the damage was done. The story became more disturbing when the FBI arrested several dark net operators and boasted that they had broken the TOR protocol with the help of some university researchers. There’s lot of circumstantial evidence pointing to the involvement of Carnegie Mellon’s Software Engineering Institute (SEI) a government funded entity. As the TOR project pointed out, once the government became aware that the SEI had deanonymized IP addresses they were sure to ask for them and the SEI would have been obligated to provide them.

How would the government have known? It turns out that the researchers were scheduled to give a talk at the Black Hat Conference and had submitted their paper. At the last moment the talk was withdrawn citing confidentiality concerns.

After all this became known, CMU, the FBI, and the researchers behaved exactly as you would expect someone caught with their hands in the cookie jar to react. They issued carefully worded denials and then refused to say more citing, again, confidentiality.

There are huge ethical concerns involved and the academic community is up in arms about what happened. TOR has even questioned whether the research had IRB (Institutional Review Board) approval. Regardless, it’s clear that many innocent people got caught up in the attack and perhaps have had their safety put at risk.

TOR is said to be pondering their legal remedies including suing CMU for hacking their network. Whether they would prevail given the courts’ current schizophrenic approach to security issues is open to question but they may be able to use discovery to prise out the truth about CMU’s involvement and their collaboration with the government.

Read the Fusion article to see what the TOR project has done to fix the problem. If you’re a TOR user, now would be a good time to send them a few dollars so they can beef up their resources and prevent another incident like this.

Posted in General | Tagged | Leave a comment

How to Fix a Stuck Emacs

A very handy tip from Wilfred Hughes:

Emacs 24.5, on OS X at least, sometimes hangs for no apparent reason. I’ve used this tip several times to get things unhung.

UPDATE: I forgot to add that on OS X you have to either use the -i option or specify Emacs (note capital letter) as the process name.

Posted in General | Tagged | 15 Comments

SBCL 1.3.1 Released

The latest release of Steel Bank Common Lisp, version 1.3.1, was released on November 27. This month’s release contains 7 enhancements, including SB_THREAD for ARM64, and a bunch of bug fixes. See the NEWS page for details.

As usual, I compiled from source without incident. I ran the regression tests and got invalid exit codes for two obscure tests. As I’ve said before, these usually get cleaned up in a release or two. If you’re on Linux, you probably won’t get these errors.

I can’t say enough for SBCL. It has continuous development by dedicated maintainers, monthly releases, and complete source code. It’s free software and supports many platforms. If you’re looking for a first-rate Common Lisp environment, give it a try.

Posted in General | Tagged , | Leave a comment

The First Rule for Using Org

I’ve seen lots of pointers lately to this message from Carsten Dominik on the use of Org mode and managing its perceived complexity. At the end of the message he says

What people miss when they are new to Org-mode is this:

Don’t try to set up the “final” task managing system from the start. Because you have no idea yet what your system should look like. Don’t set up many TODO states and logging initially, before you actually have a feeling for what you working flow is. Don’t define a context tag “@computer” just because David Allen has one, even though you are sitting at a computer all the time anyway! Start by creating and managing a small TODO list and then develop your own system as the needs arises. I wrote Org-mode to enable this development process.

This is excellent advice; advice I failed to heed when I first started using Org. I had read Bernt Hansen’s excellent Org Mode — Organize Your Life In Plain Text! and was really impressed. Being new and ignorant and unaware of Carsten’s advice, I jumped right in and duplicated much of Bernt’s configuration. The result was that my agenda configuration was perfect for Bernt’s work flow but not for mine. As a result, I made almost no use of the agenda capabilities of Org.

Years later, I realized that I could perform many of the tasks I was doing manually by defining some capture templates and custom agenda reports so I threw out the unused templates and reports and started over adding just the ones my workflow required. The result was a huge increase in my productivity and the ability to find old items easily.

Many of these templates and reports are concerned with managing Irreal and are still evolving. As I find ways of automating tasks or making it easier to track blog post ideas, I add a template or report to my configuration. Likewise, when I find I’m no longer using part of the configuration, I get rid of it. That’s the point: don’t worry about adding a template or report until you need it. Adjust your configuration to your workflow, not the other way around.

Posted in General | Tagged , | 1 Comment