I'm trying of configuring org-roam-bibtex (not there yet), but I keep finding this ${slug} function, which I don't understand. See for example This post.

What is it? What is its utility?


There could be other uses that I'm not aware of, but slug is the text passed into the template system from your search.


The slug is used to construct the filename. By default org-roam uses the title of the note, using the org-roam--title-to-slug function. A note titled =This is my note title!!= will be turned into the slug "this_is_my_note_title", which has no spaces or exclamation marks in the filename. (I prefer dashes myself)

In the post you link to, you can see how it constructs the filename by combining the slug with the timestamp :file-name "literature/%<%Y-%m-%d-%H-%M-%S>-${slug}"

I hadn't seen the word slug used for this before but Wikipedia says it's the part of the URL that has human readable keywords.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.