org-brain icon indicating copy to clipboard operation
org-brain copied to clipboard

Suggest remapping of missing entry

Open Whil- opened this issue 6 years ago • 5 comments

If relations are made between file-entries and one file is moved to a separate folder or has been renamed, it would be pretty nice to have Org-brain catch this error when trying to navigate a link, and ask the user for the entry that the relation should map to and in the same operation update the relation.

Btw, I can't enter an issue without also saying thanks for this library. Grymt snyggt jobb!

Whil- avatar May 25 '18 07:05 Whil-

Tack ska du ha! Just to clarify: Do you mean when using org-mode links to navigate to org-brain entries, for instance [[brain:40850d98-072a-4c64-8099-1d9952158e66][An entry]]?

Kungsgeten avatar May 25 '18 08:05 Kungsgeten

I meant when browsing through org-brain-visualize. Didn't think of the brain-protocol but maybe the same applies. Also, I didn't think of headline-links using org-id. I thought of file-links. But maybe the same applies for org-id's are referring to moved entries as well.. Haven't thought of that.

Whil- avatar May 25 '18 08:05 Whil-

Okay, I see :) I agree that it would be useful, in case you move/rename a file manually by mistake (there's less problems when using org-id since it the ID will be the same when moving the entry). What you should do though is to use M-x org-brain-rename-file instead of manually moving/renaming the file. This should solve the issues with org-brain-visualize, but won't fix links in org-mode files.

Kungsgeten avatar May 25 '18 08:05 Kungsgeten

Yeah - I'm aware of org-brain-rename-file (:+1:). But sometimes a batch restructure might be needed and knowing that org-brain will prompt me of correcting the links I broke in the restructure could be good enough for me to not be stressed about "breaking the system". :)

Whil- avatar May 25 '18 11:05 Whil-

I not only modified the file name, but also modified the corresponding .org-id-locations file in my ~/.emacs.d . After finding that it did not work, I changed it back again. As a result, the org-brain-visualize display was abnormal. What should I do then?

jacklisp avatar Sep 25 '20 01:09 jacklisp