I've got an idea to make it possible to have a "Send to TextMate" and "Edit in TextMate" in a browser window, the first being to send a text block to TextMate the second to send text and allow saving the changes back to the server. Trying to think of how best to make this possible. So far I've got three possibilities:
1. A browser plugin that takes control of a new MIME type and when a link is clicked the mime type is sent and the plugin saves the file to /tmp and then opens it with a helper application that takes over. Issue being the complexity of using a plugin and compatibility between browsers. Also that it takes changes on the server-side in reguards to MIME types.
2. A placeholder browser plugin that does nothing, but can be tested for. A protocol helper link is placed on the page by a script if the plugin is found. The helper application takes over when the link is clicked (like a mailto link).
3. Simply have a protocol link that's broken for non Textmate users.
Anyone else have any slick way they can think of handling this?
Possibility one has the advantage of being what mediawiki uses for this, and it could be supported pretty easily, on the flipside it's also the most complex option, and pretty invasive really. I'm sort of leaning toward #2 at the moment.
And of course just as I send this something Eridius said gave me an idea.
Course place a javascript file in a known place in the file system, then have the webpage load that file. If the load fails nothing would go wrong, the links would never appear. (Have the js file simply load those links)
On Mon, Oct 3, at 4:41 PM, Michael Sheets wrote:
I've got an idea to make it possible to have a "Send to TextMate" and "Edit in TextMate" in a browser window, the first being to send a text block to TextMate the second to send text and allow saving the changes back to the server. Trying to think of how best to make this possible. So far I've got three possibilities:
- A browser plugin that takes control of a new MIME type and when
a link is clicked the mime type is sent and the plugin saves the file to /tmp and then opens it with a helper application that takes over. Issue being the complexity of using a plugin and compatibility between browsers. Also that it takes changes on the server-side in reguards to MIME types.
If you are willing to mess with the server anyway, you might consider checking out webdav. That would allow you to mount (parts of) the server as a filesystem in Finder, though no support for file permissions.
Gerd
If you are willing to mess with the server anyway, you might consider checking out webdav. That would allow you to mount (parts of) the server as a filesystem in Finder, though no support for file permissions.
This is for a paste system I'm working on (like paste.lisp.org) so that would really work. Needs to be something simple and able to 'just work'.
On 10/3/05, Michael Sheets mummer@whitefalls.org wrote:
If you are willing to mess with the server anyway, you might consider checking out webdav. That would allow you to mount (parts of) the server as a filesystem in Finder, though no support for file permissions.
This is for a paste system I'm working on (like paste.lisp.org) so that would really work. Needs to be something simple and able to 'just work'.
Don't you just want to select the text in the textarea and then choose {Browsername} / Services / Edit in TextMate, then save and close to update the textarea?
Regards, -- Jason Bainbridge http://kde.org - webmaster@kde.org Personal Site - http://jasonbainbridge.com