From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Links to C/C++ source code lines Date: Fri, 21 Oct 2011 19:32:27 +0200 Message-ID: <87sjmmmes4.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:42203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHIwV-0005pm-PN for emacs-orgmode@gnu.org; Fri, 21 Oct 2011 13:31:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHIwS-0005SX-SY for emacs-orgmode@gnu.org; Fri, 21 Oct 2011 13:31:39 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:62342) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHIwS-0005RY-FL for emacs-orgmode@gnu.org; Fri, 21 Oct 2011 13:31:36 -0400 Received: by wwf27 with SMTP id 27so717249wwf.30 for ; Fri, 21 Oct 2011 10:31:35 -0700 (PDT) In-Reply-To: (Rafal's message of "Thu, 13 Oct 2011 15:44:18 +0000 (UTC)") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rafal Cc: emacs-orgmode@gnu.org Hi Rafal, Rafal writes: > I wrote a small hook for creating org-mode links to C/C++ source code lines in > the form of a regexp so the links stay valid even if the source code changes > > eg. > a source line > while(ptr < ptr_end) > has a link > file:/home/user/src/example.cpp::/while[ \t]*([ \t]*ptr[ \t]*<[ \t]*ptr_end[ \t] > *)#1/ > > The number after the hash is a sequence number in case there are more than one > such line > > If you are interested: http://rafflo.w.interia.pl/org-c-link.el Looks nice, thanks. Just wondering: are you aware of the "A.3 Adding hyperlink types" section in the manual? You core uses advice instead of the `org-add-link-type' function -- is that on purpose? Thanks! -- Bastien