From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: linking to region Date: Thu, 24 Sep 2009 16:44:27 -0400 Message-ID: <87hbushy38.fsf@gollum.intra.norang.ca> References: <87ocp0jl9m.fsf@cuma.i-did-not-set--mail-host-address--so-tickle-me> <87ljk4hzhy.fsf@gollum.intra.norang.ca> <87k4zojcwe.fsf@cuma.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqvB6-0006rG-C0 for emacs-orgmode@gnu.org; Thu, 24 Sep 2009 16:44:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqvB2-0006kR-4j for emacs-orgmode@gnu.org; Thu, 24 Sep 2009 16:44:35 -0400 Received: from [199.232.76.173] (port=36017 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqvB1-0006k8-V2 for emacs-orgmode@gnu.org; Thu, 24 Sep 2009 16:44:31 -0400 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:52392) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MqvB1-0000NZ-HB for emacs-orgmode@gnu.org; Thu, 24 Sep 2009 16:44:31 -0400 In-Reply-To: <87k4zojcwe.fsf@cuma.i-did-not-set--mail-host-address--so-tickle-me> (Maurizio Vitale's message of "Thu\, 24 Sep 2009 16\:39\:13 -0400") 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: maurizio.vitale@polymath-solutions.com Cc: emacs-orgmode@gnu.org Maurizio Vitale writes: >>>>>> "Bernt" == Bernt Hansen writes: > > >> Is it possible to grab a link to a region in a file in such a way > >> that C-c C-o visit the file after narrowing-to-region? > >> > >> The reason I'd like this is that I'm starting using org-mode for > >> requirement tracking and when referencing a standard I'd find > >> preferable to open only the relevant fragment rather than the > >> complete document. > > Bernt> I don't think that's currently possible without writing a > Bernt> little lisp code. There is an org-follow-link-hook but it > Bernt> doesn't seem to be executed for all link types - only browser > Bernt> urls if I'm reading the code correctly. > > But the region should be encoded in the link, as there no way to figure > out what is the extent of the interesting area automatically. Current links don't have region information - just a match to the first occurrence of text in the file. What would a region link look like and how would you generate one? > > Regarding org-follow-link-hook, I'm not familiar with org-mode code, >but it seems to me that is invoked for all URL types, but only after >the 'viewing' has happened. I may well be wrong. That didn't seem to be the case for my quick test of the hook. -Bernt PS. Please use reply-all when responding otherwise I might miss articles that are really addressed to me.