From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: capture with iceweasel/firefox -- nothing works Date: Sat, 04 Jun 2016 10:11:08 -0500 Message-ID: <87twh9rnub.fsf@fastmail.fm> References: <8760tphain.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9DET-0001jo-NW for emacs-orgmode@gnu.org; Sat, 04 Jun 2016 11:11:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9DEP-0007qZ-AG for emacs-orgmode@gnu.org; Sat, 04 Jun 2016 11:11:24 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:53253) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9DEM-0007qN-PZ for emacs-orgmode@gnu.org; Sat, 04 Jun 2016 11:11:21 -0400 In-Reply-To: (Samuel Wales's message of "Fri, 3 Jun 2016 22:13:52 -0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Samuel Wales Cc: emacs-orgmode@gnu.org Samuel Wales writes: > hi matt, > > thanks for your reply. > > On 6/3/16, Matt Lundin wrote: >> Here is the new style bookmark that works for me: >> >> javascript:location.href='org-protocol://capture?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)+'&body='+encodeURIComponent(window.getSelection()) >> >> >> I'd recommend copying and pasting the javascript line above into the >> location bar to confirm whether it works. If it does, you can then >> easily add it to your bookmarks. > > will try. this is supposed to imitate clicking on the unicorn or > calling the bookmark? This is the content of the bookmark. Pasting it into the location bar is just a quick way to test if everything is working prior to saving it permanently as a bookmark. But it might be easier to go straight to the bookmark step (see below). Do you mean clicking on the unicorn icon installed with this extension? https://addons.mozilla.org/en-US/firefox/addon/org-mode-capture/ If you have installed that extension, I think everything should just work with minimal configuration. The extension is distinct from the bookmark method. The difference is that a bookmark is a bit more universal. Once you get it set up the protocol system-wide, the bookmark should work in any browser. > however, i never found any good instructions on what to do to add js > to bookmarks. > i have a menu bar and a location bar + icons. i'd like a button or > icon on the latter if possible. my previous thrashing around caused a >>> symbol which is a drop down menu which contains the bookmarks. > i'll settle for that if nec. but that is extra clicking i'd rather > avoid, and one of them brings up a page with js on it. To save it as a bookmark in firefox, right click on the bookmark bar, select "New Bookmark," and paste it into the Location field. > do i try with selecting and without selecting? The bookmark should work with and without selections. > which capture key does it call? This can be controlled with the emacs variable `org-protocol-default-template-key'. You can also specify a template shortcut by changing the bookmark. For instance, to call a template designated by "x", you could use the following: javascript:location.href='org-protocol://capture?template=x&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)+'&body='+encodeURIComponent(window.getSelection()) Matt