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

issue with duplicate property drawers when creating org-ids on link creation #92

Open
iantor opened this issue Mar 21, 2024 · 9 comments

Comments

@iantor
Copy link

iantor commented Mar 21, 2024

Just trying latest org-super-links (using native compilation)
org-mode version 9.6.21
emacs version 29.1

I tried the settings recommended for org-id in the docs:

(require 'org-id)
(setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id)

However, this sometimes produced multiple property drawers in an entry, with a new drawer to contain the org-id.

The following setting seems to work better (still testing)

(setq org-id-link-to-org-use-id t)

@iantor iantor changed the title issue with dupllicate property drawers when creating org-ids on link creation issue with duplicate property drawers when creating org-ids on link creation Mar 21, 2024
@iantor
Copy link
Author

iantor commented Mar 22, 2024

Still getting duplicate property drawers with this setting.

(setq org-id-link-to-org-use-id t)

will continue to test and will trace code which creates id. Something is fishy there.

@iantor
Copy link
Author

iantor commented Mar 22, 2024

The conclusion of my testing is that there are problems with org-id support in org-super-links. I will continue testing without the use of org-id (using traditional org-mode links) and will report on my results.

@toshism
Copy link
Owner

toshism commented Mar 22, 2024

Interesting, thanks for investigating. Please report back if you find anything. I have still not moved to 29 yet, possible something changed I suppose.

@iantor
Copy link
Author

iantor commented Mar 22, 2024

will do.

@iantor
Copy link
Author

iantor commented Mar 22, 2024

I'm going to try disabling native compilation for this library

@iantor
Copy link
Author

iantor commented Mar 23, 2024

Ok I have some more info. I have disabled native compilation of org-super-links as follows (there were a couple of related libraries for which I blocked native compilation with a regex in two global variables):

(setq native-comp-jit-compilation-deny-list '("worf" "org-super-links"))
(setq native-comp-bootstrap-deny-list '("worf" "org-super-links"))

(use-package org-super-links
:straight (org-super-links :type git :host github :repo "toshism/org-super-links" :branch "develop" :build (:not native-compile))
:bind (("C-c s s" . org-super-links-link)
("C-c s l" . org-super-links-store-link)
("C-c s C-l" . org-super-links-insert-link)))

I then re-enabled org-id support:

(require 'org-id)

(setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id)

Now tested several times, id was inserted without error (no extra property drawers created), but creation of bi-directional link takes up to 90 seconds. (this was the case on some occasions before I disabled native compilation of the package and dependent packages).

I will continue my testing and tolerate the delay for now.

@iantor
Copy link
Author

iantor commented Mar 24, 2024

Decided to stop using org-id because of the speed issue. Switched back to traditional org links and now things are very fast even in a rather large file (1.4 MB). Everything else seems very stable with native compilation disabled. Will continue testing.

@iantor
Copy link
Author

iantor commented Mar 24, 2024

While reverting to the traditional org-links approach, I had an unusual cache error followed by significant data loss in the org file. Fortunately, I commit org files to git so I was able to revert by a day. I will continue to test and see if this error happens again.

@iantor
Copy link
Author

iantor commented Mar 24, 2024

I think that the cache error I found may have been caused by a problem with org-capture templates (didn't find anything online about this). It seems that if no default value is provided in an org-capture template prompt element, and the prompt is skipped, bad characters are inserted in the capture buffer. Found this using whitespace-mode and org-lint. I added default values for all prompted and user-entered values. Will continue testing. I will also review the org-capture source to better understand what might be going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants