Last active
December 29, 2024 11:10
-
-
Save jdtsmith/d49eaaae852c5496a80e2489014bc41c to your computer and use it in GitHub Desktop.
org cite "processor" example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(when-let ((basic (org-cite-get-processor 'basic)) | |
(activate (org-cite-processor-activate basic))) | |
(org-cite-register-processor | |
'activate-hide-@cite :activate | |
(lambda (citation) | |
"Activate CITATION, then make leadup to first ref invisible." | |
(funcall activate citation) | |
(when-let ((first-ref (car (org-cite-get-references citation))) | |
(beg (car (org-cite-boundaries citation)))) | |
(put-text-property (1+ beg) (car (org-cite-key-boundaries first-ref)) | |
'invisible t))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update: simplified to set only the
activate
slot of the new processor, since that is all that is used from theorg-cite-activate-processor
.