The Org-ref Video Revisited

Recently, John Kitchin tweeted that he has added the org-ref video to his YouTube play list:

The video is three years old and I wrote about it back then but on rewatching it, I was struck anew at how astounding org-ref is.

Kitchin begins the video by showing some of the ways you can add a document to your bibliography. It’s like magic. Drag a PDF reference, or a paper’s Web site into your bibliography and org-ref will fetch the paper and a BibTeX entry and insert it into the bibliography for you. You can also copy a reference from an existing paper and when you add it to your bibliography, org-ref will retrieve the paper and the BibTeX entry for you. You can do the same thing by copying a paper’s DOI and asking org-ref to get the paper and BibTeX entry for you.

The rest of the video discusses adding reference to papers, equations, code, and figures to the paper you’re writing. Keep in mind that this is all being done in an Org mode file.

If you’re a researcher, or student, or anyone at all who writes papers with a bibliography you owe it to yourself to watch the video (it’s here on YouTube) and install org-ref. Org mode users often say it’s Emacs’ killer app and reason enough to use Emacs. If you’re writing papers, org-ref could be considered reason enough to use Org mode.

Posted in General | Tagged , | Leave a comment

Nothing To Hide

One of the tiresome and annoying things that the uninformed say about privacy issues is, “I have nothing to hide.” The idea, of course, is that, “I’m not a criminal or a terrorist so (1) no one will bother surveilling me and (2) my life is an open book and there’s nothing about me that would bother me if it was revealed.”

Both of those statements are almost certainly wrong. Governments and corporations will surveil anyone they can. Governments do it looking for trouble makers and corporations do it to target advertising or, for example, to identify poor insurance risks. You can take for granted that anyone who’s not completely off the grid is being surveilled to some degree.

At first blush, the second argument might seem stronger. Most of us aren’t doing anything that would excite the interest of law enforcement so who cares if they spy on us? Here’s a story about a man who discovered his sexual health searches were being sent to multiple companies. In this case, he was researching vasectomies—presumably for the usual reasons—and found out that that information had been made available to advertising companies. The story is from Australia but don’t congratulate yourself if you live elsewhere; it’s happening where you reside too.

If you’re one of those people who don’t care if complete strangers know you’re considering having a vasectomy, consider this scenario: For one reason or another you do some research on HIV. You don’t have HIV and you’re not doing anything that would put you at risk but let’s say you’re writing a paper on it. This information leaks out the same way the vasectomy searches did and the next thing you know you can no longer get health insurance.

You had nothing to hide but you got surveilled with disastrous results anyway.

Posted in General | Tagged | Leave a comment

Search and Replace

