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

Prevent "Could not find UID" error (#230) #250

Closed
wants to merge 3 commits into from

Conversation

jackkamm
Copy link
Collaborator

@jackkamm jackkamm commented Aug 6, 2022

Sometimes, org-caldav-files is missing from org-id-files, which causes an error "Could not find UID" (#230).

This PR prevents the error by updating the org-id locations before searching for any IDs.

Note, upstream org-mode has also pushed a patch that should prevent the problem:

https://list.orgmode.org/87r11un9in.fsf@localhost/T/#t

But, that fix is only on the bleeding-edge of Org, not yet on the stable release. Also, I think this PR would be useful anyways, to protect against unforeseen edge cases where the needed files are missing from the org-id database.

@jackkamm
Copy link
Collaborator Author

jackkamm commented Aug 20, 2022

After further testing, I found that the latest changes to the upstream Org-mode development branch would sometimes find IDs in the org-caldav-backup.org file instead of the correct location in org-caldav-files. This could cause problems like failing to sync changes from the remote.

To avoid this, I updated the PR, so org-caldav-backup.org is not opened when backing up entries to it. Then, org-find-id won't erroneously find IDs there.

Also, I found the commit in 2019 that changed how org-id-find works, and I think was the original cause of #230. It was released in Org 9.4 in late 2020, which corresponds with the timing of the bug. See the mail list link above for more discussion.

@jackkamm
Copy link
Collaborator Author

Closed in favor of #252.

@jackkamm jackkamm closed this Aug 21, 2022
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

Successfully merging this pull request may close these issues.

None yet

1 participant