Org-roam As a Second Brain

David Wilson over at the YouTube System Crafters channel has a new video up on getting started with Org-roam and building a second brain. It’s the best introductory video I’ve seen on Org-roam and, of course, Wilson is promising more.

The video covers Org-roam V2 and except for mentioning how to get rid of the warning message for V1 users, doesn’t mention V1 at all. By the end of the video you’ll know how to set up a working Org-roam installation and start taking notes. Later videos will cover more advanced topics but this one will end with you being productive with the package.

The video shows you how to create new nodes and link one node to another. The heart of a Zettelkasten is the idea that you can not only follow forward links from a parent node to a child but also back links from a child to its parents. The plural “parents” is important: the whole point of the Zettelkasten method is to discover hidden relationships between the individual notes so the backlinks buffer will show every reference to the current note. This is a realization of the idea that the Zettelkasten method produces a graph of the notes and their connections rather than just a hierarchy.

The video covers a couple of other topics like creating aliases for nodes and linking to a subtree of a note. These are interesting but not really that important to the effective use of Org-roam as a Zettelkasten.

If you’ve been wanting to try out the Zettelkasten method, this video will get you up and running with a minimum of fuss. The video is 34 minutes, 18 seconds so you’ll need to schedule some time but it moves quickly and is easy to get through.

Posted in General | Tagged , | Leave a comment

More on Writing Academic Papers with Org-mode

The other day, I wrote about Wouter Spekkink’s Org-mode setup for writing academic papers and promised to followup with Jonathan Bennett’s post on the same subject from a couple of years ago. As I started to prepare my post on Bennett’s post, though, things seemed vaguely familiar.

A little checking revealed that I’d already written about Bennett’s post back in 2019. It’s a good post and worth revisiting—especially in view of Spekkink’s post—so I’m linking to it again. If you have to produce papers in an academic environment—or anywhere, actually—you should take a look Bennett’s post.

Posted in General | Tagged , | Leave a comment

Red Meat Friday: Just Punishment

Editorial Note

For some reason, WordPress is refusing to post the embedded Tweet to Irreal’s database so I’m reduced to posting a link to it instead. This is yet another data point that makes me think I should suffer the pain of converting Irreal to a static site.


As you all know, Irreal is not a fan of Google and their spying. ibichka, it appears, agrees. He proposes a just punishment for those who traffic with Google:

https://twitter.com/iburunat/status/1419272310226305029?s=20

Posted in General | Tagged , | Leave a comment

Writing Academic Papers With Org-mode

Wouter Spekkink has an interesting post on his workflow for writing academic papers using Emacs and Org-mode. It’s a long post because he wrote it for several different audiences. He starts with what Emacs and Org-mode are and why someone not familiar with them might find it worthwhile to learn them. He considers the question of why one would want to “do this.” He mentions things like version control and the advantages of working with plain text but I doubt it will convince anyone. Either you embrace plain text with all its upsides and downsides or your prefer to live in—what I consider—the dystopia of Word and its evil siblings.

The most useful part of his post, for me, discusses his setup for actually writing papers. That includes both the boilerplate in the document itself and his configuration. He’s a Doom Emacs user so it may not be completely transparent if you worship in a different sect of the Emacs church but it’s reasonably easy to make the translation.

Spekkink also discusses how he integrates Org-roam and bibliography processing into his workflow. He uses the excellent org-ref to handle his citations and bibliography and org-roam and org-noter to organize his notes.

Much of Spekkink’s workflow is informed by a post from 2019 by Jonathan Bennett, which is also excellent. I’ll probably write about Bennett’s post later. In the mealtime, take a look at Spekkink’s post if you’re interested in writing academic papers with org-mode.

Posted in General | Tagged , | Leave a comment

How We Know the Open Office Concept Has Failed

As you all know to your sorrow, Irreal has been railing against open offices for years. COVID-19 has done more than anything to put an end to this abomination but like a vampire or a zombie, the concept is surprising difficult to kill.

