[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: Limited #+INCLUDE ?

From: Eric Schulte
Subject: Re: [Orgmode] Re: Limited #+INCLUDE ?
Date: Tue, 27 Apr 2010 09:12:49 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Darlan Cavalcante Moreira <address@hidden> writes:

> This functionality would be really useful. Since it is more directly
> applicable for programming, then maybe an easier approach to implement it
> would be just a link to a function in a file. For instance
> [[file_def:/path/to/file::definition_name][linkname]]
> Org could rely on the capability of the target major-mode to select the
> region enclosing the function (c-mark-function for C/C++,
> py-mark-def-or-class for python, mark-defun for lisp, etc.). This would
> avoid the necessity of including commenting marks in the code and although
> it would be limited to a "function body at a time" it would be enough in
> many situations.

Following in this "major mode specific behavior" direction, maybe it
would be possible to make use of the tags functionality for linking to
specific functions, chapters, etc... based on the mode of the target

(info "(emacs)Tags") ;; how great is it that gnus resolves these links 

Tags would allow for robust links to points in changing files without
the need to place text anchors into the files themselves.  The immediate
downside is that tags rely on a TAGS table to resolve links.  This table
can easily be ignored from version control (for collaboration).  Then
Org-mode could use the `find-tag' function to resolve it's links, maybe
in combination with the function delimiting features Darlan mentioned
above to references entire function/object ranges.

-- Eric

> Darlan
> 2010/4/27 Eric S Fraga <address@hidden>:
>> On Mon, 26 Apr 2010 15:40:35 -0400, Dan Davison <address@hidden> wrote:
>>> I'm considering investigating the following and would appreciate
>>> comments on this idea. The aim is to make it easier to use Org-mode to
>>> work pure code files which are *external to Org-mode* (i.e. this
>>> proposal lies outside of the current org-babel tangling framework).
>>> - Extend Org file links to allow links to a range of lines in a
>>>   file. The syntax could be
>>>   [[file:/path/to/file::from::to][linkname]]
>> +1
>> I like this idea, especially for exporting complex documents.  If
>> org-store-link were enhanced to generate links with this line
>> information, I would probably use this a lot.
>>> - These links will bring up a buffer visiting the target file, narrowed
>>>   to the target region.
>> Or could be brought up with a wide view but with the region selected?
>>> - 'from' and 'to' could be line numbers, or regexps for text search.
>> The latter could be quite appealing, although possibly a little
>> fragile.
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

reply via email to

[Prev in Thread] Current Thread [Next in Thread]