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
refactor: Default Org front-matter to use the ID property #20
Conversation
For a discussion, read issue 8 on the GitHub mirror: <protesilaos#8>.
Move `denote-use-org-id` from denote.el to `denote-link-use-org-id` in denote-link.el. Rationale for this change is that the ID property style will always work for Org files and doesn't need any customization; also that style doesn't add any org-id dependency. The org-id dependency is needed only if the user wants to access "active" feature of the "id:" type links like following and exporting.
|
I have one suggested change on top of your I tested out that using the ID property by default in Org file works well, and doesn't have any I additionally tested creating Markdown files and linking to the Org files with ID property and the denote: links in the Markdown files got created correctly. I did find one issue in the Example: A user linking a Markdown note from an Org note. |
Fine by me and it does make sense. Just how we use a different date format for Markdown to ensure compliance.
Indeed. This is what I alluded to in issue 8: #8 (comment) Do you want to do it as part of this PR? Do you wan to do it separately? Shall I give it a try? Just asking to better coordinate our work. Thanks for doing this and for the feedback in general! |
I quickly looked for a way to check the target file type and origination file type, but couldn't find it. I won't have time to work on that today. So can you please add a fix for that?
Thanks to you! My effort in all of this is just like a droplet in an ocean :). |
Sure! Now I just need to figure out how best to incorporate your changes into the |
Okay, I think I found it. Will pull from here: git@github.com:kaushalmodi/denote.git |
|
Merged here 34554a7. But I do not know how to mark this as "merged". |
|
As I have submitted a PR, you can fetch that branch directly from your own git remote as well. e.g. This will create a local branch |
That's alright, you can then just close it (I'll close it). Thanks! |
|
Related to viewing PRs in Emacs, I found this neat trick by Oleh Krehel (developer of ivy/counsel/etc.): https://oremacs.com/2015/03/11/git-tricks/ In the denote repo's to Now, in Magit, when I do |
|
btw I didn't understand what the 34554a7 merge commit does. This PR branch is already rebased to the latest origin/main. |
I must have messed up then. Should I revert? |
|
It looks like that commit is only on your remote's org-id branch, not the main branch. You can check out a branch starting from 80eb752, add additional commits for the org-id fix and commit that to main. |
Yes, that was the idea so that I can add the final part about checking the file type of the target file. Will it be wrong that way? |
"Wrong" might be subjective.. it's just that the merge commit seemed unnecessary since this PR is already rebased to the main branch of this repo. |
Okay. What's the best way then to continue working on a separate branch before merging everything back into main? Shall I check out Or shall I just merge this PR and continue working from main? |
👍
This is an equally good option. |
|
Starting working from 80eb752. More to follow. Thanks! |
|
Made the changes and merged everything into main. The branch I was working on, if needed: https://github.com/protesilaos/denote/tree/org-id-links |

denote-use-org-idfrom denote.el todenote-link-use-org-idin denote-link.el. The rationale for this change is that the ID property style will always work for Org files and doesn't need any customization; also that style doesn't add any org-id dependency.Fixes #8.