joostkremers / pandoc-mode

An Emacs minor mode for interacting with Pandoc.
https://joostkremers.github.io/pandoc-mode/
174 stars 14 forks source link

default.pandoc file not loaded #95

Closed atanasj closed 4 years ago

atanasj commented 4 years ago

I have the current settings in pandoc-mode/default.pandoc.

((bibliography . "/Users/atanas/.pandoc/MyLib.bib")
 (read . "markdown")
 (write . "native"))

I have done this in order to use the pandoc-jump-to-citation feature, so I can quickly explore a citation entry. However, I always get the error No bibliography selected. I was hoping this would work across all relevant files where I use pandoc citations.

This is what I have in my init file:

  (use-package pandoc-mode
    ;; :init
    ;; (add-hook 'pandoc-mode-hook 'pandoc-load-default-settings)
    :hook ((markdown-mode . pandoc-mode)
           (TeX-mode . pandoc-mode)
           (org-mode . pandoc-mode)
           (pandoc-mode . pandoc-load-default-settings))
    :config
    (define-key markdown-mode-map (kbd "C-c j") 'pandoc-jump-to-reference))

I experimented with where I have put the hook, but this does not work. This feature works as expected when I go and add the .bib manually each time.

How can I get it to work all the time without manually entering the .bib file for each file that is visited? Am I doing something wrong?

atanasj commented 4 years ago

Never mind, I realised I was editing the wrong file. Thanks anyway!

joostkremers commented 4 years ago

Glad you got it sorted. :smiley: