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

Use org-capture to create new notes #263

Closed
wants to merge 9 commits into from
Closed

Conversation

jagrg
Copy link
Contributor

@jagrg jagrg commented Oct 17, 2018

See #260

@tmalsburg
Copy link
Owner

Thank you for making this PR. A lot of things going on here. I will need to make some time to study this. Is this change going to introduce breaking chances for users of one or multiple notes files? What's the role of bibtex-completion-notes-template-one-file in this new implementation? Is is redundant? If I understand correctly it should serves the same purpose as the capture template no? Sorry if I misunderstood something.

@jagrg
Copy link
Contributor Author

jagrg commented Oct 23, 2018 via email

(progn
(require 'org-capture)
(unless (assoc-default "bibtex" org-capture-templates)
(cl-pushnew bibtex-completion-capture-template
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sese to remove "bibtex" from org-capture-templates after completion of bibtex-completion-edit-notes-one-file? My concern is, that running org-capture separately from bibtex-completion-edit-notes-one-file should not show the "bibtex" action. (I haven't tested if this is the case with your code, but it seems to be the case?)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I agree.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even better, could we just let-bind org-capture-templates?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use let binding since opening #260 and didn't observe any interference with "normal" org-capture use.

@jagrg
Copy link
Contributor Author

jagrg commented Apr 5, 2019 via email

@tmalsburg
Copy link
Owner

@jarg, I haven't tested it but how is it possible that we permanently push a new template and then it doesn't show up? I must be missing something.

@jagrg
Copy link
Contributor Author

jagrg commented Apr 17, 2019 via email

@tmalsburg
Copy link
Owner

tmalsburg commented Apr 17, 2019

Ah, I see what you mean. But I think "bibtex" as the key of the template is actually not allowed. See here: https://orgmode.org/manual/Template-elements.html#Template-elements

p.s: The template is still in org-capture-templates and we just don't see it in the interactive interface because the key is invalid (I think).

@jagrg
Copy link
Contributor Author

jagrg commented Apr 17, 2019 via email

@tmalsburg
Copy link
Owner

I think by "string" they mean the data type string:

The keys that selects the template, as a string, characters only, for example ‘"a"’,

Multiple characters are possible as well but there are constraints:

‘"bt"’ for selection with two keys. When using several keys, keys using the same prefix key must be sequential in the list and preceded by a 2-element entry explaining the prefix key, for example:

@tmalsburg
Copy link
Owner

Either way, I think we should perhaps not change the user's configuration in a way that may not be transparent to them.

@tmalsburg
Copy link
Owner

Sorry for letting this slide. Life is too busy and I don't find the time to study this PR more in depth. Hopefully I will get to it soonish. For now just one question: A solution relying on existing infrastructure (org-capture) would ideally involve fewer lines of code than something home-grown and would therefore be easier to maintain. However, the present PR overall adds 52 lines. Is there a way to make this feature more compact? No need to write any code. Just looking for ideas. In general maintainability has become an issue with this software and it has prevented me from merging some other features as well. If I had time, I'd heavily refactor the whole package.

@jagrg
Copy link
Contributor Author

jagrg commented Sep 18, 2019 via email

@tmalsburg
Copy link
Owner

Sorry for not getting back to you earlier. A solution using org-capture is the goal for the future. Do you think #309 might be a good stepping stone?

@jagrg
Copy link
Contributor Author

jagrg commented Apr 15, 2020 via email

@tmalsburg
Copy link
Owner

Thanks @jagrg. I merged #309 with small modifications. There are still some good ideas in this PR that we don't have yet, but I will incorporate them individually (e.g. separate editing functions for one file vs. multiple files).

@tmalsburg tmalsburg closed this Apr 16, 2020
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.

3 participants