Blood Pressure and Tattoos

If you’re over 10 years old, you’ve almost certainly had your blood pressure taken and it is even more likely that it was done with a blood pressure cuff, a technology that dates from the 1800s. Its age notwithstanding, it’s still the gold standard in blood pressure measurement today.

It no longer has to be taken in a clinical setting, though. Anyone who needs to monitor their blood pressure can buy an inexpensive home unit that takes the measurement at least as accurately as an MD can. The problem is, if you need monitoring, you’d like it to be more or less continuous rather than once a day or week. Apple has been hinting at a solution for this with its iWatch but there are still problems.

Researchers at The University of Texas at Austin have a different idea: Use a graphene-based “e-tattoo” to take the measurements. The e-tattoo has a lot of advantages. It’s portable, inobtrusive, and doesn’t move around. That last feature is important for getting consistent readings. The tattoos work by shooting electricity into the skin and monitoring the results.

The article doesn’t say when, or even if, the researchers expect the technique to be available as a usable product but it’s sure to make a huge difference if it lives up to its promise.

Posted in General | Tagged | Leave a comment

Mickey on Diacritics in Emacs

Back in the Old Days™ ASCII was king and it was pretty much impossible to faithfully render any language that required diacritical marks or non-Latin characters. So essentially you could render English but anything else was iffy. All that changed with Unicode and especially UTF-8, which solves the compatibility issue by having ASCII and its representation as a subset.

These days, practically every application supports at least UTF-8 and Emacs is no exception. As you can see by typing Ctrl+h h, Emacs can faithfully render any language you’re apt to meet. That raises the question of how you enter those characters.

Mickey from Mastering Emacs has a nice post on how to do that with particular emphasis on dealing with diacritical marks. For me, the easiest way to deal with diacritical marks and the like is to use the TeX input method. It allows you to enter text pretty much as you would with TeX or LaTeX. But there are other input methods that essentially give you a keyboard for whatever language you need. For one-offs, I tend to use John Kitchen’s ivy-insert-org-entity that I stole from his Scimax code. It’s perfect for putting in a single diacritical or a special symbol such as the ™ above.

Posted in General | Tagged | Leave a comment

Org Capture from Anywhere Within macOS

One of the most useful workflow enhancements I’ve made to Emacs is the ability to do initiate an Org capture whether or not I’m in Emacs. That’s important to me because virtually every note I take is stored in Org. For example, if I’m reading something in my browser and it gives me an idea for a blog post, I just press F9 and it pops up my capture template menu. From there, I need only specify b and I get my blog capture template with the URL of the site I was reading already filled in. Similarly, if I want to make a journal entry, I just press F9 j and I get a template complete with a date/time stamp.

Aimé Bertrand also depends on Org capture and has a post that describes how he initiates an Org capture from anywhere within macOS. He has some bespoke Elisp that pops up the capture menu and some advice to org-capture-finalize and org-capture-destroy to delete the capture buffer when the capture is done or aborted.

He uses Automator.app to invoke his code as a macOS service. I used to do that but found it to be unreliable. Sometimes it just wouldn’t work when I pressed the hotkey. After trying various things, I settled upon Adam Porter’s (alphapappa) yequake to handle the buffers for me and iCanHazShortcut to map F9 to the call to emacsclient and yequake. I wrote about that here.

My solution seems a bit more complicated but has the advantage of working on any system. I could, I suppose, use Bertrand’s Elisp code along with iCanHazShortcut to get rid of one dependency but yequake is working well for me so I’ll stick with my current solution.

If you’re interested in invoking Org capture from anywhere on your system, take a look at Bertrand’s post. Even if you’re not on macOS, you can use his code and something like iCanHazShortcut to handle the invocation.

Posted in General | Tagged , | Leave a comment

The Lab Leak Denial Continues

It’s been a while since I’ve written about the lab leak hypothesis and the continuing cover-up by everyone involved. If I put on my scientist’s hat, the only possible conclusion is what it’s always been: the evidence is inconclusive but a lab leak is a reasonable—some say the most reasonable—explanation. But when I put on my non-expert but reasonably informed and logical citizen hat, the conclusion is inescapable: the cause of COVID-19 was almost certainly a lab leak.

I had thought that after the original, furious denial by the virologists involved that any explanation other than a Zoonotic one was possible and that anything else was a conspiracy theory, that opinion had converged on a dual hypothesis of either a lab leak or zoonotic explanation. But apparently not.

Matt Ridley and Alina Chan wrote an even handed book about the origin of COVID-19 called Viral: The Search for the Origin of Covid-19. The book looked at the evidence scientifically and reached the usual conclusion: both explanations were reasonable and deserved more investigation. That seems like the current conventional wisdom but the reaction to the book suggests not. Scheduled interviews about the book were cancelled and the book was met with what can only be called intellectually dishonest reviews.

This is why the well informed, logical man on the street is justified in being suspicious. The people involved not only don’t want to discuss the issue, they don’t want anyone to discuss it. So the alert man on the street is entitled to ask, “What’s going on here?”

If, like me, you’re a fan of mystery stories, you know that one of the first things a detective will ask when faced with an unknown perpetrator is cui bono. It’s clear who benefits from the continuing proscription of discussion: China, the government officials who championed and funded gain-of-function research, and most of all, of course, the virologists whose careers are built around this research. Not surprisingly, these are the very people doing everything they can to discourage discussing the origin of COVID-19.

The issue and the machinations surrounding it have a political aspect but Irreal, of course, doesn’t care about that. I care only that we put a stop to this irresponsible research before they manage to kill us all.

Posted in General | Tagged | Leave a comment

Capturing the Current File Location

