emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Give focus to a item
@ 2011-02-12 23:53 Marcelo de Moraes Serpa
  2011-02-13  0:54 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Marcelo de Moraes Serpa @ 2011-02-12 23:53 UTC (permalink / raw)
  To: Org Mode

Hi list,

So, I see myself too often trying going to the same toplevel item on
my gtd.org file. For example, let's say I have this on the org file:

* Project 1
  This is a project about something important.
  Check this URL for more information: http://someurl.com
** TODO Some item to do
** TODO Another item to do

* Project 2
* Project 3

Right now, most of my focus is on Project 1. I find myself adding more
and more items to it or coming back to add additional notes. Of course
I can narrow it, or maybe just use org-remember to input items to it,
but it would also be nice if I could setup a shortcut to "focus" it.
By focus I mean that, by pressing this key-combo, the following would
happen:

- The pointer would go to Project 1;
- The tree would open;
- All of the other items would close.

I'm not well-versed in elisp, nor in the org-mode API. Anyone with
more experience thinks this could be something easy to implement?

Thanks,

Marcelo.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Give focus to a item
  2011-02-12 23:53 Give focus to a item Marcelo de Moraes Serpa
@ 2011-02-13  0:54 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2011-02-13  0:54 UTC (permalink / raw)
  To: Marcelo de Moraes Serpa; +Cc: Org Mode

Hi Marcelo,

Marcelo de Moraes Serpa <celoserpa@gmail.com> writes:

> So, I see myself too often trying going to the same toplevel item on
> my gtd.org file. 

Bernt posted some useful bits in a similar discussion:
  http://article.gmane.org/gmane.emacs.orgmode/37180

I would do this:

--8<---------------cut here---------------start------------->8---
(defun my-focus-on-this ()
  "Focus on THIS project"
  (interactive)
  (org-id-goto "6e959401-f6d3-4e9e-9cd8-0f80f12fa585")
  (org-show-subtree)
  (org-narrow-to-subtree))
--8<---------------cut here---------------end--------------->8---

Use `org-id-get-create' to create the ID if necessary.

HTH,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-13  0:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-12 23:53 Give focus to a item Marcelo de Moraes Serpa
2011-02-13  0:54 ` Bastien

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).