emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Can you automatically open a branch on load?
@ 2007-12-27 14:42 adr3nald0s
  2007-12-28 18:10 ` Eddward DeVilla
  0 siblings, 1 reply; 4+ messages in thread
From: adr3nald0s @ 2007-12-27 14:42 UTC (permalink / raw)
  To: emacs-orgmode


Is there an easy way to have a specific branch in your file open when
you load the file?

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

* Re: Can you automatically open a branch on load?
  2007-12-27 14:42 Can you automatically open a branch on load? adr3nald0s
@ 2007-12-28 18:10 ` Eddward DeVilla
  2007-12-28 20:12   ` Hugo Schmitt
  0 siblings, 1 reply; 4+ messages in thread
From: Eddward DeVilla @ 2007-12-28 18:10 UTC (permalink / raw)
  To: adr3nald0s; +Cc: emacs-orgmode

I'm sure that you could write a function that you could call from an
org-mode hook to do an occur or something like that.  Unfortunately, I
don't use org-occur much and the hook I think you need is in my .emacs
at work.  Given the right org-mode search function and the name of the
hook, I think it should be easy to do.  If someone doesn't beat me to
it, I'll try and get you a better answer when I return to work or when
I'm feel a little better and can do some digging.

Edd

On Dec 27, 2007 8:42 AM,  <adr3nald0s@gmail.com> wrote:
>
> Is there an easy way to have a specific branch in your file open when
> you load the file?
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: 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] 4+ messages in thread

* Re: Can you automatically open a branch on load?
  2007-12-28 18:10 ` Eddward DeVilla
@ 2007-12-28 20:12   ` Hugo Schmitt
  2007-12-28 20:26     ` Piotr Zielinski
  0 siblings, 1 reply; 4+ messages in thread
From: Hugo Schmitt @ 2007-12-28 20:12 UTC (permalink / raw)
  To: Eddward DeVilla; +Cc: emacs-orgmode

Hello.
Something like this already works fine for me:

(add-hook 'org-mode-hook 'my-open-some-branch)

(defun my-open-some-branch ()
 "Start org file with some particular branch opened."
 (org-overview)
 (save-excursion
   (search-forward "Finances")
   (org-show-entry)))

You can easily write a couple more lines so that the branch that will
be opened is configured on the top of the file itself.

HTH,

Hugo

On Dec 28, 2007 3:10 PM, Eddward DeVilla <eddward@gmail.com> wrote:
> I'm sure that you could write a function that you could call from an
> org-mode hook to do an occur or something like that.  Unfortunately, I
> don't use org-occur much and the hook I think you need is in my .emacs
> at work.  Given the right org-mode search function and the name of the
> hook, I think it should be easy to do.  If someone doesn't beat me to
> it, I'll try and get you a better answer when I return to work or when
> I'm feel a little better and can do some digging.
>
> Edd
>
>
> On Dec 27, 2007 8:42 AM,  <adr3nald0s@gmail.com> wrote:
> >
> > Is there an easy way to have a specific branch in your file open when
> > you load the file?
> >
> >
> > _______________________________________________
> > Emacs-orgmode mailing list
> > Remember: use `Reply All' to send replies to the list.
> > Emacs-orgmode@gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> >
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: 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] 4+ messages in thread

* Re: Can you automatically open a branch on load?
  2007-12-28 20:12   ` Hugo Schmitt
@ 2007-12-28 20:26     ` Piotr Zielinski
  0 siblings, 0 replies; 4+ messages in thread
From: Piotr Zielinski @ 2007-12-28 20:26 UTC (permalink / raw)
  To: Hugo Schmitt; +Cc: Eddward DeVilla, emacs-orgmode

On Dec 28, 2007 9:12 PM, Hugo Schmitt <hugows@gmail.com> wrote:
> You can easily write a couple more lines so that the branch that will
> be opened is configured on the top of the file itself.

Or you can put a call like '(my-open-some-branch "Finances")' directly
in the org file using the same emacs mechanism as for defining local
variables (don't remember the details).  This has the advantage of
easy per-file customization but on the other hand might be a security
risk.

Piotr

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

end of thread, other threads:[~2007-12-28 20:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-27 14:42 Can you automatically open a branch on load? adr3nald0s
2007-12-28 18:10 ` Eddward DeVilla
2007-12-28 20:12   ` Hugo Schmitt
2007-12-28 20:26     ` Piotr Zielinski

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