Clemens Radermacher over at (with-emacs has a nice post that discusses various strategies for search and replacement. He considers searching and replacing both in single buffers and in multiple buffers or files.

In each case, he looks at the “traditional” way of doing it and then considers some newer ways that use packages such as Ivy and Helm. Finally, he describes his preferred method. The post provides a nice recap of the various techniques of searching and replacing as well as talking about some packages such as objed, anzu, and deadgrep that you may not be familiar with. Even if you’re an experienced Emacs user, it’s worth taking the time to read the post if only for the possibility that you may discover some newer techniques.

Posted in General | Tagged | Leave a comment

More Trouble for Adtech

If you’re like me and really, really hate Adtech and those who push it, I have some good news. After the GDPR went into effect, advertisers had to have your explicit, informed, and affirmative consent to collect personal information about you. It was perfectly predictable that the advertisers would try to game the system, of course, and one way they’ve been doing that is by passing on permissions through contractual relationships. That means, for example, that when you agree to a particular site’s terms of use, they pass that permission on to the Adtech firms because they have a contractual relationship with them.

Now a French regulator has ruled that passing on permissions through contractual relationships is illegal. It’s hard for the non-lawyers among us—and probably hard for the lawyers too, for that matter—to know what the effect of this ruling will be but according to TechCrunch, it could mean the end of Adtech as it’s currently practiced.

The TechCrunch article has lots of details about the ruling and its probable consequences so it’s an excellent place to start if you want to understand what it all means. The TL;DR, as far as I can tell, is that it’s good news for those of us who want advertisers to stop spying on us.

Of course, all this applies only in the European Union but one can hope that it’s coming to a country near us too.

Posted in General | Tagged , | Leave a comment

Running an Org-mode Block as Root

Álvaro Ramírez has a nice tip on how to run an Org-mode block as root. I’m pretty sure I saw this in one of Howard Abrams’ excellent videos but it’s useful enough to repeat. It’s really easy to do so take a look at Ramírez’s post.

Posted in General | Tagged , | Leave a comment

Another Blogging Solution

If you enjoyed yesterday’s post about Daniel Gomez using Org-mode to write his thesis, perhaps you’ll also like his other offering, An Emacs Library for frictionless Blogging.

Gomez publishes his blog on write.as, a publishing platform that allows you to make a blog post, say, by sending the Markdown content in an HTML POST request. If you read yesterday’s post, you know that Gomez is an avid Emacs and Org-mode user so naturally he wanted to write his posts with Org-mode and publish them directly from Emacs. To do that he wrote a small library that takes an Org file, extracts the title, converts the Org formatting to Markdown, sends the Markdown to write.as, and retrieves the publishing information from write.as in return.

It’s an excellent solution if you don’t mind having your blog be part of a “federated” platform such as write.as. It’s perfect for someone like Gomez, who as a PhD student and occasional blogger, doesn’t have the time or inclination to deal with a dedicated server (or virtual server) and a more complicated blogging platform such as WordPress. Once he wrote his library, publishing a post consists of writing it and calling a single function to publish it.

Take a look at Gomez’s post for the details. His code is available on GitHub.

Posted in General | Tagged , | Leave a comment

Writing a Thesis with Org Mode

I keep seeing statements from the uninformed to the effect that you can’t use Org-mode for “serious” writing. First it was, “you can’t use Org-mode for journal articles.” After John Kitchin put the lie to that story, the naysayers moved on to, “Org-mode could never be used for GNU manuals, except we have this.

The latest skirmish is about whether you can use Org-mode to write your thesis. Despite the many examples of people doing just that, we still have plenty of people saying it can’t/shouldn’t be done.

Daniel Gomez was having none of that and wrote a very nice post showing how to set up an Org-mode thesis writing environment. His thesis has all the pain points that the naysayers claim makes writing a thesis with Org-mode too hard or impossible. It’s a scientific thesis so it’s got equations, figures, and code; large parts of the thesis were published in journals with other formatting requirements; and finally, his thesis supervisor prefers to use Microsoft Word.

Gomez shows how to overcome all these obstacles and write both the journal articles and thesis in Org-mode. The journal articles can imported directly into the thesis because he’s tagged the unwanted content and formatting to be ignored when it’s used in the thesis.

If you’re about to write your thesis and would like to do so in the comfortable Org-mode environment, take a look at Gomez’s post.

Posted in General | Tagged , | Leave a comment

“Refactoring” Prose

I’ve been working on a couple of prose—as opposed to code—files. One’s fairly short (\(≈3,500\) words). The other is a bit longer (\(≈11,000\) words). I realized the other day that I was probably punctuating quotes with question marks incorrectly so I checked and found that, indeed, I’d done it wrong. In my defense, the rules for punctuating things in quotes don’t make any sense and tend toward the arcane. Regardless, the text needed fixing.

I did an occur to see how often I’d make the mistake and then I realized I could fix things on the spot by going into edit mode and using iedit to fix them all at once. The idea probably popped into my mind because of abo-abo’s great post on refactoring that did something similar.

The be clear, what I did was:

  1. Call occur with a regex describing the punctuation I wanted to correct
  2. Type e in the occur buffer to enter edit mode
  3. Mark one of the occurrences of the mistake
  4. Call iedit to fix every occurrence at once
  5. Type Ctrl+c Ctrl+c to write the changes back into the original file.

I could, of course, have used query-replace-regexp but I already had the occur buffer open and I liked being able to see all the errors at once. It’s a cute workflow for quickly making the same change multiple times in a longish file.

Posted in General | Tagged | Leave a comment

The Emacs 26.1.90 Pretest

Nicolas Petton has announced the availability of the Emacs 26.1.90 pretest. Eli is asking everyone to build and use it so that we can have an efficient test.

If you’re a macOS user, you should definitely do so even if you don’t usually bother with pretests or release candidates. I built it last night and I can already see improvements from my compile of the 26.1 branch after the emergency patches to fix the display problems introduced with macOS 10.14.

I’m using it as my working version of Emacs and even though it’s been only a day, I’m happy with it and haven’t seen any problems. If you can, please do the same.

Posted in General | Tagged | Leave a comment

Statistics and Lies

Regular readers know that we here at Irreal have occasionally been hard on researchers in the social sciences. That’s especially true for Psychology where at least one study found that only 39% of published research results could be reproduced.

One wants to believe that things are better in the “hard” sciences—especially in medicine and health where erroneous results can affect us all. Sadly, these fields are not immune either. There are several well-known examples of this such as the fat versus carbs debate where the official orthodoxy of 50 years turned out to be wrong with disastrous results for the health of the population.

Mistakes do happen, of course, but a recent article from the American Council on Science and Health reports that 1 in 4 statisticians say they were asked to commit fraud by other researchers. The particular fraud that 1 in 4 statisticians were asked to commit was altering or removing date, a clear ethical violation that everyone would consider fraud. Other types of fraud were considered, ranging from the trivial such as not showings plots that failed to strongly support the desired result to the very serious such as falsifying data or misreporting \(p\) values. The article has a table summarizing the various frauds and their reported frequency.

These findings are discouraging to those of us who believe that the purpose of science is to seek the truth or even to those of us who want to stay healthy. My guess is that this fraud is mostly the results of the perverse rewards system used by universities and funding agencies. Goodhart’s law predicts that those operating under such a system will find a way to game it. Unfortunately, one such way appears to be fraud.

Posted in General | Tagged | Leave a comment