From: Bernt Hansen <bernt@norang.ca>
To: Darlan Cavalcante Moreira <darcamo@gmail.com>
Cc: Orgmode Mailing List <emacs-orgmode@gnu.org>
Subject: Re: Easily go to some frequently accessed heading (narrowed to region)
Date: Sat, 05 Feb 2011 12:57:59 -0500 [thread overview]
Message-ID: <8762sy749k.fsf@norang.ca> (raw)
In-Reply-To: <4d487c86.5043ec0a.55ad.ffffaf99@mx.google.com> (Darlan Cavalcante Moreira's message of "Tue, 01 Feb 2011 18:34:58 -0300")
Darlan Cavalcante Moreira <darcamo@gmail.com> 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
prev parent reply other threads:[~2011-02-05 17:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-01 21:34 Easily go to some frequently accessed heading (narrowed to region) Darlan Cavalcante Moreira
2011-02-02 7:30 ` Eric S Fraga
2011-02-02 14:11 ` Darlan Cavalcante Moreira
2011-02-02 15:52 ` Eric S Fraga
2011-02-02 20:35 ` Alan E. Davis
2011-02-03 2:14 ` Darlan Cavalcante Moreira
2011-02-03 9:27 ` Sébastien Vauban
2011-02-03 2:10 ` Darlan Cavalcante Moreira
2011-02-03 12:37 ` Eric S Fraga
2011-02-02 10:28 ` Bastien
2011-02-02 14:14 ` Darlan Cavalcante Moreira
2011-02-05 17:57 ` Bernt Hansen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8762sy749k.fsf@norang.ca \
--to=bernt@norang.ca \
--cc=darcamo@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).