- Emacs Lisp 100%
| auto-id.el | Use new calling convention for define-minor-mode | |
| README.org | Update Emacs room JID | |
| tests.el | Remove common words from CUSTOM_ID | |
auto-id
Donate using LiberapayExplanation
auto-id is a package to generate CUSTOM_ID properties for Org buffers.
Customization
auto-id provides a great degree of control over CUSTOM_ID generation -
auto-id-ignore-existingis used to prevent existing CUSTOM_IDs from being modified.auto-id-transformersis used to control the generation of custom IDs. The default value aims to work for most situations. For everything else, the seven included transformer functions can be reused as desired.auto-id-words-to-removecan be used to remove specific words from a custom ID.- In case of duplication,
auto-id-uniquify-functionsare used to determine how to make each custom ID unique.
If necessary, any of these may be made file- or directory-local.
TODO
- custom IDs based on headline lineage
- control over number of words
- omit or de-parenthesize text in parenthesis
- if the headline is a link with link text, use link text to create the ID
Contributions and contact
Feedback and MRs are very welcome. 🙂
Get in touch with the author and other Emacs users in the Emacs Jabber/XMPP channel - xmpp:emacs@conference.conversations.im?join (web chat)
(For help in getting started with Jabber, click here)
License
I'd like for all software to be liberated - transparent, trustable, and accessible for anyone to use, study, or improve.
I'd like anyone using my software to credit me for the work.
I'd like to receive financial support for my efforts, so I can spend all my time doing what I find meaningful.
But I don't want to make demands or threats (e.g. via legal conditions) to accomplish all that, nor restrict my services to only those who can pay.
Thus, auto-id is released under your choice of Unlicense or the WTFPL.
How-to guides
How to generate CUSTOM_IDs
Just once in the current buffer
To generate CUSTOM_IDs for a single Org mode buffer -
- Switch to the buffer
- Type
M-x auto-id-this-buffer RET
In specific Org files
To enable CUSTOM_ID generation in specific Org files -
-
Visit the file, then add a file local variable to enable
auto-id-modein it -M-x add-file-local-variable RET eval RET (auto-id-mode) RET - Save and revert the buffer
The CUSTOM_IDs will be generated the next time the buffers are saved.
In Org files in a specific directory
To enable CUSTOM_ID generation for all Org files in a directory -
-
Add a directory-local variable -
M-x add-dir-local-variable RET org-mode RET eval RET (auto-id-mode) RET - Save the
.dir-locals.elbuffer - Revert the desired Org buffers
The CUSTOM_IDs will be generated the next time the buffers are saved.
For all Org files
To enable CUSTOM_ID generation in all Org files, add auto-id-mode to org-mode-hook -
(add-hook 'org-mode-hook #'auto-id-mode)
The CUSTOM_IDs will be generated the next time the buffers are saved.