Code Monkey home page Code Monkey logo

Comments (3)

jgru avatar jgru commented on July 1, 2024

Hi @Imymirror,

thank you for your message and using consult-org-roam.
I tried to triage the issue. However, I cannot reproduce the described behavior unfortunately.
Using the consult-preview-key (here bound to M-.) and pressing [enter] opens the previewed file.

I configured consult like so:

(use-package consult
  :straight t
  :hook (completion-list-mode . consult-preview-at-point-mode)
  :config
  ;; Use meta-dot to trigger the preview.
  (setq consult-preview-key (kbd "M-.") ))

and set up consult-org-roam as shown below:

(use-package consult-org-roam
   :straight nil
   :load-path "/media/user01/data/lab/consult-org-roam"
   :init
   (require 'consult-org-roam)
   ;; Activate the minor mode
   (consult-org-roam-mode 1)
   :bind
   ("C-c n e" . consult-org-roam-file-find)
   ("C-c n b" . consult-org-roam-backlinks)
   ("C-c n l" . consult-org-roam-forward-links)
   ("C-c n r" . consult-org-roam-search))

May I ask you to check whether the problem might be in your config?
You could run emacs -Q and use the minimal config provided in the project's wiki

Best regards,
jgru

from consult-org-roam.

Imymirror avatar Imymirror commented on July 1, 2024

thank you. I upgrade all related packages, now pressing [enter] can jump to the previewed file .

but, can it jump to the location of the reference rather than the first line of the previewed file when calling consult-org-roam-backlinks ?

from consult-org-roam.

jgru avatar jgru commented on July 1, 2024

thank you. I upgrade all related packages, now pressing [enter] can jump to the previewed file .

Good to hear, thanks for the confirmation that it has been an issue on your configuration, @Imymirror.

but, can it jump to the location of the reference rather than the first line of the previewed file when calling consult-org-roam-backlinks ?

The currently implemented functionality is to show the node that houses the link in question. That is not necessarily the first line of the file.

As far as I can tell, there is no completely straight forward way to locate the exact position of the backlink (since it is not tracked in org-roam.db). Though one could probably search for the link and set the window accordingly.
However, I am not sure how easy it is to implement this. Maybe that functionality could be added somewhere around here.
If it is of utter importance to you, consider opening a feature request.

Best regards,
jgru

from consult-org-roam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.