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:.