-
Notifications
You must be signed in to change notification settings - Fork 104
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 ways to add notes and todo items to the org-brain entry in visualize mode #281
base: master
Are you sure you want to change the base?
Add ways to add notes and todo items to the org-brain entry in visualize mode #281
Conversation
de15d17
to
a67b523
Compare
Hi! This looks like good ideas. There's some conflicts currently, which need to be resolved. I also think that the commands and the templates should be separate PRs, id that's okay. To me it isn't necessary to have two commands for the note and todo actions. Perhaps one is okay which uses |
Thanks for the feedback. I'll make the changes to the functions and resubmit the PR Re: the capture templates being a separate PR, the function to create a TODO item depends on the capture templates being defined. So I'm not sure how to break them into two PRs. If you want, I'll create a separate commit with just the templates first, and then will create a second commit on top where the |
Sorry for putting this PR on hold for so long. I'm thinking about adding a feature which would make it easier to manipulate text directly from the visualize buffer. My guess is that it may make this PR redundant. I'm leaving it open for now though. |
Hi! I've now added support for |
Let me try out the new features over the weekend and get back to you.
Thanks!
…On Wed, Jun 3, 2020, 6:22 PM Erik Sjöstrand ***@***.***> wrote:
Hi! I've now added support for polymode which makes it easy to edit
directly from the org-brain-visualize buffer. I wouldn't say that it
makes this PR redundant, but I feel that it might solve the problems this
PR address?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#281 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAUUHU27D5OQWHBPFORLW3RUZBQ3ANCNFSM4LV3ZONQ>
.
|
a67b523
to
c53b421
Compare
Somehow, My current setup works great for me, so I'm just updating this PR to reset the branch to master and apply my commits on top of the latest version of the code, in case someone else wants to try it out. I've pulled the capture templates out into a separate commit as per review comments, but I have not unified the functions (have only one function that does the right thing based on whether it is in visualize mode / whether universal arg is supplied). I'll make that change to the code as and when time permits. This does the job for me right now :) Thank you for this library @Kungsgeten , it's incredible and has completely changed the way I use org-mode. |
c53b421
to
bad2534
Compare
bad2534
to
7f4fe89
Compare
I plan to use these templates to implement functionality `org-brain-add-todo` in a future commit. The summary of changes in this commit are as follows: 1. Set up capture templates for brain. I'm using "b" as a template prefix key for capture templates related to org-brain. Since people may already be using this key in their own capture templates, this functionality is turned off by default (via `org-brain-visualize-use-capture-templates` var) and the user can select a different prefix key (via `org-brain-visualize-capture-prefix-key` var) Since I was setting up capture templates, I also moved the capture template described in the README to this code. Finally, these templates only work in the context of org-brain-visualize, to avoid clutter in other modes. 2. `org-brain-visualize--register-capture-templates` This is a helper function to ensure that we set up the capture templates only once. It's internal and invisible to the user.
Add a key-binding (`C-c t`) to directly add a TODO entry to the current entry in org-brain. This makes it possible to capture action items about the current entry without leaving the org-brain-visualization window. This change depends on the capture templates introduced in the commit before it and adds `org-brain-visualize-add-todo` and `org-brain-add-todo` functions to enable adding tasks under a brain entry.
Add a key-binding (`C-c z`) to directly trigger adding notes to the current entry in org-brain. This makes it possible to capture thoughts about the current entry without leaving the org-brain-visualization window. The commit provides two functions: - `org-brain-visualize-add-note` : This function is bound to `C-c z` in `org-brain-visualize-mode-map` and is the expected way to use this functionality. Adds a note to the current entry. - `org-brain-add-note`: This is a generic function that can be called from within org-mode.
7f4fe89
to
c8d5a71
Compare
The * causes a new heading to be created, under the heading that we are already creating / accessing. The intention of the capture template is to add content to an existing entry, or create a new entry and add content to it. Both of these are done by the fixed template now.
Earlier, these were only enabled in the `org-brain-visualize-mode`, but it makes sense to add these everywhere, since we mostly work ourside the *org-brain* view. Add capture template related information to the README file as well.
Copying my commit messages here:
Add a note to an org-brain entry
Add a key-binding to directly trigger adding notes to the current
entry in org-brain. This makes it possible to capture thoughts about
the current entry without leaving the org-brain-visualization window.
The commit provides two functions:
org-brain-visualize-add-note
: This function is bound toN
inorg-brain-visualize-mode-map
and is the expected way to use thisfunctionality. Adds a note to the current entry.
org-brain-add-note
: This is a generic function that can be calledfrom within org-mode.
Add a TODO item under the current org-brain entry
Add a key-binding to directly add a TODO entry to the current
entry in org-brain. This makes it possible to capture action items
about the current entry without leaving the org-brain-visualization
window.
I use org-capture to implement this functionality and have made
changes that I don't have too much experience with. I'd love feedback
/ different ways to do this.
Summary of changes:
I'm using "b" as a template prefix key for capture templates related
to org-brain. Since people may already be using this key in their own
capture templates, this functionality is turned off by default (via
org-brain-visualize-use-capture-templates
var) and the user canselect a different prefix key (via
org-brain-visualize-capture-prefix-key
var)Since I was setting up capture templates, I also moved the capture
template described in the README to this code.
Finally, these templates only work in the context of
org-brain-visualize, to avoid clutter in other modes.
org-brain-visualize-add-todo
andorg-brain-add-todo
Once the user configures the variables above, they can use the 'y'
key-binding in org-brain to create a TODO for the current brain entry.
org-brain-visualize--register-capture-templates
This is a helper function to ensure that we set up the capture
templates only once. I'm not sure what the idiomatic way to do this
is, feedback welcome.
This is the first cut of this functionality. If you think this is
okay, I'll make changes in the README file (and any other changes you
require). I am also not sure if I've created the vars and functions in
the correct place in the org-brain.el. I'll move them to the correct
places based on your feedback.