From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: Org-mode outside Org-mode Date: Thu, 11 Apr 2013 18:04:37 -0700 Message-ID: References: <87txoc7jvr.fsf@gmail.com> <874nfm9ylq.fsf@gmail.com> <87txnl486a.fsf@gmail.com> <87fvz3f8uh.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQSPv-0002M0-TM for emacs-orgmode@gnu.org; Thu, 11 Apr 2013 21:04:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQSPu-0007mR-Rj for emacs-orgmode@gnu.org; Thu, 11 Apr 2013 21:04:39 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:34600) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQSPu-0007mK-LE for emacs-orgmode@gnu.org; Thu, 11 Apr 2013 21:04:38 -0400 Received: by mail-wg0-f49.google.com with SMTP id x12so1023637wgg.4 for ; Thu, 11 Apr 2013 18:04:37 -0700 (PDT) In-Reply-To: <87fvz3f8uh.fsf@gmail.com> 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: Eric Schulte Cc: emacs-orgmode@gnu.org, Thorsten Jolitz On 4/6/13, Eric Schulte wrote: >>> The idea is to be in my-lisp.el, and do C-c ', and get to a canonical >>> entry in my-org.org, then do C-c ' again and get back to my-lisp.el. > That could be handy. For jumping back and for by function name, the > following simple implementation might be sufficient. It relies on file > local variables to know which src and Org-mode files are related to each > other. Interesting implementation, thanks for coding it. I was thinking about Org ID instead of local variables. In the Org file, you have an entry with an Org ID and a property with the source file location. In the source file, you have a marker in a comment like this: ;; $[id 12345] Where 12345 is an automatically-generated Org ID in the typical unique format. The job of C-c ' in the source file is to search for the nearest ID marker, then go to the entry that has that ID in the Org file. The job of C-c ' in the Org file is to get the Org ID, then search for the marker that contains it in the source file. Then the Org ID mechanism finds the Org file without requiring local variables. (Or, of course, for read-only files, a bookmark-like mechanism can be used to keep a database of search strings, indexed by the ID, to find the location. This means no need for Org ID in the source file and no need for local variables. But the ID method is more robust.) Samuel -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it. There is NO hope without action. This means YOU.