org-brain
org-brain copied to clipboard
Two questions
Thank you for the great software!
While, I got two questions 1, When I use "r" to open resource, org-brain default uses "xdg-open" (in my debian box) to open file, but I wonder if I can open the file within Emacs. For example, if resource is a pdf file, I want org-brain opens it with pdf-tools 2, After adding a file link to resource, I don't konw how to edit its description as normal org mode does in org-brain-visualize mode. Should I have to open org file to add it manually? 3, I tried a lot but my emacs still can not find org-brain-polymode, I added configs as your README suggest and installed polymode, but no luck. :-(
Hi! Glad you like it!
- The resource is opened using
org-open-link-from-string
, which then usesorg-link-open
. That function has optional arguments to open files in emacs. Perhaps I could make it soC-u r
opens the resource in Emacs... - If I remember correctly there is no way of editing existing resources from
org-brain-visualize
. It would be nice, but I believe I looked into it and it was rather complicated to implement. - A lot of users have had problems with polymode, I'm not sure why. It is working for me, but I'm not using
org-brain
from MELPA but instead use my local development file. If you have a look at the open issues there are discussions about polymode, perhaps those could help you?
Hi,
Thank you so much for the quick response.
- Do you think the config like
(add-hook 'org-mode-hook
'(lambda ()
(add-to-list 'org-file-apps '("\.pdf\'" . "xdg-open %s")) may make a solution? However I don't know how to specify open program with pdf-tools, currently as you can see I use xdg-open, basically let system determines. However, in dired or other mode, I can directly open PDF with pdf-tools - I got it. As I have played around org-brain last night, I got a lot of fun and found that open org file to edit it directly is also effective. :-)
- Okay, thank you! I may try original github version later. :-)
Actually I got additional questions,
- What does NICKNAME for? I tried to add nickname, but I don't know what is the use case for it.
- When I use "t" to change a node's title, it seems it just add a entry with new title ID in node's org file. I also tried to add #+TITLE: in org file, but nothing changed in visualized mode. I just wonder if I can do something like
- add a node(child or something) with name "a", that means there will generate a file named a.org
- then I changed its nickname or title whatever, then the name shown in visualized mode of that node will be the property I set. However such action may not add any entry or list in the a.org, just a real nickname.
I didn't know about org-file-apps
. After reading the documetation, this works for me:
(add-to-list 'org-file-apps '("pdf" . emacs))
You don't need to add it in a hook.
Regarding your new questions:
- Nicknames can be used to give multiple names to the same entry when searching for it. If you have en entry with the title "Woods" you could also give it a nickname "Forest". Then if you use
M-x org-brain-visualize
or other commands both "Woods" and "Forest" will lead to the same entry. - Pressing
t
should not add a new entry. If it is a file entry it should add/change the#+TITLE
and if it is a headline entry it should change the headline itself. If you create an entry "a.org" and then visualize it and presst Hello RET
the entry name being visualized should be "Hello".
(add-to-list 'org-file-apps '("pdf" . emacs)) works! Thank you so much!
- Do you mean, if I give entry a nickname, when I use M-x org-brain-visualize to open entry, I don't need to input a long name like a/b::c but short nickname instead? I tried it. If a entry a/b::c has nickname d, I still need input entry a/b::d. If it is what is, Yes, I confirmed it. :-)
- When I use MELPA version, t does not change anything, now I use github version, t changes entry's name, but leave #+TITLE no touched. :-(
Best regards,
- May I suggest you use a completion package in Emacs which allows fuzzy matching? There are lots of them, I myself currently use selectrum but
ivy
andvertico
(and perhaps also the builtinido
, I can't remember) are good alternatives. Then you could write the title of the entry and it will match, not only at the beginning of the string. - It sounds very strange. Not sure why this is the case.
Thank you so much for your patient reply.
I am still learning org-brain, and getting used to using it in my everyday work. Great work!