From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Volpiatto Subject: Re: adding new protocol handler in firefox Date: Sat, 21 Nov 2009 23:39:08 +0100 Message-ID: <87ljhzy037.fsf@tux.homenetwork> References: <877htmsa34.fsf@tux.homenetwork> <87aayi5pa5.fsf@gmx.de> <87y6m246q6.fsf@gmx.de> <87ws1ketzc.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NByhu-0005yO-On for emacs-orgmode@gnu.org; Sat, 21 Nov 2009 17:45:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NByhq-0005uE-MF for emacs-orgmode@gnu.org; Sat, 21 Nov 2009 17:45:30 -0500 Received: from [199.232.76.173] (port=39819 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NByhq-0005te-9r for emacs-orgmode@gnu.org; Sat, 21 Nov 2009 17:45:26 -0500 Received: from lo.gmane.org ([80.91.229.12]:41116) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NByhp-0007R9-Jr for emacs-orgmode@gnu.org; Sat, 21 Nov 2009 17:45:26 -0500 Received: from list by lo.gmane.org with local (Exim 4.50) id 1NByho-0003MD-AY for emacs-orgmode@gnu.org; Sat, 21 Nov 2009 23:45:24 +0100 Received: from 23.77.197-77.rev.gaoland.net ([77.197.77.23]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 21 Nov 2009 23:45:24 +0100 Received: from thierry.volpiatto by 23.77.197-77.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 21 Nov 2009 23:45:24 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Sebastian Rose writes: > Robin Green writes: >> At Thu, 19 Nov 2009 21:09:21 +0100, >> Sebastian Rose wrote: >>> Well, anyway, editing RDF files by hand is not the way to go. >> >> Indeed. This was the method that worked for me (thanks to "goncheff" >> for discovering it): >> >> 1. In about:config, create a boolean key >> "network.protocol-handler.expose.org-protocol" and set it to False >> 2. Create a simple web page containing a link to the URL org-protocol://test >> 3. Open the web page you just created >> 4. Click on the link >> 5. Choose emacsclient as the associated application in the dialog box >> that appears >> >> and no other method worked (although I didn't know about the "edit the RDF >> file" method). > > > I guess you use a HG version of FF? Or 3.6? > > Please, detailed information is necessary. Browser brand and version, > operating system, version, Org-mode version. Just saying "It did just > work like that" does not help - neither you nor us. > > You know, it's quite a bit of work to verify the installations. I have > to remove the handlers, and add them again. I wanted to this, but it's > not possible in FF 3.5 on Ubuntu without research, which I will postpone > now in favor of finding a general solution. > > Since there were no complaints about the installation procedure on worg, > I guess that it still is up to date for FF up to 3.5. At least it worked > for me on Debian testing and Ubuntu, with different FF versions up to > 3.5. > > > >> It isn't, of course, necessary to create a web page - you can use an >> existing one with such a link - but it *is* necessary to click on a >> link in a web page - selecting a bookmarklet no longer works in the >> latest Firefox release, at least on Ubuntu 9.10 and on Mac OS X, and >> probably elsewhere too. > > Is it? > Well, there are two links for testing on worg: > http://orgmode.org/worg/org-contrib/org-protocol.php#test-org-protocol > > Could be more prominent I guess.... > > >> -- cut here -- >> >> I guess I should create a patch to worg to include the above >> instructions for newer versions of Firefox. Unless people think the >> RDF editing method is better? > >>> Instead, we should link to descriptions on how install the handlers >>> system wide. >> >> Nice idea, but unfortunately on Linux (as far as I know) there is no >> standard way to do that. > > As for Mime types, > http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec?action=show&redirect=Standards%2Fshared-mime-info-spec > states: > > The specification is now quite stable and not expected to change in > incompatible ways. Integration with icon themes has not been > finalized (and is not currently part of the specification). > > * ROX has used the system since ROX-Filer 1.3.3 (July 2002). > * GTK has support since version 2.4 (Mar 2004). > * GNOME uses the system since version 2.8 (Sep 2004). > * XFCE uses the system since version 4.2.0 (Jan 2005). > * KDE uses the system since version 4.0 (Jan 2007). > * LXDE has used the system since the initial release of PCManFM (2005). > * EDE uses the system since version 2.0-alpha (Apr 2009, but implemented in May 2007). > > > Sounds general and standard enough. Hackers will help themselves (and > hopefully publish the solution on this list or worg). > > Applications since years install themselves as handlers for certain Mime > types (e.g. the annoying Adobe products - sorry, product. They did not > manage to port more than the "Reader" to Linux yet). Something like this > should be possible for protocols, too. > > What we need here is a general solution. The general solution, the > Mozilla people are willing to go, obviously. And I guess the solution > can be found at the X Desktop Group, e.g. on freedesktop.org, or simply > by asking the Mozilla guys. Not sure yet how Mime relates to protocols, > but I'm sure we will find a solution that works for 99% of GNU/Linux > users. I agree that the solution come from the mozilla side. Waiting a change in firefox, i start writing code to add protocol handler from emacs. It work fine here now. I need to write the uninstaller also. Have a look at: http://mercurial.intuxication.org/hg/emacs-bookmark-extension It install protocol if it not already exists or modify it as needed if it exists. To test it, save your ~/.mozilla somewhere. (Re)Start firefox to recreate a new directory. Stop it. Now launch: M-x firefox-protocol-installer-install Add the protocol name (e.g org-protocol) and the path of file linked to protocol. Start firefox, your protocol should be now in preferences-->applications > > > Sebastian > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- A + Thierry Volpiatto Location: Saint-Cyr-Sur-Mer - France