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

Only capture selection and comments if present #37

Closed
aancel opened this issue Jun 5, 2021 · 1 comment
Closed

Only capture selection and comments if present #37

aancel opened this issue Jun 5, 2021 · 1 comment

Comments

@aancel
Copy link

aancel commented Jun 5, 2021

Hello,

First of all, I would like to thank you for this great extension, and for promnesia too !

Regarding this issue, I'm wondering if there would be any way of inserting comments and selections, only if the user added a comment or made one or several selections. By default, the template would only contain a basic template (without comments or/selections entries) defined by the user, and if selection/comments are made they then would be included.
An idea on this side could be to add new options to the server to allow specifying the templates for comments and selections, and only proceed this way if those options are present. I do know that it break a bit the org-capture template definition and feel free to close this issue if you think that this is a behavior you wouldn't want to include.

What do you think about this ?

@karlicoss
Copy link
Owner

Hey, sorry for a late reply! And glad you're enjoying grasp and promnesia :)
Hmm, for me the selection/comments only appear if there was something actually selected, as expected; here's the bit of code which is responsible for it

if not empty(selection):
parts.extend(config.format_selection(selection))
if not empty(comment):
parts.extend(config.format_comment(comment))

Is it not the case for you?

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

No branches or pull requests

2 participants