An Emacs Lisp function to convert attachment: links to file: links for ox-hugo exports

You might have noticed the side-note in yesterday’s blog post where I mentioned that exporting Orgmode notes with org-download attachment-style screenshots to blog posts using ox-hugo required one to convert [[attachment:...]]-style links to [[file:...][file:...]]-style links. Because the barrier from private note to possibly useful blog post should be as low as possible, I made the below function that will do the required conversion for the link under your cursor. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 (defun cpb/convert-attachment-to-file () "Convert [[attachment:.

Set severity override of Visual Studio Code Pylance type mismatches for better visual distinction

Pylance is Microsoft’s new and improved Python language server. I have been using this in my Visual Studio Code remote editing sessions (editing Python codes on the machine learning Linux machine next to me, from my laptop), and I’m enjoying its new type-checking capabilities. Today I discovered a little configuration change that improved my Pylance experience, so I thought I’d share in case it helps anyone else. Aside: ox-hugo exports with org-download screenshots It was also an excuse to test how ox-hugo exports would work for a note straight from my daily journal if screenshots were involved.

Open WSL2 files in Windows apps using Emacs TRAMP

From the department of how-obscure-can-you-get-really, I present you with this neat trick to open WSL2 files in their native Windows handlers via Emacs TRAMP connection from WSL1 to WSL2. Motivation My use case is this: On Windows, I use Emacs primarily from WSL1 to manage everything on Windows, on WSL1 and on the WSL2 distros I use for development. I’m often connected to WSL2 via TRAMP, for managing files with dired, manipulating the results of simulations, and using the amazing magit.

Emacs, WSL, helm-locate and Everything

On Windows, running Emacs on WSL (the Windows Subsystem for Linux, or rather Linux in Windows), is faster and in my experience an altogether a better experience than running native Windows Emacs. However, you will need to do some tweaking to use it to its maximum potential, some of which I have written about before. In this post, I show a small but useful trick to use the brilliant and lightning fast Everything search tool to find directories and files anywhere on your Windows system whilst using helm-locate from your WSL Emacs.

Voice capture org-mode notes and more using Siri Shortcuts on iOS

This post originally appeared at Org Mode Exocortex, my Org mode-focused blog, on April 30, 2020. :ID: b3c6cee0-567e-4324-9685-f6fd9959d402 Introduction Inspired by Stéfan’s post explaining how to voice capture TODOs using Google Assistant on Android, I decided to find out how one would go about hooking up Siri dictation on iOS to Org mode. It turns out that Siri Shortcuts is a pretty amazing tool that can be used for all kinds of automation on your iPhone or iPad.

Cite consistently between org-ref and ox-hugo

Warning on 2021-06-21: Don’t try this work-around With a pandoc 2.5 installation on Ubuntu 20.04.2 LTS I am not able to get this hack working anymore. My suggestion is to look into some of the better solutions that were later implemented in ox-hugo. Introduction I have written before explaining how you can use org-ref to insert citations into your org mode documents, and then have them export perfectly into PDF documents via LaTeX.

xdg-open-wsl: A WSL-specific xdg-open replacement to open files and links using Windows apps.

TL;DR: Install my WSL-specific xdg-open replacement by following the instructions on the xdg-open-wsl github page. Convert a Python script to a Python package with Poetry. In my previous vxlabs post, I explained how to use Emacs lisp advising to fix buggy behaviour when opening Windows files from Emacs running on WSL. In that post I mentioned my home-grown xdg-open replacement. As I was writing that bit, I wondered how long it would take for the first astute reader to wonder about the mentioned script.