Preview / link to pages in pdf files

Hi eveyone,

I am new here, hope posting my question in the right place.

I am coming from obsidian. I can link to pdf pages directly in it. even preview them (eventho it can get slow on large file and adds a lot of overhead ).

Is there a way to do the same in org-roam? I know I can link to org headings and files via id but not sure about pdf pages.

Thanks in advance

Linking from an org buffer to a PDF file or specific page is possible.

For previewing, I have not seen any way to enable preview within an Org buffer. It’s just one-person experience, but I don’t think it’s been done before (judging from how Emacs display works vs PDF works).

Thank , I can’t figure out how to properly install packages in doom. github repos usually put the configs in their README for emacs not doom. I get that I should put (package! PACKAGE_NAME) in packages.el file. but how I should change the config? Is there a stanadard way to convert this config to work with doom?

(use-package org-noter
  :config
  ;; Your org-noter config ........
  (require 'org-noter-pdftools))

(use-package org-pdftools
  :hook (org-mode . org-pdftools-setup-link))

(use-package org-noter-pdftools
  :after org-noter
  :config
  ;; Add a function to ensure precise note is inserted
  (defun org-noter-pdftools-insert-precise-note (&optional toggle-no-questions)
    (interactive "P")
    (org-noter--with-valid-session
     (let ((org-noter-insert-note-no-questions (if toggle-no-questions
                                                   (not org-noter-insert-note-no-questions)
                                                 org-noter-insert-note-no-questions))
           (org-pdftools-use-isearch-link t)
           (org-pdftools-use-freepointer-annot t))
       (org-noter-insert-note (org-noter--get-precise-info)))))

  ;; fix https://github.com/weirdNox/org-noter/pull/93/commits/f8349ae7575e599f375de1be6be2d0d5de4e6cbf
  (defun org-noter-set-start-location (&optional arg)
    "When opening a session with this document, go to the current location.
With a prefix ARG, remove start location."
    (interactive "P")
    (org-noter--with-valid-session
     (let ((inhibit-read-only t)
           (ast (org-noter--parse-root))
           (location (org-noter--doc-approx-location (when (called-interactively-p 'any) 'interactive))))
       (with-current-buffer (org-noter--session-notes-buffer session)
         (org-with-wide-buffer
          (goto-char (org-element-property :begin ast))
          (if arg
              (org-entry-delete nil org-noter-property-note-location)
            (org-entry-put nil org-noter-property-note-location
                           (org-noter--pretty-print-location location))))))))
  (with-eval-after-load 'pdf-annot
    (add-hook 'pdf-annot-activate-handler-functions #'org-noter-pdftools-jump-to-note)))

I cannot help you with doom; I don’t use it. Many people who I see still active in this forum do not use doom, either. My suggestion is to ask questions and request help in doom’s forum

Sorry , I know it is not the prefect place to ask it. I did ask it on a doom discord, but only one that I find is not active at all. I am new to Emacs and its community. I would appreciated any guide on how and where to find help.

I just googled “emacs doom how to configure packages”.

One of the top hits is this. In it, the author of doom emacs, hlissner, says the following, which to me answers your question about use-package! and clarifies the purposes and difference between package.el and config.el (I am omitting a quote for the latter point).

use-package! is for configuring plugins and describing to Emacs when (and how) to load them. It is a thin wrapper around use-package. It accepts the same arguments. It is tremendously helpful; I suggest you get to know it better.

In terms of getting help… README of the doom emacs’s github repo has “Getting help”. If Discord is not active (I see about 1800 members online now), they seem to also have a Discourse forum. I guess you could also ask a question in the github issue like the one I quoted above if your question has not been addresses elsewhere. It is always advisable that you search FAQ and other places for an answer first — in your case, I think it’s already answered.

The link you send is very helpful. I did read the documentation on it but it was not very clear about many issue.

I checkout the Discourse Forum which was empty. Thank you very much for you help. sorry again for cluttering topics here. I like to learn more about org-roam more. I think I would do that after figuring out basics of doom emacs. Emacs learning curve is really steep indeed. I think learning Nvim was a walk in a park compared to emacs and elisp.

@archiee There is an inherent problem in reducing complexity - it always comes back - with a vengence.In reality the basics of package management is very simple, one can write under 600 lines a system that interacts with melpa/github and maintains autoloads.

Doom tries to be user friendly - and in each step they take towards this, an extra set of assumptions about the user are implicitly made, this stacks up into its own complexity - that was not present in the original.

If you are just beginning out, you might like to just use vanilla emacs, youd find the learning curve isn’t so steep - there are only a few ‘basic rules’ that interact in different ways to generate the seeming complexity - once you feel comfortable with the basics - the rest all falls into place.