this post was submitted on 28 Oct 2023
1 points (100.0% liked)

Emacs

312 readers
1 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

I came across citar, and I am trying to use citar-org-roam to take notes on academic papers. I must be missing something about usage/configuration. I get "Make sure 'citar-notes-paths' and 'citar-file-note-extensions' are non-nil" when I try to use citar-open-notes. If I set the 'citar-notes-paths' variable, then citar creates normal notes without using the template defined above.

Here's what is in my init.el:

(use-package org-roam
  :custom
  (org-roam-directory "~/RoamNotes")
  (org-roam-completion-everywhere t)
  (org-roam-capture-templates
  '(("d" "default" plain "%?"
     :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
		             "#+title: ${title}\n")
     :unnarrowed t)
    ("n" "literature note" plain "* Heading\n %?"
     :target (file+head "%(expand-file-name (or citar-org-roam-subdir \"\") org-roam-directory)/${citar-citekey}.org"
		             "#+title: ${citar-citekey} (${citar-date}). ${note-title}.\n#+created: %U\n#+last_modified: %U\n\n")
     :unnarrowed t)))
  :bind (("C-c n l" . org-roam-buffer-toggle)
            ("C-c n f" . org-roam-node-find)
            ("C-c n g" . org-roam-graph)
            ("C-c n i" . org-roam-node-insert)
            ("C-c n c" . org-roam-capture)
            ("C-c n j" . org-roam-dailies-capture-today)
        :map org-mode-map
        ("C-M-i" . completion-at-point))
  :config
  (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
  (org-roam-db-autosync-mode)
  (require 'org-roam-protocol))

(use-package citar
  :custom
  (citar-bibliography '("~/bib/referencess.bib"))
  :hook
  (LaTeX-mode . citar-capf-setup)
  (org-mode . citar-capf-setup))

(use-package citar-org-roam
  :after (citar org-roam)
  :config
  (setq citar-org-roam-note-title-template "${author} - ${title}")
  (setq citar-org-roam-capture-template-key "n")
  (citar-org-roam-mode))

Thanks for any and all suggestions!

you are viewing a single comment's thread
view the rest of the comments
[–] Difficult-Flower2617@alien.top 1 points 1 year ago (1 children)

You may describe path for note in citar.el as you gave .bib file in references folder

[–] telepath12@alien.top 1 points 1 year ago (1 children)

When I tried to do that it was using citar (instead of citar-org-roam) to capture notes, and so things weren't formatted according to the capture template above.

Template is for org-roam, so your result is natural. Citar's note function is symbolic link and communicate to .bib file's note section. Even if the absence of org-roam, it will act. Then you need to link with citar's note functions with org-roam. In my case, im enough to use @citekey function in org-roam. But you will find citar-wiki in details.