Now, thanks to Panasonic, we have proof that the open office concept has failed. It’s hard to imagine that anyone could seriously offer something like this. Doubtless the designers were working in an open plan office.

Posted in General | Tagged | Leave a comment

Some Custom Commands from Prot

Protesilaos Stavrou (Prot) has another video up in which he discusses a few of the commands he’s implemented to make his workflow easier. There’s no overriding theme, just some functions he’s written that ease his work in various ways.

For example, his first command deals with inserting comments. It puts the comment in the proper place using a heuristic based on where the point is but also adds a prefix consisting of a keyword and the date or a keyword and a date/time stamp. It is, as Stavrou says, not a big deal but it does make it easier to add comments as you code.

Next he considers diffing the current buffer. If the buffer has been modified, it diffs the buffer with the underlying file. If the current buffer is clean (has not been modified) it diffs it with the version in version control (if any). Again, this is pretty simple but very useful. When called with the universal argument, the function will highlight word-wise changes.

His next bit of Elisp is concerned with narrowing. Stavrou says it’s a simplification of some code by Bozhidar Batsov but I find Artur Malabarba’s code more useful.

The next bit of code involves escaping URLs and email address for Markdown. They’re nice but we Org mode users probably won’t find much use for them.

Finally, he presents some code to ease grepping. It uses the built-in grep function but puts a wrapper around it so that you don’t have to input all the information the standard implementation requires.

He has a sort of coda to the video that mentions a few things that he doesn’t discuss at length but that he finds useful.

There’s a lot of material in the video but it’s only 31 minutes, 27 seconds long. That short enough that you can probably fit it in easily but long enough that you’ll still have to schedule some time for it.

Posted in General | Tagged | Leave a comment

Ten More Emacs Tips

A couple of weeks ago, I wrote about the Ten Useful Emacs Tips video from the Emacs-Elements YouTube channel. Now there’s a new video, 10 More Helpful Emacs Tips. Like the last video, you will probably be familiar with some of the tips but others may be new so it’s worth spending a few minutes on it.

Here’s a list of the topics from the video notes:

Tip 1: Delete empty directories in Dired
Tip 2: Recenter Positions
Tip 3: Minibuffer commands
Tip 4: Insert lines of a single character
Tip 5: Change encoding system for a file
Tip 6: Cycle org lists
Tip 7: Autoexpand without an external package
Tip 8: Cycle org-agenda files
Tip 9: Add a package manually
Tip 10: Xah file backup

Irreal talked about Tip 2 previously. First to change the sequence as recommended in the video and then to recant my apostasy and return to the default. This seems like something you wouldn’t need that much but I find myself using it several times a day. It’s so easy to change the sequence that it’s essentially free to experiment.

The last tip is about Xah Lee’s functions to make a backup of the current file. Lee doesn’t like the default Emacs way of doing this. If you agree, his bit of Elisp is an excellent alternative.

Tip 1 on deleting empty directories was new to me. So was Tip 8 on cycling through the files that go into your agenda summary. I’m not sure how often I’d use either of those tips but they’re nice to know.

The video is 10 minutes, 18 seconds long so it should be easy to fit it into your schedule.

Posted in General | Tagged | Leave a comment

Logging mbsync Errors

I’ve been using mu4e and mbsync for the last four years and love it. One of the things you discover early in your use of mbsync is that it loves spew messages into the minibuffer. That would be okay except that sometimes it overwrites something that you’re looking at.

A first hack at fixing this is to simply redirect those messages to /dev/null but then you might miss something that requires action so the second try at a fix is to redirect the output to a file. But then you discover that mbsync can emit the same error message on every invocation. For me that began with a message about an illegal message number. I fixed that but now Apple mail, I guess, is sending some flag that mbsync doesn’t know about so I get the error “IMAP warning: unknown system flag Junk”. That happens every time mbsync downloads new email messages so it would quickly fill up the log file.

