Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function to insert citation regardless of description style #43

Open
plantarum opened this issue May 19, 2020 · 1 comment
Open

Function to insert citation regardless of description style #43

plantarum opened this issue May 19, 2020 · 1 comment

Comments

@plantarum
Copy link

Hi again,

I've set my description style to use better bibtex, which gives me nice control over how the links appear in my document. However, sometimes I also want to insert the full citation. This doesn't need to be an actual org link, it could be inserted as plain text without markup. Or a link, I don't have a strong preference.

I think the code is mostly already there to provide this feature, but I don't yet understand how the deferred chains work well enough to add this myself. I also tried writing a wrapper that would set the value of org-zotxt-link-description-style temporarily, but the new setting is ignored:

(defun org-zotxt-insert-reference-citation (&optional arg)
  "Wrapper to o-z-i-r-link to force it to use full citations"
  (interactive "p")
  (let ((org-zotxt-link-description-style :citation))
    (org-zotxt-insert-reference-link arg)))
@plantarum
Copy link
Author

On further investigation, if I debug my function (org-zotxt-insert-reference-citation in the first message), it works as expected, but when I undebug it, it inserts the better-bibtex style link again. Not sure why that would be?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant