NicolasPetton/nroam

backlinks section showing up in every agenda day entry

mediapathic opened this issue · 3 comments

Or something like it --

Screen Shot 2021-03-29 at 21 51 14

I think the screenshot summarizes what I mean better than anything I could say.

Oh, that's interesting. I cannot reproduce it, but I'm wondering how you set up org-agenda with org-roam, could you paste here any relevant elisp code?

I can't find anything particularly relevant, as far as I can tell. The only thing I have that interacts with both org-roam and org-agenda is this, which, I must admit, I don't fully understand, but I don't think would have this effect:

(defun my-org-roam-today-mk-agenda-link ()
  (interactive)
  (let* ((marker (or (org-get-at-bol 'org-marker)
                     (org-agenda-error)))
         (buffer (marker-buffer marker))
         (pos (marker-position marker)))
    (with-current-buffer buffer
      (save-excursion
        (goto-char pos)
        (let ((link (org-store-link nil)))
          (when (stringp link)
            (remove-text-properties 0 (length link)
                                    '(read-only t) link))
          (setq as/agenda-captured-link link))
        (org-roam-dailies-capture-today)))))

(setq org-roam-dailies-capture-templates
      '(
        ("j" "journal" entry
         #'org-roam-capture--get-point
         ;; "* %<%H:%M> %?"
         "* %<[%Y-%m-%d %H:%M>] %?"
         ;; (concat (("* ")(ap/org-insert-current-time-stamp-active)("%?")))
         :file-name "daily/%<%Y-%m-%d>"
         :head "#+title: %<%Y-%m-%d (%A)>\n* [/] Do Today\n* [/] Maybe Do Today\n* Journal\n"
         :olp ("Journal"))
        ("t" "do today" item
         #'org-roam-capture--get-point
         "TODO %(princ as/agenda-captured-link)\n %<<%Y-%m-%d %H:%M>>"
         :file-name "daily/%<%Y-%m-%d>"
         :head "#+title: %<%Y-%m-%d (%A)>\n* [/] Do Today\n* [/] Maybe Do Today\n* Journal\n"
         :olp ("Do Today")
         :immediate-finish t)
        ("d" "default" entry
         #'org-roam-capture--get-point
         "* %?"
         :file-name "daily/%<%Y-%m-%d>"
         :head "#+title: %<%Y-%m-%d>\n\n")
        ("m" "maybe do today" item
         #'org-roam-capture--get-point
         "[ ] %(princ as/agenda-captured-link)"
         :file-name "daily/%<%Y-%m-%d>"
         :head "#+title: %<%Y-%m-%d (%A)>\n* [/] Do Today\n* [/] Maybe Do Today\n* Journal\n"
         :olp ("Maybe Do Today")
         :immediate-finish t)
        )
        )

However, if you can't reproduce this, and it is an issue with my local configuration, you can probably ignore this. It's not terribly annoying, I mostly reported it in case it was a problem not just for me. And besides... apparently in ways unrelated to nroam I've broken agenda completely anyway somehow, I can't produce any agenda views at all, so I guess, uh, it's not really a problem at the moment?

@mediapathic I'll have a look at the code you pasted, and will keep this open for the time being.