From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Hugo Schmitt" Subject: Re: Can you automatically open a branch on load? Date: Fri, 28 Dec 2007 17:12:17 -0300 Message-ID: <2f1c7d020712281212o2ae39c68p2ee79a3968b8fe51@mail.gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J8LZ7-0002nA-10 for emacs-orgmode@gnu.org; Fri, 28 Dec 2007 15:12:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J8LZ5-0002mr-PB for emacs-orgmode@gnu.org; Fri, 28 Dec 2007 15:12:20 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J8LZ5-0002mo-Lb for emacs-orgmode@gnu.org; Fri, 28 Dec 2007 15:12:19 -0500 Received: from wa-out-1112.google.com ([209.85.146.176]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J8LZ5-0003hc-9t for emacs-orgmode@gnu.org; Fri, 28 Dec 2007 15:12:19 -0500 Received: by wa-out-1112.google.com with SMTP id k34so5704219wah.10 for ; Fri, 28 Dec 2007 12:12:17 -0800 (PST) In-Reply-To: Content-Disposition: inline List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eddward DeVilla Cc: emacs-orgmode@gnu.org 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 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, 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 >