-
Notifications
You must be signed in to change notification settings - Fork 54
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
Support multiple notes in one org file #518
Comments
Hi @bdarcus, thank you so much for your work on this package, it's been a joy to use so far! For whatever it's worth, I recently slapped together a few functions to add this functionality to citar à la ivy-bibtex, which I'd been using before. Needless to say that it's very quick-and-dirty code, and you may well have had a completely different implementation in mind, but here it is nonetheless. Hope it proves useful, and thanks again. |
Thanks @ademberbic. Based on this, do you have any input on my design questions above? I don't actually recall how ivy-bibtex handles this. |
Good question @bdarcus—I'm not at all familiar with org-roam myself, so I'm afraid I can only be of so much use here. With ivy-bibtex and helm-bibtex, it's an either/or choice: if In terms of mixing one-file-for-notes and one-note-per-file, I suppose I could imagine a setup where Maybe you're right that, if a user wants that much flexibility, they should store the note path in the record itself. I can imagine situations where it'd be useful (e.g. a 'master' notes directory, and then files that collect notes on everything I'm reading for a given project)—but I can equally imagine it all getting very messy, very quick. I think this one's your call. |
Just to clarify, I use the org-roam example just because it's the most widely used package for this, and I use it. But it's really a general question.
Right; that's what I was assuming. And you then can't specify more than one file?
So it could open the same file in multiple buffers then?
I would also worry about the performance implications of that. Aside: I noticed that Emacs recently picked up sqlite support. |
Correct, the variable
In theory, yes, but I've just given it a try and it looks like their implementation is buggy. It spawns an org-capture-style window to edit notes, but if you pass multiple keys to I imagine you could implement this properly with indirect buffers, each narrowed to the relevant subheading—I think that's how org-capture itself does it—but if each key the user selected spawns its own window, there's the question of how to lay them all out. |
Hey @bdarcus, thanks a lot for citar. I'm chiming in with my use-case, maybe this will help shaping up this functionality: I'm using a single My reason for having everything in one file instead of using one file per entry is that all entries have a bibtex source block that gets tangled to a "biblio.bib" file, and Org mode doesn't tangling to a single output file from multiple Org files. Sample of what my file looks like:
|
Currently I think I could use the trick mentioned in the README, with setting Maybe a solution would be providing a
|
That would likely make sense, as a generalization of the functions we use now to find related files (see
That seems a little awkward. OR v2 uses org-ids to identify all nodes, which is at least consistent and unambiguous. As is occurs to me now, it might be worth mentioning that if we're concerned about performance here, maybe it's time to consider a SQLite solution, as org-roam does? Emacs now has out-of-box support for SQLite, presumably for just this sort of situation. Which makes me also wonder about something more tightly coupled to OR; say a |
Hi @alarsyo! To be clear, I totally get the sort of use cases, and have no objection in principle. To me it's just a question of how to do it elegantly, that fits well with the existing design. And since I myself haven't seen a need for it, and have other issues that are higher priority, I don't have a huge incentive to figure it out and code it. Which is to say, happy to accept PRs ;-) |
@jethrokuan - any thoughts or tips on this? I'm just thinking that, rather than add more code and complexity to citar proper to support this use case, can instead have a small (tiny?) little package that relies on OR v2 for handing the notes and gluing it to citar. The resulting package should also work better with OR. Might even be Seems one obvious needed change here would be something like a configurable On the org-roam end, seems it would be helpful to be helpful to have the function for adding a ref to a node configurable? See #602 for futther discussion. |
I've decided to close this issue, and instead make citar a bit more configurable. So folks that want this functionality would simply use citar with org-roam, which would take care of those details. Or they could write their own functions, examples of which we can put on the wiki, to open notes and update candidates. See the linked issues. |
Refactor the notes API to enable more general functionality (see #518), and tighter integration with note-taking packages like org-roam (see #602). - Add citar-keys-with-notes-functions defcustom. - Rename citar-open-notes-function to citar-open-notes-functions; make a list. - Refactor citar-open-notes to make use of the above - Add some convenience functions for working with these data. Close #601
Refactor the notes API to enable more general functionality (see #518), and tighter integration with note-taking packages like org-roam (see #602). - Add citar-keys-with-notes-functions defcustom. - Rename citar-open-notes-function to citar-open-notes-functions; make a list. - Refactor citar-open-notes to make use of the above - Add some convenience functions for working with these data. Close #601
For the adventurous, if you want to test this, I think it should be ready (though don't be surprised if there are some hiccups). |
I'll try to test this tomorrow, thanks! |
No huge rush; it will probably take a week or so before I've fixed some things I know need fixing. And it could take longer to address a couple of issues in org-roam. |
Closing this again; this will be handled in https://github.com/emacs-citar/citar-org-roam. |
Summary
Given that org-roam has removed the file-per-note restriction (see also #517), we might do the same.
Details
I'm just not sure how best to do that ATM, as I don't have a ton of experience coding and working with org structure.
There are also, I think, some design nuances to consider; for example:
If we remove this restriction, seems it should be more flexible than only a single org file. For example, maybe I want to mix single-per-file and multi-per-file (though not sure that's a great idea in org-roam given its robust linking, along with transclusion)?
Regardless, how to best configure what UX here?
OTOH, maybe if people want that sort of flexibility, they should store the note file paths in the actual record?
Counterpoint
One could reasonably argue this is not worth the hassle, and that we have a design now that works well for one-file-per-note/reference use cases, that this is increasingly what we're seeing in diverse new note-taking packages, and that users here aren't actually requesting it. For that reason, I've marked the milestone as "future" (post 1.0).
The text was updated successfully, but these errors were encountered: