25 Sep 2025
Storing a Link from your Web Browser to BibTeX using Org protocol
If you’re familiar with this blog, you’ll know that I’m a fan of Org protocol, a means of sending data such as web links and content to an Org file from outside of Emacs. Following up on my last post on Casual BibTeX, this post will show how to re-purpose Org protocol to send a link from your preferred web browser to a BibTeX file.
This is achieved by adding the following template (named “bib”) to the variable org-capture-templates as shown below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | |
The web link is treated as an BibTeX Online entry type whose fields are populated as follows:
urlfield holds the web page link.titlefield holds the web page title.dateis populated with the current day (this should be edited to the actual date).notesis populated with the body value according to the capture protocol.authoris populated with the value entered via mini-buffer prompt.organizationis populated with the value entered via mini-buffer prompt, typically the name of the website.
The template is configured to prepend (via the :prepend property) the captured Online entry to the file “~/org/bib/references.bib”. These values can be adjusted to taste.
When invoking this template via Org protocol, a temporary capture window holding the populated template is created. This entry will not have a citation key, so it is recommended to run M-x bibtex-clean-entry to generate it before committing the capture via C-c C-c. If you have Casual BibTeX installed, you can invoke the Transient menu casual-bibtex-tmenu with the binding M-m and invoke the clean command from there.
Closing Thoughts
Arguably, Org protocol was not designed to support files other than those using Org markup, so the above practice skirts its design intent by sending the capture to a BibTeX file. But as of Emacs 30.2 and Org 9.7.34, this works fine, so YOLO. Users intent on customizing the above “bib” template should be advised that many template properties are not supported, so be advised.
That all said, it’s a nice win to automate the task of writing a BibTeX Online entry.
Past Articles
| 24 SEP 2025 |
Announcing Casual BibTeXAnnouncing Casual support for BibTeX, a bibilography database. read more |
| 8 SEP 2025 |
Announcing Numeri - an Emacs package for Roman number translationNever not know what Super Bowl it is. read more |
| 24 AUG 2025 |
A proof of concept to put a better Emacs UI on top of GnuplotWhere I demo a PoC of a Transient-based UI for Gnuplot and ask out loud, “should I go further?” read more |
| 12 AUG 2025 |
Fixing Emacs Page NavigationPage navigation in Emacs only does half of what you expect. Here’s how to fix it. read more |
| 5 AUG 2025 |
Emacs Elevator Pitch: Nerd-kitch MerchThe first thing to do in software is make a T-shirt. read more |
| 29 JUL 2025 |
Unleashing the Editing Superpower of EmacsAt the end of the day, you just want to finish the job. read more |
| 28 JUL 2025 |
Announcing Casual Compile, Elisp, and EshellCasual v2.8.0 update is a big one. Compile, Elisp, Eshell and revamped documentation. read more |
| 18 JUL 2025 |
Customizing the Emacs Help MenuIf you’ve outgrown the Emacs Help menu, consider changing it. read more |
| 8 JUL 2025 |
Capturing Org Source BlocksClip source code from your web browser elegantly with Org capture. read more |
Page 1 / 16 >