* Easily go to some frequently accessed heading (narrowed to region)
@ 2011-02-01 21:34 Darlan Cavalcante Moreira
2011-02-02 7:30 ` Eric S Fraga
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Darlan Cavalcante Moreira @ 2011-02-01 21:34 UTC (permalink / raw)
To: Orgmode Mailing List
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.
Thanks
Darlan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Easily go to some frequently accessed heading (narrowed to region)
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 10:28 ` Bastien
2011-02-05 17:57 ` Bernt Hansen
2 siblings, 1 reply; 12+ messages in thread
From: Eric S Fraga @ 2011-02-02 7:30 UTC (permalink / raw)
To: Darlan Cavalcante Moreira; +Cc: Orgmode Mailing List
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.
Two quick suggestions, neither of which does exactly what you want (I'm
sure others will chime in):
1. use =org-goto= followed by =org-narrow-to-subtree=.
2. use a custom agenda view and either tag or categorise all your
projects and sub-projects.
Neither of these gives you a separate indirect buffer but may make
access easier.
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.294.g8158)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Easily go to some frequently accessed heading (narrowed to region)
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 10:28 ` Bastien
2011-02-02 14:14 ` Darlan Cavalcante Moreira
2011-02-05 17:57 ` Bernt Hansen
2 siblings, 1 reply; 12+ messages in thread
From: Bastien @ 2011-02-02 10:28 UTC (permalink / raw)
To: Darlan Cavalcante Moreira; +Cc: Orgmode Mailing List
Hi Darlan,
Darlan Cavalcante Moreira <darcamo@gmail.com> writes:
> 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.
Maybe some dummy function like that?
(defun my-find-org-heading nil
"Find a heading."
(interactive)
(find-file "~/org/my.org")
(goto-char (point-min))
(search-forward "* Your heading")
(org-narrow-to-subtree))
--
Bastien
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Easily go to some frequently accessed heading (narrowed to region)
2011-02-02 7:30 ` Eric S Fraga
@ 2011-02-02 14:11 ` Darlan Cavalcante Moreira
2011-02-02 15:52 ` Eric S Fraga
0 siblings, 1 reply; 12+ messages in thread
From: Darlan Cavalcante Moreira @ 2011-02-02 14:11 UTC (permalink / raw)
To: Eric S Fraga; +Cc: Orgmode Mailing List
Thanks Eric
I tried org-goto before, but I needed something that I could bind to a
shortcut and that would go to a specif project without needing further
steps. As far as I could understand org-goto is very nice to navigate to a
specific parts in the file iteratively, but not appropriated to be called
inside a lisp function.
A custom agenda view is is good to see the tasks associated with a project
and I already tag each project as you suggested, but besides the tasks
there are some subheadings in each project that have only information
without tasks or schedule/deadline dates. That is what motivated me to
search for a way to quickly access the project contents and not only its
tasks.
--
Darlan
At Wed, 02 Feb 2011 07:30:25 +0000,
Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
>
> 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.
>
> Two quick suggestions, neither of which does exactly what you want (I'm
> sure others will chime in):
>
> 1. use =org-goto= followed by =org-narrow-to-subtree=.
> 2. use a custom agenda view and either tag or categorise all your
> projects and sub-projects.
>
> Neither of these gives you a separate indirect buffer but may make
> access easier.
> --
> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
> : using Org-mode version 7.4 (release_7.4.294.g8158)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Easily go to some frequently accessed heading (narrowed to region)
2011-02-02 10:28 ` Bastien
@ 2011-02-02 14:14 ` Darlan Cavalcante Moreira
0 siblings, 0 replies; 12+ messages in thread
From: Darlan Cavalcante Moreira @ 2011-02-02 14:14 UTC (permalink / raw)
To: Bastien; +Cc: Orgmode Mailing List
Thanks Bastien,
This is almost what I wanted and although I'm not a lisp hacker I think I
should be able to start from this and google my way to what I want.
--
Darlan
At Wed, 02 Feb 2011 11:28:45 +0100,
Bastien <bastien.guerry@wikimedia.fr> wrote:
>
> Hi Darlan,
>
> Darlan Cavalcante Moreira <darcamo@gmail.com> writes:
>
> > 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.
>
> Maybe some dummy function like that?
>
> (defun my-find-org-heading nil
> "Find a heading."
> (interactive)
> (find-file "~/org/my.org")
> (goto-char (point-min))
> (search-forward "* Your heading")
> (org-narrow-to-subtree))
>
> --
> Bastien
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Easily go to some frequently accessed heading (narrowed to region)
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:10 ` Darlan Cavalcante Moreira
0 siblings, 2 replies; 12+ messages in thread
From: Eric S Fraga @ 2011-02-02 15:52 UTC (permalink / raw)
To: Darlan Cavalcante Moreira; +Cc: Orgmode Mailing List
Darlan Cavalcante Moreira <darcamo@gmail.com> writes:
> Thanks Eric
>
> I tried org-goto before, but I needed something that I could bind to a
[...]
> A custom agenda view is is good to see the tasks associated with a project
> and I already tag each project as you suggested, but besides the tasks
> there are some subheadings in each project that have only information
> without tasks or schedule/deadline dates. That is what motivated me to
> search for a way to quickly access the project contents and not only its
> tasks.
Okay, let's try a third suggestion (in case it's 3rd time lucky ;-):
3. what about a sparse tree view (org-sparse-tree, C-c /, followed by
'm' for match on a tag of choice) of your projects file?
But again, this isn't necessarily something you can program, although
maybe you can as org-sparse-tree invokes org-match-sparse-tree which
looks definitely viable as a candidate for programmatic use:
,----
| org-match-sparse-tree is an interactive compiled Lisp function in
| `org.el'.
|
| (org-match-sparse-tree &optional TODO-ONLY MATCH)
|
| Create a sparse tree according to tags string MATCH.
| MATCH can contain positive and negative selection of tags, like
| "+WORK+URGENT-WITHBOSS".
| If optional argument TODO-ONLY is non-nil, only select lines that are
| also TODO lines.
`----
so you could definitely write specific a function to use this, with a
specific match string, followed by a narrow to subtree?
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.298.g16b40)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Easily go to some frequently accessed heading (narrowed to region)
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
1 sibling, 2 replies; 12+ messages in thread
From: Alan E. Davis @ 2011-02-02 20:35 UTC (permalink / raw)
To: Eric S Fraga; +Cc: Orgmode Mailing List
[-- Attachment #1.1: Type: text/plain, Size: 2731 bytes --]
I adapted something from Sacha Chua: a file with links to my most
frequently accessed links. I too have been seeking some way to make
this automatic, but even as it is, it works great.
I call the file "Pointers.org".
It is just an org-mode file, each headline is a link.
Then, in my init file (.emacs) is the following:
,----
| (defun pointers ()
| (interactive)
| (find-file "~/org/Pointers.org"))
| (define-key global-map "\C-c0" 'pointers)
`----
It's not too hard to install a new link at the top of the file. I guess
it would also be easy to write a function or use a capture template to
do this.
Alan
"Pollution is nothing but the resources we are not harvesting. We allow
them to disperse because we've been ignorant of their value."
--- R. Buckminster Fuller
On Thu, Feb 3, 2011 at 1:52 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
> Darlan Cavalcante Moreira <darcamo@gmail.com> writes:
>
> > Thanks Eric
> >
> > I tried org-goto before, but I needed something that I could bind to a
>
> [...]
>
> > A custom agenda view is is good to see the tasks associated with a
> project
> > and I already tag each project as you suggested, but besides the tasks
> > there are some subheadings in each project that have only information
> > without tasks or schedule/deadline dates. That is what motivated me to
> > search for a way to quickly access the project contents and not only its
> > tasks.
>
> Okay, let's try a third suggestion (in case it's 3rd time lucky ;-):
>
> 3. what about a sparse tree view (org-sparse-tree, C-c /, followed by
> 'm' for match on a tag of choice) of your projects file?
>
> But again, this isn't necessarily something you can program, although
> maybe you can as org-sparse-tree invokes org-match-sparse-tree which
> looks definitely viable as a candidate for programmatic use:
>
> ,----
> | org-match-sparse-tree is an interactive compiled Lisp function in
> | `org.el'.
> |
> | (org-match-sparse-tree &optional TODO-ONLY MATCH)
> |
> | Create a sparse tree according to tags string MATCH.
> | MATCH can contain positive and negative selection of tags, like
> | "+WORK+URGENT-WITHBOSS".
> | If optional argument TODO-ONLY is non-nil, only select lines that are
> | also TODO lines.
> `----
>
> so you could definitely write specific a function to use this, with a
> specific match string, followed by a narrow to subtree?
>
> --
> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
> : using Org-mode version 7.4 (release_7.4.298.g16b40)
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
[-- Attachment #1.2: Type: text/html, Size: 3808 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Easily go to some frequently accessed heading (narrowed to region)
2011-02-02 15:52 ` Eric S Fraga
2011-02-02 20:35 ` Alan E. Davis
@ 2011-02-03 2:10 ` Darlan Cavalcante Moreira
2011-02-03 12:37 ` Eric S Fraga
1 sibling, 1 reply; 12+ messages in thread
From: Darlan Cavalcante Moreira @ 2011-02-03 2:10 UTC (permalink / raw)
To: Eric S Fraga; +Cc: Orgmode Mailing List
Thanks again Eric, this is a good solution for projects that are not
accessed frequently for me (I only know some of the org search
capabilities, I guess it is time to reread that section in the manual).
At last, using the initial code provided by Bastien I was able to
program something that gives me what I wanted. The code is provided
below.
Basically, I only need to write a "my-find-someproject*-org-heading"
function for each projects I am interested in and bind it to a key. I
had before the "F1" key binded to a function that just opened my main
org file, therefore the most straightforward idea is to rebind that
function to "F1 F1" and then bind the different
my-find-someproject*-org-heading functions to "F1 SomeKey".
#+begin_src emacs-lisp
(defun buffer-exists (bufname)
(not
(eq nil (get-buffer bufname))
)
)
(defun my-find-org-heading (projectName)
(interactive)
(let (heading org-indirect-buffer-display)
(setq heading (concat "* " projectName))
(setq org-indirect-buffer-display 'current-window)
(if (buffer-exists projectName)
(switch-to-buffer projectName)
;; Else
(progn
(find-file "~/org/main.org")
(goto-char (point-min))
(search-forward heading)
(org-tree-to-indirect-buffer)
(rename-buffer projectName)
(org-overview)
(show-children)
)
)
)
)
(defun my-find-someproject-org-heading nil
(interactive)
(my-find-org-heading "someproject")
)
#+end_src
--
Darlan
At Wed, 02 Feb 2011 15:52:55 +0000,
Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
>
> Darlan Cavalcante Moreira <darcamo@gmail.com> writes:
>
> > Thanks Eric
> >
> > I tried org-goto before, but I needed something that I could bind to a
>
> [...]
>
> > A custom agenda view is is good to see the tasks associated with a project
> > and I already tag each project as you suggested, but besides the tasks
> > there are some subheadings in each project that have only information
> > without tasks or schedule/deadline dates. That is what motivated me to
> > search for a way to quickly access the project contents and not only its
> > tasks.
>
> Okay, let's try a third suggestion (in case it's 3rd time lucky ;-):
>
> 3. what about a sparse tree view (org-sparse-tree, C-c /, followed by
> 'm' for match on a tag of choice) of your projects file?
>
> But again, this isn't necessarily something you can program, although
> maybe you can as org-sparse-tree invokes org-match-sparse-tree which
> looks definitely viable as a candidate for programmatic use:
>
> ,----
> | org-match-sparse-tree is an interactive compiled Lisp function in
> | `org.el'.
> |
> | (org-match-sparse-tree &optional TODO-ONLY MATCH)
> |
> | Create a sparse tree according to tags string MATCH.
> | MATCH can contain positive and negative selection of tags, like
> | "+WORK+URGENT-WITHBOSS".
> | If optional argument TODO-ONLY is non-nil, only select lines that are
> | also TODO lines.
> `----
>
> so you could definitely write specific a function to use this, with a
> specific match string, followed by a narrow to subtree?
>
> --
> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
> : using Org-mode version 7.4 (release_7.4.298.g16b40)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Easily go to some frequently accessed heading (narrowed to region)
2011-02-02 20:35 ` Alan E. Davis
@ 2011-02-03 2:14 ` Darlan Cavalcante Moreira
2011-02-03 9:27 ` Sébastien Vauban
1 sibling, 0 replies; 12+ messages in thread
From: Darlan Cavalcante Moreira @ 2011-02-03 2:14 UTC (permalink / raw)
To: Alan E. Davis; +Cc: Orgmode Mailing List
Thanks Alan,
In fact, I used a very similar function to open my main org file for a long
time, but since lately I was always going to a specific heading after
opening the org file I got interested in what I had asked.
--
Darlan
At Thu, 3 Feb 2011 06:35:12 +1000,
"Alan E. Davis" <lngndvs@gmail.com> wrote:
>
> [1 <text/plain; ISO-8859-1 (7bit)>]
> I adapted something from Sacha Chua: a file with links to my most
> frequently accessed links. I too have been seeking some way to make
> this automatic, but even as it is, it works great.
>
> I call the file "Pointers.org".
>
> It is just an org-mode file, each headline is a link.
>
> Then, in my init file (.emacs) is the following:
>
> ,----
> | (defun pointers ()
> | (interactive)
> | (find-file "~/org/Pointers.org"))
> | (define-key global-map "\C-c0" 'pointers)
> `----
>
> It's not too hard to install a new link at the top of the file. I guess
> it would also be easy to write a function or use a capture template to
> do this.
>
> Alan
>
>
> "Pollution is nothing but the resources we are not harvesting. We allow
> them to disperse because we've been ignorant of their value."
>
> --- R. Buckminster Fuller
>
>
>
> On Thu, Feb 3, 2011 at 1:52 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
>
> > Darlan Cavalcante Moreira <darcamo@gmail.com> writes:
> >
> > > Thanks Eric
> > >
> > > I tried org-goto before, but I needed something that I could bind to a
> >
> > [...]
> >
> > > A custom agenda view is is good to see the tasks associated with a
> > project
> > > and I already tag each project as you suggested, but besides the tasks
> > > there are some subheadings in each project that have only information
> > > without tasks or schedule/deadline dates. That is what motivated me to
> > > search for a way to quickly access the project contents and not only its
> > > tasks.
> >
> > Okay, let's try a third suggestion (in case it's 3rd time lucky ;-):
> >
> > 3. what about a sparse tree view (org-sparse-tree, C-c /, followed by
> > 'm' for match on a tag of choice) of your projects file?
> >
> > But again, this isn't necessarily something you can program, although
> > maybe you can as org-sparse-tree invokes org-match-sparse-tree which
> > looks definitely viable as a candidate for programmatic use:
> >
> > ,----
> > | org-match-sparse-tree is an interactive compiled Lisp function in
> > | `org.el'.
> > |
> > | (org-match-sparse-tree &optional TODO-ONLY MATCH)
> > |
> > | Create a sparse tree according to tags string MATCH.
> > | MATCH can contain positive and negative selection of tags, like
> > | "+WORK+URGENT-WITHBOSS".
> > | If optional argument TODO-ONLY is non-nil, only select lines that are
> > | also TODO lines.
> > `----
> >
> > so you could definitely write specific a function to use this, with a
> > specific match string, followed by a narrow to subtree?
> >
> > --
> > : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
> > : using Org-mode version 7.4 (release_7.4.298.g16b40)
> >
> > _______________________________________________
> > Emacs-orgmode mailing list
> > Please use `Reply All' to send replies to the list.
> > Emacs-orgmode@gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> >
> [2 <text/html; ISO-8859-1 (quoted-printable)>]
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Easily go to some frequently accessed heading (narrowed to region)
2011-02-02 20:35 ` Alan E. Davis
2011-02-03 2:14 ` Darlan Cavalcante Moreira
@ 2011-02-03 9:27 ` Sébastien Vauban
1 sibling, 0 replies; 12+ messages in thread
From: Sébastien Vauban @ 2011-02-03 9:27 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Alan,
"Alan E. Davis" wrote:
> I adapted something from Sacha Chua: a file with links to my most
> frequently accessed links. I too have been seeking some way to make
> this automatic, but even as it is, it works great.
>
> I call the file "Pointers.org".
>
> It is just an org-mode file, each headline is a link.
>
> Then, in my init file (.emacs) is the following:
>
> ,----
> | (defun pointers ()
> | (interactive)
> | (find-file "~/org/Pointers.org"))
> | (define-key global-map "\C-c0" 'pointers)
> `----
>
> It's not too hard to install a new link at the top of the file. I guess
> it would also be easy to write a function or use a capture template to
> do this.
It could be interesting to look at Emacs "bookmarks" (C-x r l), and maybe see
how to come up with an org-bookmarks that would take the best of both worlds.
Just an idea...
Best regards,
Seb
--
Sébastien Vauban
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Easily go to some frequently accessed heading (narrowed to region)
2011-02-03 2:10 ` Darlan Cavalcante Moreira
@ 2011-02-03 12:37 ` Eric S Fraga
0 siblings, 0 replies; 12+ messages in thread
From: Eric S Fraga @ 2011-02-03 12:37 UTC (permalink / raw)
To: Darlan Cavalcante Moreira; +Cc: Orgmode Mailing List
Darlan Cavalcante Moreira <darcamo@gmail.com> writes:
> Thanks again Eric, this is a good solution for projects that are not
> accessed frequently for me (I only know some of the org search
> capabilities, I guess it is time to reread that section in the
> manual).
You're welcome! The wealth of functionality in org is sometimes
overwhelming and it's fun to go back and read the manual (and this list)
to find out how much can actually be done with it.
> At last, using the initial code provided by Bastien I was able to
> program something that gives me what I wanted. The code is provided
> below.
Glad you managed to concoct a solution to your particular needs. The
code looks good; I would only suggest one possible refinement that might
make it a little more general (depending on whether you have subprojects
within projects):
> #+begin_src emacs-lisp
[...]
> (setq heading (concat "* " projectName))
[...]
> (search-forward heading)
Maybe consider using the org regexp for headings (=org-outline-regexp=)
appended with your project name and then use =re-search-forward= to allow
you to find not just top level headings but also sub-headings?
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.304.g71203.dirty)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Easily go to some frequently accessed heading (narrowed to region)
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 10:28 ` Bastien
@ 2011-02-05 17:57 ` Bernt Hansen
2 siblings, 0 replies; 12+ messages in thread
From: Bernt Hansen @ 2011-02-05 17:57 UTC (permalink / raw)
To: Darlan Cavalcante Moreira; +Cc: Orgmode Mailing List
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
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2011-02-05 17:58 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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).