Textmate on the Mac can be bound to the txmt protocol, meaning that development frameworks (such as the Play Framework) can be configured to use this to display error messages. If a stacktrace appears, each line of the stacktrace is a URL of the format (I'm guessing):
txmt:///home/myuser/projects/myproject/ProblemFile.java:123
(where 123 is the line number).
Clicking this opens the file in Textmate.
Is this possible with Gedit, Geany or another programmer's text editor?
it's possible to easily create new protocol handlers in Gnome, all you have to do is add some keys in gconf.
In a terminal, type:
Replace foo on both lines with the protocol you want to register and /path/to/app with the path to the application you want to run. (from : http://kb.mozillazine.org/Register_protocol#All_Firefox_versions )
The accepted answer does not work on 11.04.
Here's my solution for gedit on 11.04: http://rystraum.com/blog/2012/05/rails-footnotes-with-gedit/
TLDR; version:
Create
/usr/share/applications/foo-uri.desktop
:Run
sudo update-desktop-database
open_gedit
script inside location that is in $PATHCall as foo:///path/to/file&line=299
My best shot using Python (probably misses some edge cases):
Will start opening
geany://home/www/index.php?239
as/home/www/index.php
at line239
using/tmp/geany
as socket (to avoid opening many instances of geany)