Marcin Borkowsi has a nice post on how to capture the current file’s location and copy it to the system clipboard. It’s just what you need for sharing information about data in a file with a colleague. By file location he means the path to the file and the line number within that file.

That doesn’t seem too hard but there are some wrinkles. First of all you want the absolute line number within the file not just the number of the line visible in the buffer. That’s pretty easy but the second problem is a bit trickier.

Sometimes, just the name of the file is not enough. It may be that two files within a project have the same name but lives under a different subdirectory. Your first thought is probably to capture the full path to the file but that isn’t optimal either. As Borkowski says, there’s no point in showing the full path on his machine. What’s needed is the path relative to the current project.

That means the path relative to the current VC repository. It’s pretty easy to get that with the vc-root-dir function. Borkowski has some code that captures the file path and line number and copies it to the system clipboard. It’s simple and can be copied and used as is or modified to meet your particular needs.

The post is definitely worth a read if only to discover how to deal with the various issues.

UPDATE [2022-06-26 Sun 14:40]: Added missing link to Borkowski’s post.

Posted in General | Tagged | Leave a comment

Having a Per Contact Email Address

I recently had my own experience of the Baader-Meinhoff Phenomena. The other day I read Karl Voit’s post from 2015 on having a separate (from) email address for each correspondent. It seemed a little odd to me. Why would I want to do that? Voit didn’t give a reason, he just said he liked to do it.

He uses Mutt as his email client and wrote a python script to interface with Mutt to automate the generation of unique from email addresses. Of course, for this to work you have to have your own domain to which you can add multiple email addresses.

But the question remains, why do this? Right after reading Voit’s post I saw this post from TyChi that provides a rationale for the practice. The post is a little rambling but the TL;DR is that it keeps companies and Web sites that you communicated with from using your email address as an identifier to tie your activities from different sites together to build a more complete dossier on you and your activities.

If you’re interested in this sort of thing and use, say, Mu4e in Emacs for your mail, it would, I’m sure, be reasonably easy to adapt Voit’s python script to Elisp and integrate it into Mu4e. The middle ground—that I use—is to generate special email addresses for sites that I don’t want spamming me. I do this by hand but an automated solution would be nice.

Posted in General | Tagged , | Leave a comment

Red Meat Friday: Notion

Romain Slootmaekers has his own take on the Notion app:

To be fair, Notion is a pretty nice app but as I’ve written before you can do the same things with Org-mode. If you’re an Emacs user, there’s no reason to be using Notion, especially since your data is held on their servers.

Posted in General | Tagged , , | Leave a comment

Hiding Some Org Subtrees

The other day I wrote about Kaushal Modi’s post on Advice Combinators. Modi has another post that uses that information but the post is interesting in its own right. The problem is to fold (or collapse) headings having a certain property. His use case for this involves the file of his blog posts. Take a look at his post for the details.

The method Modi employs is pretty simple. He loops through all the headings with org-map-entries calling outline-hide-subtree whenever the property EXPORT-FILE-NAME is set. All that is handled by the single call to org-map-entries so it’s easy. Modi makes another pass also collapsing subtrees that are Footnotes or COMMENTS. That’s even easier being a simple re-search-forward.

Since Ctrl+c Tab does something similar in plain Org-mode, Modi decided to call his function with the binding Ctrl+u Ctrl+c Tab. He accomplished that by advising the Ctrl+c Tab function using the :before-until combinator.

To be sure, collapsing only certain headings isn’t something most of us most to do very often but it’s nice to see how to do it as well as see a nice application of an advice combinator.

Posted in General | Tagged , | Leave a comment

Paper Receipts at Drive-Thrus

You may have noticed those signs at your local fast food store offering cash or a free meal if you fail to get a receipt after you pay. Once they’re pointed out, you see them everywhere. Of course, this has nothing to do with making sure customers get a receipt for their records.

I’ve long known that the reason for this policy is to prevent store employees from canceling cash orders before they’re recorded and pocketing the customer’s payment. But I always assumed the problem was merely a case of petty employee theft and was more of a nuisance than anything else. Boy was I wrong.

Brian Krebs over at Krebs on Security has a post that shows how serious the scam can be. The post tells the story of a Jimmy John’s sandwich shop that lost almost $100,000 from the fraud and had to close temporarily.

This isn’t a megacorporation that can afford to write off fraud at that scale. It’s a mom and pop franchise that’s probably operating on the slimmest of margins. Part of the problem was that the owners didn’t have one of those signs incentivizing customers to make sure they got a receipt. They’ve remedied that, of course, but it was a $100,000 lesson.

The takeaway from this story is that even a very low tech scam can result in significant losses.

Posted in General | Tagged | Leave a comment

Advice Combinators

A really powerful Emacs feature for those who know a bit of Elisp in the ability to advise functions. Historically, the defadvice macro allowed the specification of code to run before, after, or around a function call. It’s really handy for modifying the action of a function without changing the function itself or getting into the details of how a function works. I have advice for 7 functions in my init.el, an indication that it’s more useful than you might think.

The defadvice macro has been obsoleted by the newer and more flexible advice-add and add-function macros. You’ll usually want to use advice-add because it works in more situations. The new macros support a finer grained specification of where the advice is to be applied.

Kaushal Modi over at A Scripter’s Notes has an excellent post that explains all the methods of specifying where the advice will operate. These methods are called “advice combinators”. Modi has what are essentially railway diagrams that illustrate the operation of each of the combinators. They’re an easy way of understanding what each of them does. He also has a summary table that describes in words how each of them works.

You should also take a look at the built-in add-function documentation that shows the new function that is created for each of the combinators.

Modi’s post is the best explanation of using advice that I’ve seen. You should definitely take a look at his post to see what’s possible.

Posted in General | Tagged | Leave a comment