Dear list, I would like to announce the first version of an extension to call org-capture through org-protocol from Firefox: - http://chadok.info/firefox-org-capture/ It just does the same thing as the Javascript bookmarklet but without the need to register the scheme org-protocol:// in Firefox/Gnome/KDE/XDG (or whatever we are supposed to do this week to manage handler for protocols). I hope this solution to be easier and more reliable, at least for Firefox users. It is not on https://addons.mozilla.org for now, but I will submit it for review in a few days. Olivier
Olivier Schwander <olivier.schwander@chadok.info> writes:
> Dear list,
>
> I would like to announce the first version of an extension to
> call org-capture through org-protocol from Firefox:
> - http://chadok.info/firefox-org-capture/
>
> It just does the same thing as the Javascript bookmarklet but without
> the need to register the scheme org-protocol:// in Firefox/Gnome/KDE/XDG
> (or whatever we are supposed to do this week to manage handler for
> protocols). I hope this solution to be easier and more reliable, at
> least for Firefox users.
So what do I do after installing it? I get a new button but nothing
happens when I click it. On this PC I'm using Fx27 and GNU Emacs
24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.7) and Org-mode
version 8.2.5h and i3-wm. I can test with Gnome when I get home.
–Rasmus
--
This is the kind of tedious nonsense up with which I will not put
Le 21 Feb 2014 16:43, Rasmus a écrit: > So what do I do after installing it? I get a new button but nothing > happens when I click it. Do you have emacs server and org-protocol enabled ? Something like this in your .emacs: (server-start) (require 'org-protocol) If not, you should add these two lines and maybe have a look on worg: http://orgmode.org/worg/org-contrib/org-protocol.html You can also test manually in a shell with: emacsclient org-protocol://capture://example.com/Example/ (It is exactly what does the add-on) Best, Olivier
[-- Attachment #1: Type: text/plain, Size: 1190 bytes --] wow Olivier thanks so much, ive been waiting for something like this for ages :), never managed to get the registering the protocol parts working. one thing though, is there a way to define which client it oepns? i have several emacs client opened at once and prefer the extension nowt to use a current one but pop up a new CLI emacsclient for quick adding which will go away after i finish capturing, is that possible? best and thx alot! Z thx alot! Z On Fri, Feb 21, 2014 at 6:41 PM, Olivier Schwander < olivier.schwander@chadok.info> wrote: > Le 21 Feb 2014 16:43, Rasmus a écrit: > > So what do I do after installing it? I get a new button but nothing > > happens when I click it. > > Do you have emacs server and org-protocol enabled ? Something like this > in your .emacs: > > (server-start) > (require 'org-protocol) > > If not, you should add these two lines and maybe have a look on worg: > http://orgmode.org/worg/org-contrib/org-protocol.html > > You can also test manually in a shell with: > > emacsclient org-protocol://capture://example.com/Example/ > > (It is exactly what does the add-on) > > Best, > > Olivier > > > [-- Attachment #2: Type: text/html, Size: 1850 bytes --]
Olivier Schwander <olivier.schwander@chadok.info> writes:
> Le 21 Feb 2014 16:43, Rasmus a écrit:
>> So what do I do after installing it? I get a new button but nothing
>> happens when I click it.
>
> Do you have emacs server and org-protocol enabled ? Something like this
> in your .emacs:
>
> (server-start)
> (require 'org-protocol)
>
> If not, you should add these two lines and maybe have a look on worg:
> http://orgmode.org/worg/org-contrib/org-protocol.html
>
> You can also test manually in a shell with:
>
> emacsclient org-protocol://capture://example.com/Example/
>
> (It is exactly what does the add-on)
>
My emacsclient is is /usr/local/bin - I changed that in the addon's
preferences panel.The command line invocation works fine for me -
the button in FF (26.0 fwiw) does not: nothing happens. I uninstalled
and reinstalled the addon a couple of times, restarted FF: no go.
Is there a way to debug the FF end of the equation?
Nick
[-- Attachment #1: Type: text/plain, Size: 1298 bytes --] I'm having the same issue as Nick: the command line invocation works, but the button in Firefox has no effect. I changed the emacs binary path to /usr/bin/aquamacs On Fri, Feb 21, 2014 at 12:48 PM, Nick Dokos <ndokos@gmail.com> wrote: > Olivier Schwander <olivier.schwander@chadok.info> writes: > > > Le 21 Feb 2014 16:43, Rasmus a écrit: > >> So what do I do after installing it? I get a new button but nothing > >> happens when I click it. > > > > Do you have emacs server and org-protocol enabled ? Something like this > > in your .emacs: > > > > (server-start) > > (require 'org-protocol) > > > > If not, you should add these two lines and maybe have a look on worg: > > http://orgmode.org/worg/org-contrib/org-protocol.html > > > > You can also test manually in a shell with: > > > > emacsclient org-protocol://capture://example.com/Example/ > > > > (It is exactly what does the add-on) > > > > My emacsclient is is /usr/local/bin - I changed that in the addon's > preferences panel.The command line invocation works fine for me - > the button in FF (26.0 fwiw) does not: nothing happens. I uninstalled > and reinstalled the addon a couple of times, restarted FF: no go. > Is there a way to debug the FF end of the equation? > > Nick > > > > > [-- Attachment #2: Type: text/html, Size: 2091 bytes --]
At Fri, 21 Feb 2014 18:34:17 -0500, Peter Salazar wrote: > > I'm having the same issue as Nick: the command line invocation works, but > the button in Firefox has no effect. I changed the emacs binary path to > /usr/bin/aquamacs I had to start emacsclient in a terminal, probably because my emacs was run with emacs --daemon ? I made a little wrapper script that runs emacsclient in a terminal. best, Erik -- Sent from my free software system <http://fsf.org/>.
Nick Dokos <ndokos@gmail.com> writes:
> Olivier Schwander <olivier.schwander@chadok.info> writes:
>
>> Le 21 Feb 2014 16:43, Rasmus a écrit:
>>> So what do I do after installing it? I get a new button but nothing
>>> happens when I click it.
>>
>> Do you have emacs server and org-protocol enabled ? Something like this
>> in your .emacs:
>>
>> (server-start)
>> (require 'org-protocol)
>>
>> If not, you should add these two lines and maybe have a look on worg:
>> http://orgmode.org/worg/org-contrib/org-protocol.html
>>
>> You can also test manually in a shell with:
>>
>> emacsclient org-protocol://capture://example.com/Example/
>>
>> (It is exactly what does the add-on)
>>
>
> My emacsclient is is /usr/local/bin - I changed that in the addon's
> preferences panel.The command line invocation works fine for me -
> the button in FF (26.0 fwiw) does not: nothing happens. I uninstalled
> and reinstalled the addon a couple of times, restarted FF: no go.
> Is there a way to debug the FF end of the equation?
>
I tried it with FF 27.0 and that seems to work. Thanks, Olivier!
Any possibility of a similar Chromium extension? :-)
--
Nick
Le 21 Feb 2014 18:34, Peter Salazar a écrit:
> I'm having the same issue as Nick: the command line invocation works, but
> the button in Firefox has no effect. I changed the emacs binary path to
> /usr/bin/aquamacs
Is /usr/bin/aquamacs also doing the job of emacsclient ? What is your
version of Firefox ? Nick manages to use the FF27 but not FF26.
Olivier
[-- Attachment #1: Type: text/plain, Size: 1058 bytes --] hya yeah i mean several windows sorry :) a check box or an option on the command line would be epic thx again! Z On Sat, Feb 22, 2014 at 2:58 PM, Olivier Schwander < olivier.schwander@chadok.info> wrote: > Le 21 Feb 2014 19:06, Xebar Saram a écrit: > > one thing though, is there a way to define which client it oepns? i have > > several emacs client opened at once and prefer the extension nowt to use > a > > current one but pop up a new CLI emacsclient for quick adding which will > go > > away after i finish capturing, is that possible? > > Several Emacs client open ? You mean several Emacs windows and you want > to open a new one, right ? Is calling emacsclient with the -c flag > enough for your need ? Or do you want the -nw flaf ? In that case, I > will need to launch something like "xterm -e 'emacsclient -nw ...'". > > I may add either a simple checkbox for creating a new window, or allow > to add option on the command line, or even give full control on the > command line which is called. > > Olivier > [-- Attachment #2: Type: text/html, Size: 1560 bytes --]
Le 21 Feb 2014 18:22, Erik Hetzner a écrit:
> I had to start emacsclient in a terminal, probably because my emacs
> was run with emacs --daemon ? I made a little wrapper script that runs
> emacsclient in a terminal.
Are you happy with the wrapper ? The other solution would be to give
full control on the command line launched, but I think I will be too
complex.
Olivier
At Sat, 22 Feb 2014 17:27:26 +0100, Olivier Schwander wrote: > > Le 21 Feb 2014 18:22, Erik Hetzner a écrit: > > I had to start emacsclient in a terminal, probably because my emacs > > was run with emacs --daemon ? I made a little wrapper script that runs > > emacsclient in a terminal. > > Are you happy with the wrapper ? The other solution would be to give > full control on the command line launched, but I think I will be too > complex. Hi Olivier, I did a little more debugging. I think the issue I had is that if the user starts emacs with `emacs --daemon` and has no current frame for that emacs, your extension will not work, because the behavior of emacsclient when no frame exists is to run in the terminal, and this doesn’t work from Firefox. Maybe the solution is to use the `-c` option to emacsclient by default to create a new frame? best, Erik -- Sent from my free software system <http://fsf.org/>.
Xebar Saram <zeltakc@gmail.com> writes:
> one thing though, is there a way to define which client it oepns? i have
> several emacs client opened at once and prefer the extension nowt to use
> a current one but pop up a new CLI emacsclient for quick adding which
> will go away after i finish capturing, is that possible?
I have a shell script bound to a key here to allow capture everywhere.
It's like this:
#+begin_src sh
/usr/local/bin/emacsclient -n -e '(make-orgcapture-frame)'
#+end_src
The function is as follows (I also include my capture settings, which
are relevant here):
#+BEGIN_SRC emacs-lisp
(setq org-capture-templates
(quote
(("t" "todo" entry (file "refile-orgx.org")
"* TODO %?\n %U")
("T" "todo with link" entry (file "refile-orgx.org")
"* TODO %?\n %U\n\n%a"))))
(define-key global-map "\C-cr" 'org-capture)
;; to be called from outside using
;; emacsclient -n -e '(make-orgcapture-frame)'
(defun make-orgcapture-frame ()
"Create a new frame and run org-capture."
(interactive)
(make-frame '((name . "remember") (width . 80) (height . 16)
(top . 400) (left . 300)
(font . "-*-Consolas-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1")
))
(select-frame-by-name "remember")
(delete-other-windows)
(flet ((switch-to-buffer-other-window (buf) (switch-to-buffer buf)))
(org-capture nil "t")))
;; delete the frame in that case
(add-hook 'org-capture-after-finalize-hook
(lambda ()
(when (equal
(cdr (assoc 'name (frame-parameters (selected-frame))))
"remember")
(delete-frame))))
#+END_SRC
Maybe you can adapt this for this firefox plugin.
Alan
Hi Olivier,
Olivier Schwander <olivier.schwander@chadok.info> writes:
> I would like to announce the first version of an extension to
> call org-capture through org-protocol from Firefox:
> - http://chadok.info/firefox-org-capture/
This is very neat, thanks a lot.
One question from a casual FF user: how can I bind the org-capture
functionality to a key? (I don't display the Add-on Toolbar.)
Thanks,
--
Bastien
Dear list, Following all the nice comments you made after my first announce, I just uploaded an updated version of the org-capture extension. You can find it on the main webpage http://chadok.info/firefox-org-capture/ or on the Mozilla addons repository https://addons.mozilla.org/fr/firefox/addon/org-mode-capture/ (review pending from Mozilla people). New features: - Hotkey (default: C-M-r) - New emacsclient window (using -c) Best, Olivier
> Following all the nice comments you made after my first announce, I just
> uploaded an updated version of the org-capture extension.
>
> You can find it on the main webpage
> http://chadok.info/firefox-org-capture/ or on the Mozilla addons
> repository https://addons.mozilla.org/fr/firefox/addon/org-mode-capture/
> (review pending from Mozilla people).
Hi Olivier,
Thanks for the great extension.
No more meddling with bookmarks and keyconfig for me:).
Oleh
Am Donnerstag, 10. April 2014, 11:02:52 schrieb Oleh: > > Following all the nice comments you made after my first announce, I just > > uploaded an updated version of the org-capture extension. > > > > You can find it on the main webpage > > http://chadok.info/firefox-org-capture/ or on the Mozilla addons > > repository https://addons.mozilla.org/fr/firefox/addon/org-mode-capture/ > > (review pending from Mozilla people). > > Hi Olivier, > > Thanks for the great extension. > No more meddling with bookmarks and keyconfig for me:). > > Oleh OK, but could somebody, who understood this add-on, explain its use? Olivier wrote some time ago: > It just does the same thing as the Javascript bookmarklet but without > the need to register the scheme org-protocol:// in Firefox/Gnome/KDE/XDG > (or whatever we are supposed to do this week to manage handler for > protocols). I hope this solution to be easier and more reliable, at > least for Firefox users. But this is all I could find and I still do not know, what it is good for?! Regards, Alexander
Le 10 Apr 2014 22:20, AW a écrit: > > It just does the same thing as the Javascript bookmarklet but without > > the need to register the scheme org-protocol:// in Firefox/Gnome/KDE/XDG > > (or whatever we are supposed to do this week to manage handler for > > protocols). I hope this solution to be easier and more reliable, at > > least for Firefox users. > > But this is all I could find and I still do not know, what it is good for?! Org-protocol is a system which allows to communicate with org-mode from outside, in particular, to call org-capture templates from a web browser. It usually works by registering a new handler for the scheme org-protocol:// and by generating url of the form org-protocol://template/data/foo/bar with a javascript bookmarklet. With Firefox, registering a scheme handler is (according to my experience and other people comments) painful and subject to random failures. The firefox addon avoids this pain and just works. You may also have a look on: - http://orgmode.org/worg/org-contrib/org-protocol.html - http://orgmode.org/manual/Capture.html Regards, Olivier
On 2014-02-21 15:06 Olivier Schwander wrote:
> Dear list,
>
> I would like to announce the first version of an extension to
> call org-capture through org-protocol from Firefox:
> - http://chadok.info/firefox-org-capture/
>
> It just does the same thing as the Javascript bookmarklet but without
> the need to register the scheme org-protocol:// in Firefox/Gnome/KDE/XDG
> (or whatever we are supposed to do this week to manage handler for
> protocols). I hope this solution to be easier and more reliable, at
> least for Firefox users.
>
> It is not on https://addons.mozilla.org for now, but I will submit it
> for review in a few days.
>
> Olivier
>
>
>
This sounds like a very useful thing, thank you!
I cannot, however, get this to work. I am not sure what to put into the
Template field on the preference page of the org-capture plugin. Can
anyone give me some advice here?
Regards,
--
Alexander Baier
Am Freitag, 21. Februar 2014, 15:06:11 schrieb Olivier Schwander:
> Dear list,
>
> I would like to announce the first version of an extension to
> call org-capture through org-protocol from Firefox:
> - http://chadok.info/firefox-org-capture/
>
> It just does the same thing as the Javascript bookmarklet but without
> the need to register the scheme org-protocol:// in Firefox/Gnome/KDE/XDG
> (or whatever we are supposed to do this week to manage handler for
> protocols). I hope this solution to be easier and more reliable, at
> least for Firefox users.
>
> It is not on https://addons.mozilla.org for now, but I will submit it
> for review in a few days.
>
> Olivier
Olivier,
would you mind to add an example what to do with your addon? "It just does the
same thing as the Javascript bookmarklet" implies that I know the purpose of
this or org-protocol. Unfortunately I have no idea and reading the
explanations of org-protocol does not help much.
So: What can your addon do for a user of firefox and orgmode?
Thank you!
Regards,
Alexander