From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-protocol firefox keybinding Date: Sun, 18 Oct 2009 08:37:44 +0200 Message-ID: <04DB7F17-7AC4-4DB3-AD16-10D8CF4DC833@gmail.com> References: <20091017202817.GG72276@yog-sothoth.mohorovi.cc> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MzPOr-00021G-QI for emacs-orgmode@gnu.org; Sun, 18 Oct 2009 02:37:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MzPOn-0001xI-CV for emacs-orgmode@gnu.org; Sun, 18 Oct 2009 02:37:53 -0400 Received: from [199.232.76.173] (port=51829 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzPOn-0001xB-6X for emacs-orgmode@gnu.org; Sun, 18 Oct 2009 02:37:49 -0400 Received: from mail-ew0-f228.google.com ([209.85.219.228]:57313) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MzPOm-0006Iu-Go for emacs-orgmode@gnu.org; Sun, 18 Oct 2009 02:37:48 -0400 Received: by ewy28 with SMTP id 28so3347835ewy.42 for ; Sat, 17 Oct 2009 23:37:46 -0700 (PDT) In-Reply-To: <20091017202817.GG72276@yog-sothoth.mohorovi.cc> 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: James TD Smith Cc: emacs-orgmode@gnu.org On Oct 17, 2009, at 10:28 PM, James TD Smith wrote: > I was cleaning out my Firefox tabs, using org-protocol to drop links > into my org > buffers, when it occured to me that having keybindings for the store > link and > remember functions would be quicker than clicking on the > bookmarklets. I use a > Firefox plugin called keyconfig which lets you change the > keybindings and add > new ones, so after a bit of Javascript hacking I managed to get some > keybindings > working. Here's how to do it: > > Install keyconfig from http://mozilla.dorando.at/keyconfig.xpi. > > Open the keyconfig dialog by going to Tools and then Keyconfig. > > Click the 'Add a new Key' button. Enter "Org store link" as the name. > Enter the following in the box with /* CODE */ in it: > > --8<---------------cut here---------------start------------->8--- > var orgProtoString = 'org-protocol://store-link://'+ > encodeURIComponent(gBrowser.currentURI.spec) + '/' + > encodeURIComponent(gBrowser.contentWindow.title) + '/' + > encodeURIComponent(window.getSelection()); > > gBrowser.loadURI(orgProtoString); > --8<---------------cut here---------------end--------------->8--- > > Click OK. You will then need to bind a key by clicking in the box > next to the > 'Apply' button and pressing whatever key combination you want. Click > 'Apply' to > store the keybinding. > > Repeat the steps, but call the next key "Org remember" and use the > code below: > > --8<---------------cut here---------------start------------->8--- > var orgProtoString = 'org-protocol://remember://'+ > encodeURIComponent(gBrowser.currentURI.spec) + '/' + > encodeURIComponent(gBrowser.contentWindow.title) + '/' + > encodeURIComponent(window.getSelection()); > > gBrowser.loadURI(orgProtoString); > --8<---------------cut here---------------end--------------->8--- > > Click Close, then OK, and then restart Firefox. You should then be > able to > access the org-protocol functions with your chosen keys. > > I've added a section to the Worg page for org-protocol with the > instructions. Thanks! - Carsten > > James > > -- > |---| > > > _______________________________________________ > 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 - Carsten