-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add org-cite support #191
Comments
Hi, thank you. I can't promise that I will be able to look at it until the Now, the question of really supporting Then of course there is little sense for ORB to support |
Yeah, I was wondering how much really needed to be done. The main I guess I should have posted this on the main repo tracker. WDYT @jethrokuan? Feel free to move this if you think better.
To be sure, this piece will also be trivial. But it would actually be a "follow" processor. I will be adding one that wraps the bibtex-completion stuff, including it's open-notes function, which works with OR/B. The basic idea there is those then get bound to PS - I edited the main post with some of this info. |
No, but it is in ORB. That's what I was meaning here. |
No, ORB doesn't really depend on Org-ref. Well, it's complicated. There is no So what is happening here is that ORB depends on Org-roam being able to recognize Org-ref |
Just by way of update, @myshevchuk @jethrokuan, org-cite is now in org-mode master. |
Looking again at But that code is super simple: (defun org-cite-list-keys (info)
(delete-dups
(org-element-map (org-cite-list-citations info) 'citation-reference
(lambda (r) (org-element-property :key r))
info))) |
Tentative discussion of plans for oc-focused org-ref 3.0. |
@bdarcus Thank you! I may not always respond in time but I'm trying to follow the updates regularly. Unfortunately, I'm really very busy now - I have to finish my PhD thesis by the end of August - and will probably have very little time for new ORB features until then. On the other hand, reviewing and merging pull requests should not be that much time consuming, so you are welcome to submit them! |
Best of luck with that! I'd like to hear from @jethrokuan on what he's thinking for org-roam proper. It seems that's the first step? IUC, it really just means indexing oc citation-references? Thinking more, with everything rapidly coalescing around org-cite, I'm not sure: are any changes needed in ORB? Open notes functionality already works with bibtex-actions-org-cite, and that simply wraps But on this, one easy change is to remove this dependency. I really don't want that package installed for me, particularly when it, in turn, installs helm AND ivy, and will likely soon be obsolete anyway.
|
Updated video on org-ref functionality for oc. https://www.youtube.com/watch?v=3TBYg1MZ6iY And new repo: https://github.com/jkitchin/org-ref-cite He recently added a function to update org-ref cite links to org-cite citations. |
Now that OR has OC support, I guess the question is what ORB might add. So org-ref-cite (whose future is now unclear) has a hydra-based "follow processor", and bibtex-actions an embark-based one. Each provides access to functions that take one-or-more keys-at-point as input. I expect to some degree the functions could be shared between them, though I haven't yet tried myself. I have also made my |
What needs to be updated in ORB is its ability to treat Org-cite citations in It should also be able to provide its "note actions" for an Org-cite-powered note as well as create new notes and put Org-cite citations in It should also provide a function for an Org-cite follow processor to create/open a note. The above is more of a roadmap for myself. I'll look at it as soon as possible. |
@bdarcus what is the workflow of using bibtex-action with orb? How to make note editing go through org-roam templates? |
Discussed in the README, but: (setq bibtex-actions-file-open-note-function 'orb-bibtex-actions-edit-note) But the default notes function does work with org-roam. It just doesn't use its template system (uses the internal one). I've contemplated adding a notes function for org-roam using its template system, but don't have the knowledge or time ATM. |
@bdarcus I worked fine with a bothersome issue. Sometimes, when pressing C-; then n, It asks for capturing again. If I just choose a different file, a new note is created. If I used a custom template for the bibliography, a new chunk of text is inserted. Is there is any way to avoid that? |
@OAshkar Can you reproduce this issue or does it just happen randomly? |
@myshevchuk It happens every time I select the note option from embark-act. I got redirected to the capture templates and after I choose a template, it appends to the created note. |
@OAshkar Did you try |
@chuxubank yes, I check it is running and still same thing. |
@OAshkar Most probably some configuration issue on your side. I'll need more information to debug it. It is in any case unrelated to Org-cite support, so please either open a new issue or post the question on Discourse |
@myshevchuk Thank you. I will check my configs. If I failed to find the problem, I will open an issue with my config. |
Another piece of Org-cite support here: #224 |
Hello @myshevchuk ,
It would work with the following format cite:elements, however it is not the org-cite format. |
Hi, @SampSo.
That's it about Org-cite support in ORB.
Yes, you're trying to use Org-cite citations with Org-ref. Org-ref does not support Org-cite citations.
That's not ORB's task. You can take a look at Citar, which provides a comprehensive support for Org-cite citations, in particular the familiar Org-ref-like behavior. I believe, you also need Embark for this, but please consult Citar's docs for more details. if you use Org-ref + Helm/Ivy-bibtex + Org-roam, ORB provides integration for that. |
Thanks a lot for the follow up. |
ORB does attempt to load Org-ref when |
FWIW, it's not a problem to use org-ref with org-cite. But if you use org-cite and citar, ORB itself becomes optional. |
That's true.
That's true also for the case of the Org-ref and Helm/Ivy-bibtex tandem. All these packages, Citar included, primarily target BibTeX bibliography management and citation management in Org files. They also have their own capabilities for note management, which is rather rudimentary compared to Org-roam's though. ORB's main task is to force all these packages to use Org-roam for note management instead of their built-in mechanisms. ORB's main feature is enabling expansion of BibTeX keywords in Org-roam templates and none of the above packages can do that. All other features of ORB like inserting links/citations or accessing additional actions on a note are secondary convenience features resulting mainly from user requests. They also attempt not to duplicate the existing functionalities of other packages but rather to utilized them. So I'd say it depends on the workflow. For a note-centered workflow, ORB is a natural extension to connect Org-roam with bibliography/citation management packages. For a citation/BibTeX-centered workflow, both ORB and Org-roam become optional, since all these packages have their own note management systems. |
Yes, citar doesn't use org-roam templates. It could, but it's not a priority, in part because, as you say, ORB provides that.
I would separate ORB and org-roam though. I'd say:
|
Thanks for the clarifications! |
Hello everyone! First of all, thank you very much for the ORB! I would like to share a small idea regarding the discussion between @myshevchuk and @samspo.
Maybe, to have a nice environment utilizing Org-cite + Helm/Ivy-BibTeX + Org-roam + ORB it would be enough to have the Suppose I have an Org document containing Org-cite element
Having a citation at point If someone finds it a bit confusing ( |
Hi @premopie, I'm glad that you like it!
That would be easy to implement, but the idea of the |
You can also use Citar as a replacement for Helm/Ivy-bibtex. |
Thanks for prompt reply.
Your approach is reasonable. I don't know Citar well; as far as I can see the user is recommended to use Vertico or Selectrum which means that I would have to duplicate the completion ecosystem. What I need at the moment is to reach a roam note associated with a given citation quickly, for this reason, I wrote something like this
and bound it conveniently with some key. Now I'm able to jump quickly to (or create new) note and optionally call All in all, I can confirm that ORB already offers basic support for org-cite. In my opinion, there is some void space between Org-cite + Helm/Ivy-BibTeX + ORB ecosystem for implementing Org-cite processors. |
Absolutely true. It should be pretty trivial to fill that void (namely writing "ivy-bibtex" and "helm-bibtex" follow processors) , but alas, nobody has yet done so. Probably the easiest approach would be to just borrow some code from the org-ref-cite follow processor, and the citar code. |
Oh, and on this:
Citar is based on the built-in For people committed to ivy or helm, though, it's maybe not the best choice. Still, it's a pretty cool ecosystem of packages worth giving a spin. |
Looking at it from a different perspective, now I see why such a function may be included in ORB. Like for people who don't have Citar installed for this or another reason. Since ORB is about Org-roam notes and it cares about people being able to reach their notes from everywhere and since Org-roam and ORB do recognize Org-cite citations as valid "ROAM_REFS", I think it would be perfectly OK to include your function in ORB for the time being. In principle, the concept of ORB Note Actions may also be extended to citations. Should it be the case, however, Org-ref citations should be supported as well - like providing a common interface to both citation types. In any case, you are welcome to submit your function in a PR.
Citar conceptually consists of two parts, maybe even more, I don't know it well enough yet: 1) a completion interface for BibTeX entries like Helm/Ivy-bibtex; 2) citation processor like Org-ref but for Org-cite citations. Vertico or similar packages are recommended if you want an enhanced experience for part 1), and yet even so they are optional. You can use Citar without them. For part 2) you only need Embark, although I'm not 100% sure it is absolutely required. Embark is an interesting package in itself and may be useful in other contexts. I don't use it much myself though. So you may give Citar a try anyway. It greatly extends default Org-mode Org-cite processors in part 2. |
Native org citation support, called the
org-cite
module, has almost wrapped up, and the feature will be merged to master "any day."For
org-roam
, OC introducescitation
andcitation-reference
objects toorg-element
, and the mainoc.el
module file includes functions likeorg-cite-list-keys
that will return all citation keys in a document. So indexing these will be trivial.Beyond that, OC is designed around flexible and modular "capabilities"; currently:
org-roam
; seecsl-activate
, whose functionality is likely to be integrated into the coreoc-csl
processor)org-open-at-point
; this is the one most relevant toorg-roam-bibtex
)One configures these "processors" like so:
So it will be a highly flexible, modular, system.
Here, for those curious doom users, is my draft PR to add support to its biblio module:
doomemacs/doomemacs#5212
PS - I recently learned that
org-ref
requires bothivy
andhelm
, which I find really problematic, as I don't use either. I guess you will have a decision to make about its status going forward. I would hope that if you continue to support it, it becomes optional in ORB.The text was updated successfully, but these errors were encountered: