Ivy, Swiper, and Counsel Gain a New User

Yesterday, I wrote about abo-abo’s recent enhancements to the Ivy UI. After I wrote that post, I saw this tweet:

I went through the same process almost exactly 3 years ago and have never looked back. Ivy and friends are so much better than the default mechanisms that I’m always a little surprised by tweets like the above because I always assume that everyone has abandoned smex and ido by now. Apparently not.

That brings me to the point of this post. If you haven’t yet tried Swiper/Ivy/Counsel you’re missing out and owe it to yourself to give them a trial. I can’t think of any reason at all to stay with smex and ido—although I’m sure some folks have special use cases or needs where they make sense—and even people using helm might want to try the Ivy suite out. Just the way swiper does implicit regular expressions makes it worth while all by itself but there’s lots more. Take a look at the manual if you want to see what it can do. Don’t be put off by all the functionality. It’s easy to get started by just using it as a drop in replacement for isearch and things like find-file. You’ll discover the other functionality as you go along. Give it a try; you will, I promise, be glad you did.

Posted in General | Tagged | Leave a comment

Ivy and Directories

Abo-abo posts that he has made some usability enhancements in Ivy directory handling. If you’re like me, Ivy is a fundamental part of your workflow. As abo-abo says, the original idea was simple: provide a list of strings and a way of choosing one of those strings. Of course things quickly got more complex. One source of problems is dealing with directories.

The first example is dealing with file name completion. As you’re traversing down the path of directories, you need to select the proper one and move on to the next but you can’t just accept the directory because that would open the directory in dired instead of allowing you to choose the next directory in the path. Abo-abo solved that problem simply enough by using Ctrl+j to select that directory but keeping going.

The next problem is directory creation. That’s harder because Ivy couldn’t tell the difference between a new file and a new directory so he used a special key binding for that case. Recently he dug into the dired-create-directory and make-directory code and discovered that they pass Ivy a unique prompt that he could use to ascertain the user’s intention. Now it works the same as with files and there’s one less key sequence you have to remember.

He also fixed a long-standing annoyance involving the dired-dwim-target variable. You can read his post to see what the problem was and how he fixed it if you use that variable.

As we’ve come to expect from abo-abo, Ivy just keeps getting better and better. I can’t imagine how I got along without it. If you’re an Ivy user, be sure to read abo-abo’s post to see what’s new.

Posted in General | Tagged | Leave a comment

iPhone Security

One of the reasons I have an iPhone rather than an Android device is that I feel it’s more secure. Everyone—except maybe the bad guys—likes more security, of course, but not everyone is willing to pay the price to get it. In the case of the iPhone, that price is mostly being willing to live in Apple’s walled garden. Principally that means you have to get your apps from the App Store rather than having a choice of sources as Android users do.

Apple can not, of course, filter out all the bad actors but they mostly do. That, for me, makes the trade off worthwhile. Others have a different calculus.

Still, the iPhone isn’t safe out of the box. There are some steps you should take to help keep your data and yourself safe. From John Cook’s excellent Data Privacy twitter feed, I found a pointer to this:

If you follow the link, you’ll find an article that recommends 7 specific settings you can make to your iPhone to help keep the snoopers away. They’re easy and you probably already have many of them set but if you’re an iPhone user, it’s definitely worthwhile taking a look at the article and checking your own settings.

Posted in General | Tagged , | Leave a comment

GitHub/GitLab Pull Requests from Emacs

Prathamesh Sonpatki has a useful post that shows how to make pull requests for GitHub and GitLab from Emacs using Magit. Sonpatki took some code from one of Artur Malabarba’s posts on Endless Parentheses and made the trivial changes necessary to get it to work with GitLab too.

Malabarba’s post is from 2015/2016 so you may not have seen it. Sonpatki’s post is, therefore, a welcome reminder. After completing and pushing a change to a new branch, you can use one of the code snippets to create a pull request from within Emacs. That’s useful because it allows you to stay within Emacs rather than having to switch out to your browser. If you’re an Emacs/Magit user and work with GitHub or GitLab you’ll find Sonpatki’s post useful.

Posted in General | Tagged , | Leave a comment

Judge Orenstein in the New York Times

Remember Judge James Orenstein? He’s the federal magistrate judge in the Eastern District of New York who refused the FBI’s request to order Apple to help them break into an iPhone. I found his decision particularly interesting because the facts of the case almost exactly tracked the famous San Bernardino case that Apple vigorously resisted until the FBI gave up and found other means of getting the data. If you’re vague on the details, here’s a summary that I wrote at the time.

Orenstein recently had an op-ed in the New York Times in which he discusses privacy in the Internet age and bemoans the fact that privacy policy is being set by prosecutors who have little interest in protecting your privacy if it gets in their way. This is the result, he says, of Congress’s failure to act.

Today’s reality is much different than it was just a few years ago. Now our entire lives are very likely recorded in our smart phones. It’s little wonder that the police and prosecutors are itching to get their hands on the data they contain. Often times, that desire is justified but it should still require a warrant issued for probable cause not just some easy administrative subpoena. What’s needed are clear procedures and rules as to what’s permissible and what’s not. Currently, we don’t have that.

