Skip to content

Instantly share code, notes, and snippets.

@jdtsmith
Last active December 29, 2024 11:10
Show Gist options
  • Save jdtsmith/d49eaaae852c5496a80e2489014bc41c to your computer and use it in GitHub Desktop.
Save jdtsmith/d49eaaae852c5496a80e2489014bc41c to your computer and use it in GitHub Desktop.
org cite "processor" example
(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)))))
@jdtsmith
Copy link
Author

jdtsmith commented Dec 28, 2024

Update: simplified to set only the activate slot of the new processor, since that is all that is used from the org-cite-activate-processor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment