Darlan Cavalcante Moreira <[email protected]> writes:
> Hello,
>
> I have a main .org file where I put almost everything. There is a
> "Projects" headline where each subheading is a different project. During
> the day I need to go to the Projects headline and open one of the its
> subheadings when I want and add/read something in that project. I know I
> can use a capture template to add something to one of the projects, but
> that does not work (or does it?) when I just want to read or modify
> something.
>
> Does anyone has some function to easily jump to a specific headline as well
> as narrowing to that headline? What I have in mind is some function that
> switches to a specific headline, call org-tree-to-indirect-buffer and
> rename the buffer to the headline title (if the buffer already exists just
> switch to it). In this way I could bind keys to easily go to the most
> common projects. The holy grail would be something similar to the agenda
> that would present me with the different projects.
Hi Darlan,
I'm a little late into this discussion but I used to use a function to
clock in specific tasks based on id. Just generate a unique id for the
task you want and it should be trivial to map it to a key to jump
directly to that task.
Just use org-id-goto with the id of the task and narrow as required.
Below is my function to clock in a task by id.
--8<---------------cut here---------------start------------->8---
(defun bh/clock-in-task-by-id (id)
"Clock in a task by id"
(save-restriction
(widen)
(org-with-point-at (org-id-find id 'marker)
(org-clock-in nil))))
--8<---------------cut here---------------end--------------->8---
--8<---------------cut here---------------start------------->8---
* Some Project
** Some Task
:PROPERTIES:
:ID: w003j861fue0
:END:
* Next project
--8<---------------cut here---------------end--------------->8---
M-x org-id-goto w003j861fue0 RET
I just hardcoded the IDs into my define key functions to get to the task
required.
--8<---------------cut here---------------start------------->8---
(global-set-key (kbd "<f9> m") 'bh/clock-in-read-mail-and-news-task)
(global-set-key (kbd "<f9> o") 'bh/clock-in-organization-task)
(defun bh/clock-in-organization-task ()
(interactive)
(bh/clock-in-task-by-id "437c2cde-fbf0-491f-92ba-51bae487b338"))
(defun bh/clock-in-read-mail-and-news-task ()
(interactive)
(bh/clock-in-task-by-id "85c2e69b-6f37-4236-8896-4f7dd86047c1"))
--8<---------------cut here---------------end--------------->8---
HTH,
Bernt
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-orgmode