My personal patches-in-progress branch of Org. See https://git.tecosaur.net/mirrors/org-mode/compare/main..tec/org-mode:dev.
Go to file
Carsten Dominik 75563bf71e Allow regexps in org-file-apps to capture link parameters using groups
Patch by Jan Böker.

Jan writes:

> What is this?
> =============
>
> This patch changes the way extension regexps in `org-file-apps' are
> handled. Instead of against the file name, the regexps are now matched
> against the whole link, and you can use grouping to extract link
> parameters which you can then use in a command string to be executed.
>
> For example, to allow linking to PDF files using the syntax
> file:/doc.pdf::<page number>, you can add the following entry to
> org-file-apps:
>
> Extension: \.pdf::\([0-9]+\)\'
> Command:   evince "%s" -p %1
>
> In a command string to be executed, the parameters can be referenced
> using %1, %2, etc.  Lisp forms can access them using (string-match n link).
>
>
> Where to get it?
> ================
> Either apply the patch by hand or
>
> git pull git://github.com/jboecker/org-mode.git org-file-apps-parameters
>
>
> What's next? / Feedback
> =======================
>
> - Find the bugs. Since this messes with links, a central concept of Org,
> I probably have missed some edge cases; so please test this and
> report if it works for you.
>
> I also appreciate any feedback on code quality or the design decisions
> made. I am learning elisp along the way, so you may be able to write
> some changes in a more idiomatic and/or elegant way.
>
> - Add a mechanism for org-mode modules to add default values to
> org-file-apps, similar to the variables org-file-apps-defaults-*.
> This could be used by modules to define their own extensions to the
> syntax of file: links.
>
> - Modify org-docview.el to use this and deprecate the docview: link syntax.
>
>
> What does it (intentionally) break?
> ===================================
>
> This patch introduces a backwards-incompatible change. If LINE or SEARCH
> is given, the file is no longer guaranteed to open in emacs: if IN-EMACS
> is nil and an entry in org-file-apps matches, that takes precedence.
>
> A grep of the lisp/ and contrib/ directories showed that no code in the
> org-mode distribution was relying on this behaviour; whereever LINE or
> SEARCH is given, IN-EMACS is also set to t.
>
> I decided against adding an additional parameter because that would be
> redundant; the original link as seen by org-open-at-point can be
> reconstructed from PATH, LINE and SEARCH.
>
> I am not that sure if this is the right way to do this, but it seems to
> break as little as possible while hopefully avoiding to add too much
> complexity.
2010-03-21 18:10:00 +01:00
BUGFIXING Intermediate state, I am just trying comiting now. 2008-01-31 16:04:26 +01:00
EXPERIMENTAL Removed some old, no longer needed files. 2008-12-16 14:08:30 +01:00
ORGWEBPAGE Add a powerpoint version of the MPI talk 2010-03-08 08:03:37 +01:00
UTILITIES Add an X11 equivalent to org-mac-idle-seconds. 2009-10-22 15:09:34 +02:00
contrib babel: Ensure that inline code blocks produce string output on export 2010-03-19 10:08:16 -04:00
doc HTML export: Fix linking to targets in external files 2010-03-19 18:04:23 +01:00
lisp Allow regexps in org-file-apps to capture link parameters using groups 2010-03-21 18:10:00 +01:00
xemacs Minor patch from Greg Chernov for xemacs/noutline. 2008-04-19 19:07:40 +02:00
.dir-settings.el Add .dir-settings.el file to unify coding styles. 2008-11-20 15:45:22 +01:00
.gitignore Add an X11 equivalent to org-mac-idle-seconds. 2009-10-22 15:09:34 +02:00
ChangeLog Change refcard processing to pdftex, using pdflayout.sty 2010-03-05 08:28:01 +01:00
Makefile Change refcard processing to pdftex, using pdflayout.sty 2010-03-05 08:28:01 +01:00
README Test. 2010-01-25 18:05:17 +01:00
README_DIST Version number to 6.34trans 2010-01-20 10:13:21 +01:00
README_GIT Fix typos. 2008-10-24 22:50:36 +02:00
request-assign-future.txt Release 5.13e 2008-01-31 11:37:24 +01:00

README

This is the Emacs Org project, an emacs subsystem for organizing your life

The homepage of Org is at http://orgmode.org

This distribution contains:

README
    This file.

README_DIST
    The README file for the distribution (zip and tar files)

README_GIT
    Information about the git repository and how to contribute
    to Org-mode development. 

lisp/
    Directory with all the Emacs Lisp files that make up Org.

doc/
    The documentation files.  org.texi is the source of the
    documentation, org.html and org.pdf are formatted versions of it.

xemacs/
    The xemacs directory contains special code for XEmacs users, in
    particular a port of the GNU Emacs outline.el to XEmacs.  Org-mode
    does not work under XEmacs without this file installed.  It did
    until version 4.37, but no longer.

contrib/
    A directory with third-party additions for Org.  Some really cool
    stuff is in there.

ORGWEBPAGE/
    Directory with the source files for the orgmode.org web page.
    
ChangeLog
    The standard ChangeLog file.

Makefile
    The makefile to compile and install Org, and also for maintenance
    tasks.

request-assign-future.txt
    The form that contributors have to sign and get processed with the
    FSF before contributed changes can be integrated into the Org
    core.  All files in this distribution except the CONTRIB directory
    have copyright assigned to the FSF.

EXPERIMENTAL
    Experimental code, not necessarily FSF copyright.