emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Darlan Cavalcante Moreira <darcamo@gmail.com>
Cc: "Dan Davison" <davison@stats.ox.ac.uk>,
	"Giles Chamberlin" <giles.chamberlin@tandberg.com>,
	"ébastien Vauban" <wxhgmqzgwmuf@spammotel.com>,
	emacs-orgmode@gnu.org
Subject: Re: Re: Limited #+INCLUDE ?
Date: Tue, 27 Apr 2010 09:12:49 -0600	[thread overview]
Message-ID: <87wrvtyln2.fsf@gmail.com> (raw)
In-Reply-To: <w2w45c323461004270325n9f9f6c3ck27268d3d2a575374@mail.gmail.com> (Darlan Cavalcante Moreira's message of "Tue, 27 Apr 2010 12:25:02 +0200")

Darlan Cavalcante Moreira <darcamo@gmail.com> 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
file.

(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 <ucecesf@ucl.ac.uk>:
>> On Mon, 26 Apr 2010 15:40:35 -0400, Dan Davison <davison@stats.ox.ac.uk> 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.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>

  reply	other threads:[~2010-04-27 15:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-23 11:25 Limited #+INCLUDE ? Giles Chamberlin
2010-04-26  8:32 ` Sébastien Vauban
2010-04-26 19:40   ` Dan Davison
2010-04-27  0:34     ` Mark Elston
2010-04-27  2:19       ` Dan Davison
2010-04-28  0:52         ` Mark Elston
2010-04-27  8:27     ` Eric S Fraga
2010-04-27 10:25       ` Darlan Cavalcante Moreira
2010-04-27 15:12         ` Eric Schulte [this message]
2010-04-27 17:26           ` Dan Davison
2010-04-27 17:58             ` Eric Schulte
2010-04-27 18:27             ` Giles Chamberlin
2010-04-27 17:52           ` Samuel Wales
2010-04-27 19:19             ` Dan Davison
2010-04-27 21:56               ` Carsten Dominik
2010-04-29 23:14               ` Samuel Wales

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wrvtyln2.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=darcamo@gmail.com \
    --cc=davison@stats.ox.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=giles.chamberlin@tandberg.com \
    --cc=wxhgmqzgwmuf@spammotel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).