Skip to content

Open org-noter directly from helm-bibtex #113

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

Open
matogoro opened this issue Jul 16, 2020 · 0 comments
Open

Open org-noter directly from helm-bibtex #113

matogoro opened this issue Jul 16, 2020 · 0 comments

Comments

@matogoro
Copy link

Hi all,

I was wondering if anyone had any advice on how to launch an org-noter frame directly from the helm-bibtex "Actions" menu (i.e. this menu). As it stands, when I want to look up my notes when writing a paper, I need to do the following:

  1. Call helm-bibtex
  2. Navigate to the article
  3. Open the "Actions" menu
  4. Open either the PDF of the article or the corresponding notes
  5. Call org-noter (creates new frame)
  6. Navigate back to the old frame
  7. Kill original PDF or notes buffer
  8. Get back to writing my manuscript

I was hoping to cut out a few of these steps. I see the possibility of integrating helm-bibtex and org-noter has been discussed here, but I don't think it quite applies to my use-case. I also see snippets of code that supposedly effectively call org-noter here and here.

Personally, I've tried copying one of helm-bibtex's functions, but I'm still unable to pass an argument to org-noter:

(defun bibtex-completion-launch-org-noter ()
  (dolist (key keys)
    (let ((pdf (bibtex-completion-find-pdf key bibtex-completion-find-additional-pdfs)))
      (cond
       ((> (length pdf) 1)
        (let* ((pdf (f-uniquify-alist pdf))
               (choice (completing-read "File to open: " (mapcar 'cdr pdf) nil t))
               (file (car (rassoc choice pdf))))
          (funcall org-noter file))) ;; pass an argument to org-noter?? Maybe call-interactively?
       (pdf
        (funcall org-noter file)) ;; pass an argument to org-noter?? Maybe call-interactively?
       (fallback-action
        (funcall fallback-action (list key)))
       (t
        (message "No PDF(s) found for this entry: %s"
key))))))

Any help would be greatly appreciated. Thanks!

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