From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Easily go to some frequently accessed heading (narrowed to region) Date: Thu, 03 Feb 2011 12:37:20 +0000 Message-ID: <871v3pfg5b.fsf@ucl.ac.uk> References: <4d487c86.5043ec0a.55ad.ffffaf99@mx.google.com> <87y65y99m6.fsf@ucl.ac.uk> <4d4965fa.0431640a.66d2.664c@mx.google.com> <87k4hifn6w.fsf@ucl.ac.uk> <4d4a0e81.2945960a.1089.01aa@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=60114 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PkyRF-0008Md-9t for emacs-orgmode@gnu.org; Thu, 03 Feb 2011 07:37:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PkyRD-0005JE-Li for emacs-orgmode@gnu.org; Thu, 03 Feb 2011 07:37:29 -0500 Received: from vscane-b.ucl.ac.uk ([144.82.108.141]:46025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PkyRD-0005IY-HY for emacs-orgmode@gnu.org; Thu, 03 Feb 2011 07:37:27 -0500 In-Reply-To: <4d4a0e81.2945960a.1089.01aa@mx.google.com> (Darlan Cavalcante Moreira's message of "Wed, 02 Feb 2011 23:10:04 -0300") 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: Darlan Cavalcante Moreira Cc: Orgmode Mailing List Darlan Cavalcante Moreira 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)