Orenstein puts the blame squarely where it belongs: on Congress. Their failure to act has created a void that prosecutors are happy to fill with dubious doctrines if they can find a judge to agree. Read his op-ed. It’s interesting and informative.

Posted in General | Tagged | Leave a comment

Haldar Reads Reflections on Trusting Trust

I’ve written at least twice about Ken Thompson’s Turing Award Lecture, Reflections on Trusting Trust and each time I told you to be sure to read it. It describes one of the—if not the—greatest hacks of all time. In the talk and the paper that recapitulates it, Thompson describes how he modified the C compiler to insert a backdoor into the Unix login command and arranged to have all signs of the code removed from the compiler’s source while keeping it in the binary. In a way, the paper is terrifying and after reading it, you’ll never fully trust your tools again.

If you ignored my strong urging to read the paper don’t worry. Vivek Haldar had done it for you and produced a short video describing it. Watch Haldar’s video to see how Thompson pulled off his trick but then you really should the paper itself. It’s short, easy to read, and entertaining.

Posted in General | Tagged , | Leave a comment

Light or Dark

I’ve long been a member of the much maligned minority who strongly prefer a light theme for Emacs and, for that matter, everything else too. All the cool kids have dark themes, some even using grotesque combinations like blue on black. The dark themers assure me that using the dark option is easier on the eyes.

It turns out—although, admittedly, I didn’t know it—that I was right all along. At least according to a recent article in TidBITS. Adam Engst wrote the article about the Mac’s dark mode feature, The Dark Side of Dark Mode, before the recent WWDC announcement that dark mode would be available on iOS/ipadOS devices as well but it takes on new force with Apple’s making the option available in its mobile devices too.

Engst makes the case, backed up with research, that the human brain has evolved to prefer dark on light. That’s partly why printed material uses that method. Light on dark makes it harder to discern shapes and read the printed word. As I say, he quotes a great deal of research purporting to show this is true. It’s an interesting article and worth reading whatever your preference.

If you’ve been around for a while, you know that I’m always suspicious of such findings. Of course, Engst quotes several studies which lends credence to the results. Mostly, though, I’m just having fun with this in a sort of “I told you so” way. Like most things different people will prefer different color schemes. And, of course, once again Emacs lets you have it your way.

Posted in General | Tagged , | Leave a comment

Working With Google Cloud Compute Instances in Emacs

If you work with Google Cloud Compute Instances, Jack Rusher has an excellent tip in the form of a GitHub Gist for you. It turns out that Tramp connection methods are table driven and you can easily add a new method by adding the appropriate entry to the tramp-methods variable. Rusher shows how to do this for Google Cloud.

There’s extensive documentation in the docstring of tramp-methods so just do a Ctrl+h v tramp-methods to get the full story. While you’re there, take a look at the existing values. You’ll be surprised at all the methods you’ve never heard of before.

Tramp is a beautiful example of table-driven code that is easily extensible by almost anyone. You don’t have to know Elisp, just how to call add-to-list.

Posted in General | Tagged | Leave a comment

The Open Access Wars

I’ve written before (1, 2, 3, 4) about Open Access and the struggles associated with it. I used to think the debate was nuanced but the behavior of the publishers have convinced me that they’re getting what they deserve. I still feel a little queasy about taking the side of the pirates but, really, how can you feel sorry for the publishers? They exploit the researchers, they exploit the reviewers, they exploit the editors, and they exploit the tax payers. Meanwhile they’re making billions in profit on the backs of labor that they paid literally nothing for.

Vox has a nice article on The Open Access Wars. If you’re not familiar with the issues, the article does an excellent job of explaining them, how we got to where we are, and what’s apt to happen in the future. Ironically, as I’ve said before, the victims have brought this on themselves. Academics continue to insist on publishing in “high impact” journals—those run by the publishers exploiting them—because they’re more prestigious and, more importantly, because the tenure and promotion committees award researchers who publish in those journals. Until universities fix that problem, there’s probably little hope of solving the open access problem.

The universities have not yet been able to take that step but they are banding together and taking a hard line with the publishers. They’re insisting that at least their researchers’ papers be available to everyone for free. Vox speculates that the system will evolve to where the universities pay for the right to publish in a journal but the results will be free to all. That’s not perfect but it’s way better than what we have today.

Posted in General | Tagged | Leave a comment

Emacs! In the New York Times!

Paul Ford, co-founder and chief executive of Postlight, has a delightful paean to open source in The New York Times Magazine. In the article, Letter of Recommendation: Bug Fixes, Fords talks about the joys of open source and the pleasures of browsing through a program’s history with a version control system like Git. He says he likes to read commits like a newspaper. It tells him what he can do today that he couldn’t do yesterday. One of the main examples he gives of an important open source project is Emacs.

He talks about Emacs going back 40 years and how much one can learn by examining how the code evolved. Over 600 people made almost 140,000 commits to make Emacs what it is today. It is, he says, the Ship of Theseus in code form. Ford remarks, “I read the change logs, and I think: Humans can do things.

None of this is news to Irreal readers, of course, but it is significant that it’s appearing in a general purpose publication like the New York Times. Most often, what we do appears to be mysterious and arcane to the general public. Ford does a good job of capturing the flavor of some of it.

Posted in General | Tagged | Leave a comment