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

Add back crossref support for notes to candidates #610

Closed
bdarcus opened this issue May 26, 2022 · 1 comment · Fixed by #634
Closed

Add back crossref support for notes to candidates #610

bdarcus opened this issue May 26, 2022 · 1 comment · Fixed by #634

Comments

@bdarcus
Copy link
Contributor

bdarcus commented May 26, 2022

This was an oversight in #603 that needs to be fixed.


Not sure if this should be incorporated somehow, or where, but this adds the "N" prefix to candidates whose crossref has a note.

(defun citar-xref-notes ()
  (let ((all-keys (mapcar (lambda (x) (nth 1 x)) citar--candidates-cache))
        (note-keys (citar-file--keys-with-file-notes)))
    (remq nil      
          (mapcar (lambda (key)
                    (let* ((entry (citar--get-entry key))
                           (xref (citar--get-value "crossref" entry)))
                      (when (member xref note-keys)
                        key)))
                  all-keys))))
  
(setq citar-keys-with-notes-functions '(citar-xref-notes citar-file--keys-with-file-notes))

(As an aside, is there a better way to get a list of all keys?)

Originally posted by @localauthor in #603 (comment)

@bdarcus
Copy link
Contributor Author

bdarcus commented Jun 11, 2022

I think, @localauthor, that #628 will fix this.

@bdarcus bdarcus linked a pull request Jun 26, 2022 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant