-
Notifications
You must be signed in to change notification settings - Fork 9
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
reference key as target-finder? #13
Comments
Hi Bruce, In the version currently on my workbench I wrote citar-denote-dwim which calls the citar-dwm function for the citations keys in the reference line.
Are these the sort of actions you seek? Wold introducing the ampersand create backward compatibility issues? Wrapping the references in properties is not in line with the Denote way of working. |
I'm not really requesting it per se; more just noting what others have requested in related packages. In
IDK.
So rather than using standard org properties for metadata, the Denote "way" is to use non-standard equivalents (I see now they're actually not org properties because the syntax is slightly different), but not specific to org? |
I'll look into adding the ampersand as it is a nice indicator of a citation. I should be able to build it without having to change existing notes. Denote does not only work with Org mode but also Markdown and plain text. Using a property line is normal practice in Org Mode so we are not deviating from standard Org Mode practice. I'll keep it open until I have time to release the next version. |
You mean ampersand (&) or asperand (@)?
The properties that denote or citar-denote (I don't understand which) creates now aren't actually properties, so org doesn't see them. That's why that function returns nil, even if I add the asperand to the key. |
Denote works this way to create consistency with Markdown and text files. It does not aim to be Org Mode centric. It seems that Using This page has some good info: https://orgmode.org/worg/dev/org-element-api.html I don't have any time to work on this until May, but I think we could make the Embark at point function work on the reference line. |
Notes for May, while fresh in my mind ... Yeah, I may just be not understanding some details about denote etc. In the end, it should ideally just be easy for the current citar at-point functionality to work well with both org and markdown (via the yaml or toml headers). Right now, here's what I can conclusively say:
It correctly returns the citekey in the org and markdown files that citar and citar-org-roam create. For example, this also works as expected when point is on citekey in the YAML header, and also therefore should in a TOML header. ---
title: test
reference: @testkey
---
And a body citation [@testkey]. We do not assume org-roam per se in this org code (the code doesn't look for the That allows us to share code between markdown and org functions. And in markdown, it's the same syntax for the citekey in the body. So am not sure why it doesn't work when I tried with this package and org. But as you say, we can look at that later. One possibility is to write your own major-mode function(s) for this and include it in this package, though I think ideally files would be as compatible as possible across note-taking packages. Another is to change the citar function somehow. Aside: seems the new djot format is likely to adopt the same YAML-light metadata syntax as pandoc, and a very similar citation syntax. So at the inevitable point at which we see an Emacs note package that supports that format, citar already does! |
Thanks. I'll review all this in May (big trip to the US coming up). Ideally we get Citar to integrate with Denote using Org, Markdown and plain text. |
It is easy to configure Denote to accept djot by configuring |
Hi Bruce, I wrote that I don't have time to look at this issue till May (which is true), but than I got distracted by the other issue. Anyway, I should be doing other things, but the allure of Emacs hacking is strong. |
I thought a bit about this one. The current I could redirect this function to the Embark equivalent, in case |
IDK. I can just say that from a user POV, in |
Was playing a bit with your package and denote, and noticed something that sometimes comes up in the org-roam world.
The
reference
property citekey: you may want to consider an embark "target-finder" (or similar for hydra/transient) for that, so that users can act on it at point.If you conclude yes, you may want to consider a syntax with already-existing finder:
@key
?Which actually raises another issue: by default, you don't put the properties in an org property drawer, so this function doesn't work with that change.
https://github.com/emacs-citar/citar/blob/d183ec20c407983c4ae22089ec481f1a6f5cbe69/citar-org.el#L312
I think you want to wrap them in
:properties:
and:end:
?The text was updated successfully, but these errors were encountered: