reddit / emacs

Function to use an article's title as the citation description (org-ref)

Deep-Fox6860 ยท 2022-02-05 18:57
Hi, I'm writing a function to have org-ref citation links with the articles' titles as the link description, for better readability. I got stuck in the part where I call `(org-insert-link nil nil title)` which accepts a user's input; I just want it to accept programmatically. See code: ​ (defun my-cite () (interactive) (org-ref-cite-insert-helm) (let* ((buffer (current-buffer)) (title (progn (goto-char (1- (point))) (org-ref-open-citation-at-point) (bibtex-autokey-get-field "title" bibtex-autokey-titleword-change-strings)))) (switch-to-buffer buffer) (org-insert-link nil nil title))) ​ Any help and comments appreciated.