A third iteration in fixing this is to send the messages to a filter that deletes any messages that you’re not interested in. My simple filter for this is

#! /bin/zsh
read LINE
if [ $LINE != 'IMAP warning: unknown system flag Junk' ]
then
    echo  $(date): \\c
    echo $LINE
fi

Obviously you can easily add additional messages to ignore.

The next problem is that mbsync sends these messages to STDERR instead of STDOUT so you have to figure out someway of piping STDERR to the next process’s STDIN. That turns out to be a bit fussy but the TD;DR is

  1. Redirect STDERR to STDOUT
  2. Disappear STDOUT

Here’s what this looks like for mu4e.

(setq mu4e-get-mail-command "mbsync -q icloud 2>&1 > /dev/null | (~/bin/mbsyncfilter) >> ~/.mbsync.log")

Something similar, I’m sure, would work for notmuch or whatever else you’re using mbsync with.

I get about five to ten error messages a week. They’re mostly things like the system couldn’t resolve the IP address of the Apple mail server or that the server had some problem or another. This solution works really well for me. I check the log file once a week to make sure no action on my part is required. I clear the log at that time so there’s never a huge number of messages to deal with.

Posted in General | Tagged , | Leave a comment

Medical Research Has Forfeited Our Trust

Richard Smith over at The BMJ has a cute article that asks whether the time has come to assume medical research is frauduent until proven otherwise. I say “cute” because everyone paying attention knows that most published medical research is trash. A year ago, Irreal reported that fewer than 25% of articles in medical journals concerning cancer research were reproducible. Considering what’s at stake, those figures are very disturbing.

Smith’s article takes this a step further by considering not irreproducibility but outright fraud: Studies where the data was faked or where the study didn’t take place at all. According to Smith, 20% of the studies are fraudulent or what he calls Zombie studies, where the data are so suspect that the whole study is called into question.

This is fraud of course, and, moreover, fraud that all of us are paying for with our tax dollars. But, in a sense, that doesn’t matter. What matters is that people are suffering and dying because medical practitioners are relying on these studies.

The problem, as it usually is, is the inappropriate incentives that researchers labor under. They get promoted (and tenured) not for advancing knowledge but for publishing papers. When your career depends on the number of papers you publish, you do everything you can to publish papers, even if the results or worthless and even if the results are flat out fraudulent.

It’s hard to know what to do about this. One of the commenters suggest seeking a refund of grant money from authors of fraudulent studies. That and public shaming (and possibly dismissal from their universities or laboratories) would be a good start. The real problem, though, is how to detect fraudulent studies to begin with. Obviously the current system isn’t doing that.

Posted in General | Tagged | Leave a comment

Prot on Dired

Protesilaos Stavrou has a new video up about his customizations of dired. Dired is one of those things that you either love or ignore. Even I, a hardcore command line guy, use dired for the majority of my file operations. It’s just easier and faster, especially if you want to perform an operation on multiple files at once. And, of course, you don’t have to leave Emacs.

Stavrou, as always, has his own tweaks to make his workflow even more frictionless. One of the things he likes to do is filter the dired listing so that he sees only the files he’s interested in. That’s not hard to do. The normal procedure is to mark the files you want to see, toggle the markings (with t) so that all the other files are marked instead, and kill the marked files from the listing. It’s easy but it’s a three-step process. Stavrou wrote a simple function that performs those three functions so that all he has to do is specify a regular expression for the files he wants to see to get the proper listing. If you filter your dired listings a lot, it’s a worthwhile addition to your toolkit.

His other big tweak is to the subdirectory display functionality. Again, dired supports this out of the box but Stavrou has streamlined the operations. His system is much more interactive and makes applying changes to some subset of a subdirectory easy.

The video is just a few seconds over 23 minutes so you’ll need to schedule some time but it’s not a huge commitment. As with all of Prot’s videos, this is very much worth your while and he includes a link to his configuration so that you can grab his code if you’d like.

Posted in General | Tagged | Leave a comment