Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Note actions: optionally look up cite key in parent hierarchy #270

Open
adql opened this issue Mar 6, 2023 · 2 comments
Open

Note actions: optionally look up cite key in parent hierarchy #270

adql opened this issue Mar 6, 2023 · 2 comments
Labels
1. enhancement New feature or request 2. help wanted Extra attention is needed

Comments

@adql
Copy link

adql commented Mar 6, 2023

Is your feature request related to a problem? Please describe.
It's probably a very common practice to have child nodes under a (typically file-level) parent node with a citation key (i.e. make various literature notes to the same source "first-class" org-roam nodes). This makes calling orb-note-actions with point within a child node useless, forcing the user to temporarily move point to the relevant parent node.

Describe the solution you'd like
Add an option variable e.g. orb-look-up-cite-key-in-parents. When set, use the nearest parent node with a cite key for calling orb-note-actions.

Describe alternatives you've considered
I've advised orb-note-actions to move point to (point-min):

(defun my/eval-with-point-at-min (f &rest args)
  (org-with-wide-buffer
   (save-excursion
     (goto-char (point-min))
     (apply f args))))
(advice-add 'orb-note-actions :around 'my/eval-with-point-at-min)

This solution is limited to the case where the file-level node holds the cite key (which is likely the most common use case). It suffers the annoyance that, when opening the PDF within Emacs, the point stays at the buffer's beginning (unless it has been narrowed).

Additional context
Org Roam BibTeX v. 0.6.1
GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6) of 2023-01-03

@myshevchuk myshevchuk added the 1. enhancement New feature or request label Mar 8, 2023
@myshevchuk
Copy link
Member

Hi @adql, thank you for your request. Although I've personally haven't encountered this problem because I don't use node hierarchy, I can imagine this may be a more or less common situation. Unfortunately, I'm quite busy right now and can't tell when the enhancement you are requesting may be implemented.

@myshevchuk myshevchuk added the 2. help wanted Extra attention is needed label Mar 13, 2023
@adql
Copy link
Author

adql commented Mar 29, 2023

@myshevchuk Thanks, I'll see if I can work in it myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. enhancement New feature or request 2. help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants