Turning Off Annoying Magit Prompts

As most of you know, I’m a big fan of Magit and have been using it for some time. One thing I didn’t like was that it asked for verification before staging all changed files (【S】 in magit-status) but being Emacs that was easily fixed. With the new Magit, that fix no longer works. We were warned that some of the variable names were changed so I thought, “No problem, I’ll just grep for the prompt string and see what the new magic incantation is.” Sadly, nothing was found. That’s because of the way prompts work in Magit 2.x; you have to add the prompt’s identifier to the magit-no-confirm list. For the stage all prompt, that identifier is stage-all-changes.1

I also noticed that Magit now wants me to confirm where I want to push my commits. There’s a long explanation of the reasons for this change in the doc string of the magit-push-always-verify variable. The TL;DR is that it’s an attempt to make everyone happy.

Here’s the code that configures Magit and eliminates both prompts:

1: (use-package magit
2:   :ensure t
3:   :bind ("C-x g" . magit-status)
4:   :config
5:   (add-to-list 'magit-no-confirm 'stage-all-changes)
6:   (setq magit-push-always-verify nil)
7:   (setq magit-last-seen-setup-instructions "2.1.0"))

The important part for eliminating the Stage all changes? prompt is on line 5. You have to execute that after Magit is loaded. To get rid of the push verify prompt, use line 6.

Footnotes:

1

The prompt is derived from the identifier by removing the dashes, capitalizing the first character, and appending a ‘?’.

Posted in General | Tagged , | Leave a comment

A Diff on Quitting Emacs

I used to know this and probably even blogged on it before but I’d forgotten about it and maybe you have too so it’s worthwhile repeating.

Posted in General | Tagged | Leave a comment

SBCL 1.2.14 Released

The latest version of Steel Bank Common Lisp is available at the usual place. You can check the NEWS page for the changes in this iteration.

When I first tried to download it from Sourceforge, it wasn’t available and Sourceforge offered me version 1.2.13 instead. This despite the fact that the link from sbcl.org was specifically for the new version. I tried later and everything was OK. I wouldn’t have thought much of it except for the recent contretemps involving Sourceforge.

As usual, it compiled without incident and this time when I ran the regression tests there were no failures so the OS X problem in the last couple of releases has been fixed.

I really love SBCL and if you are looking for a good Common Lisp development system, you should definitely check it out. I say that every month, of course, but it’s true nonetheless.

Posted in General | Tagged , | Leave a comment

What Security Experts Do Differently

Over at the Google Security Blog, Lulia Lon, Rob Reeder, and Sunny Consolvo have an interesting post on some research they did on what security experts do differently from non-expert to stay safe on the Internet. The post is the TL;DR for the longer (20 pages) paper on the research.

The most important thing you can do, according to the experts, is to keep your system up to date by installing updates but non-experts don’t do that and sometimes even consider it unsafe. The other big item experts do is to use a password manager, also resisted by non-experts. The password manager insures—or, at least, can insure—that two other important criteria are met: the use of unique, strong passwords. That’s hard without a password manager but trivial with one. When I set a password for a new site I just let my password manager choose a long, random, unique password. I don’t even bother looking at it because there’s no chance I could remember it—that’s what the password manager is for.

The fifth thing that experts recommend is to use two-factor authentication. Sadly, most sites don’t offer that but it’s obviously a big win for security.

Although the paper is a bit long, it’s interesting and fills in many details that the short post doesn’t cover. It’s also instructive to see the things that non-experts believe are effective in keeping them safe.

Posted in General | Tagged | Leave a comment

Come Over to the Dark Side

and achieve great power.

Posted in General | Tagged , | Leave a comment

The Washington Post Gets it Right

Last Wednesday, Irreal excoriated the Washington Post for their uninformed—ignorant really—editorial supporting backdoors in crypto systems allowing the FBI and other law enforcement agencies to read encrypted communications when they feel it’s necessary. My post and the TechCrunch article it pointed to was harsh so I’m delighted to point to a WAPO Op Ed that gets it right.

An opinion piece entitled Why the fear over ubiquitous data encryption is overblown, makes the case that on balance ubiquitous encryption allowing communication unreadable by anyone other than the intended parties is a good thing, the fears of the law enforcement community notwithstanding. That’s the libertarian/crypto-geek position, of course, so you might think the authors are from the Pirate Party or some other (by U.S. standards) fringe group. The authors, however, have surprising backgrounds. Mike McConnell was the Director of National Intelligence and a former director of the NSA. Michael Chertoff is the former Secretary of Homeland Security. William Lynn was a Deputy Secretary of Defense. These are not the usual suspects. They’re respected members of the government elite who understand the issues and might be expected to support the backdoors. Yet they’re taking on the FBI and others who insist that the fate of the nation depends on the government’s ability to spy on us.

Read the editorial. It’s not so much that it says anything you haven’t heard before but that it’s said by knowledgeable members of the establishment. We can only hope that congress will listen.

Posted in General | Tagged , | Leave a comment

Drag and Drop Into an Org Buffer

John Kitchin has a very nice post in which he presents at bit of Elisp that enables us to drag and drop images into an Org buffer. The code is short and easy to understand. I just cut it out of his post, pasted it into my init.el, and evaluated it. After that I could drag and drop just as in his video demonstration. The only problem I had was with the 【Ctrl】 drag and drop. When dragging from the Finder, 【Ctrl】 clicking on an item brings up a menu. What you have to do is drag it over to the Org buffer and then press control before you release the mouse button.

Kitchin’s code was developed on a Mac and according to the comments has some problems with Linux machines. If you experience any trouble, you might want to try abo-abo’s drag and drop solution. If you’re interested, check out his demonstration video.

I really liked that when he first demonstrated it but, as I recall, there was some indication that it wouldn’t work on a Mac so I never tried it. After reading Kitchin’s post, I downloaded and tried abo-abo’s org-download to see how it compared to Kitchin’s solution.

I had a couple of glitches but to be fair I didn’t do more than a cursory trial. I could have probably resolved my problems with a bit of code reading. On the other hand, abo-abo’s solution allows you to grab images from Web pages while Kitchin’s code works only with images in the file system. Between the two solutions, you should find one that works for you and meets your needs.

Posted in General | Tagged , | Leave a comment

Will We Never Learn?

It’s 2015 and this is still happening:

Matt BLaze suggests the reason for the above:

Posted in General | Tagged | Leave a comment

Embedding Youtube Videos in Org Files

Artur Malabarba has a nice post on embedding Youtube videos in Org files. I do that occasionally for blog posts by using the HTML embedding code that Youtube supplies with each video. It turns out, though, that you can do it directly from Emacs by defining a new Org link type.

This has the advantage that you can follow the link directly from the Org file or even export it to, say, PDF via LaTeX. It’s really easy to set up and once you do it would be easy to completely automate the link insertion the way I do for normal Web pages.

Malabarba has a separate post on how to add Org links that you might also find useful. If you frequently embed Youtube links in your blog posts and you blog from Emacs with Org mode, you should definitely take a look at Malabarba’s posts. They’re sure to pay dividends.

Posted in General | Tagged , | Leave a comment

New Hydra Feature

Abo-abo’s hydra keeps getting better and better.

Posted in General | Tagged | 3 Comments