* "Capture"-like browser plugin?
@ 2015-07-23 14:18 Peter Davis
2015-07-23 14:37 ` Jonathan Leech-Pepin
` (5 more replies)
0 siblings, 6 replies; 29+ messages in thread
From: Peter Davis @ 2015-07-23 14:18 UTC (permalink / raw)
To: emacs-orgmode
Frequently when I'm doing a Web search and find pages I like, I want to save a link to the page, along with the title and perhaps a
few notes. Something like org-mode's capture would be great, but I'd like to initiate it from a browser. I imaging hitting a plugin
button on the the browser's toolbar to open emacs via emacsclient, and essentially do a capture with the link and whatever text I
care to enter.
Has anyone seen or heard of or written something like this?
Thanks!
-pd
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-23 14:18 "Capture"-like browser plugin? Peter Davis
@ 2015-07-23 14:37 ` Jonathan Leech-Pepin
2015-07-23 14:39 ` Loris Bennett
` (4 subsequent siblings)
5 siblings, 0 replies; 29+ messages in thread
From: Jonathan Leech-Pepin @ 2015-07-23 14:37 UTC (permalink / raw)
To: Peter Davis; +Cc: Org Mode Mailing List
[-- Attachment #1: Type: text/plain, Size: 877 bytes --]
Hello Peter,
On 23 July 2015 at 10:18, Peter Davis <pfd@pfdstudio.com> wrote:
>
> Frequently when I'm doing a Web search and find pages I like, I want to
> save a link to the page, along with the title and perhaps a
> few notes. Something like org-mode's capture would be great, but I'd like
> to initiate it from a browser. I imaging hitting a plugin
> button on the the browser's toolbar to open emacs via emacsclient, and
> essentially do a capture with the link and whatever text I
> care to enter.
>
> Has anyone seen or heard of or written something like this?
>
You want to take a look at [[org-protocol][
http://orgmode.org/worg/org-contrib/org-protocol.html]]. It can do more or
less exactly
what you're describing (with even additional options/features depending on
how you configure the template and the browser-side options.
Regards,
Jon
> Thanks!
> -pd
>
>
[-- Attachment #2: Type: text/html, Size: 1530 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-23 14:18 "Capture"-like browser plugin? Peter Davis
2015-07-23 14:37 ` Jonathan Leech-Pepin
@ 2015-07-23 14:39 ` Loris Bennett
2015-07-23 14:44 ` Cook, Malcolm
` (3 subsequent siblings)
5 siblings, 0 replies; 29+ messages in thread
From: Loris Bennett @ 2015-07-23 14:39 UTC (permalink / raw)
To: emacs-orgmode
Peter Davis <pfd@pfdstudio.com> writes:
> Frequently when I'm doing a Web search and find pages I like, I want
> to save a link to the page, along with the title and perhaps a few
> notes. Something like org-mode's capture would be great, but I'd like
> to initiate it from a browser. I imaging hitting a plugin button on
> the the browser's toolbar to open emacs via emacsclient, and
> essentially do a capture with the link and whatever text I care to
> enter.
>
> Has anyone seen or heard of or written something like this?
>
> Thanks!
> -pd
>
You probably want to look at this:
http://orgmode.org/worg/org-contrib/org-protocol.html
I have capture set up for the Conkeror browser.
Cheers,
Loris
--
This signature is currently under construction.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-23 14:18 "Capture"-like browser plugin? Peter Davis
2015-07-23 14:37 ` Jonathan Leech-Pepin
2015-07-23 14:39 ` Loris Bennett
@ 2015-07-23 14:44 ` Cook, Malcolm
2015-07-23 14:47 ` Peter Davis
` (2 subsequent siblings)
5 siblings, 0 replies; 29+ messages in thread
From: Cook, Malcolm @ 2015-07-23 14:44 UTC (permalink / raw)
To: 'Peter Davis', emacs-orgmode@gnu.org
> Frequently when I'm doing a Web search and find pages I like, I want to save
> a link to the page, along with the title and perhaps a few notes. Something
> like org-mode's capture would be great, but I'd like to initiate it from a
> browser. I imaging hitting a plugin button on the the browser's toolbar to
> open emacs via emacsclient, and essentially do a capture with the link and
> whatever text I care to enter.
>
> Has anyone seen or heard of or written something like this?
Sure.
Depending on your web browser, there are plugins to populate the clipboard with a link formatted according to a template variously as plain text, markdown, html, media-wiki, or (with configuration) org-mode.
I use chrome and am happy with "Create Link" https://chrome.google.com/webstore/detail/create-link/gcmghdmnkfdbncmnmlkkglmnnhagajbm?hl=en-US
Firefox similarly has Make Link: https://addons.mozilla.org/en-US/firefox/addon/make-link/
~Malcolm
>
> Thanks!
> -pd
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-23 14:18 "Capture"-like browser plugin? Peter Davis
` (2 preceding siblings ...)
2015-07-23 14:44 ` Cook, Malcolm
@ 2015-07-23 14:47 ` Peter Davis
2015-07-23 14:47 ` Daniele Pizzolli
2015-07-29 19:48 ` Jay Dresser
5 siblings, 0 replies; 29+ messages in thread
From: Peter Davis @ 2015-07-23 14:47 UTC (permalink / raw)
To: emacs-orgmode
Wow! Thanks for the quick and helpful responses! I should have known this would be a solved problem.
Cheers!
-pd
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-23 14:18 "Capture"-like browser plugin? Peter Davis
` (3 preceding siblings ...)
2015-07-23 14:47 ` Peter Davis
@ 2015-07-23 14:47 ` Daniele Pizzolli
2015-07-24 7:22 ` Alan Schmitt
` (2 more replies)
2015-07-29 19:48 ` Jay Dresser
5 siblings, 3 replies; 29+ messages in thread
From: Daniele Pizzolli @ 2015-07-23 14:47 UTC (permalink / raw)
To: emacs-orgmode
On Thu, Jul 23 2015, Peter Davis wrote:
> Frequently when I'm doing a Web search and find pages I like, I want
> to save a link to the page, along with the title and perhaps a few
> notes. Something like org-mode's capture would be great, but I'd like
> to initiate it from a browser. I imaging hitting a plugin button on
> the the browser's toolbar to open emacs via emacsclient, and
> essentially do a capture with the link and whatever text I care to
> enter.
>
> Has anyone seen or heard of or written something like this?
Hello,
if you use firefox, see:
https://addons.mozilla.org/it/firefox/addon/org-mode-capture/
The latest version convert html links to org-links (disclaimer: it is my
little contribution).
You described what org-capure does so well that I am surprised you where
not able to find it!
Some weeks ago something similar for chrome was announced here in the
list. You may want to search into the archives.
Best,
Daniele
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-23 14:47 ` Daniele Pizzolli
@ 2015-07-24 7:22 ` Alan Schmitt
2015-07-28 18:58 ` Peter Davis
2015-09-17 20:58 ` Samuel Wales
2 siblings, 0 replies; 29+ messages in thread
From: Alan Schmitt @ 2015-07-24 7:22 UTC (permalink / raw)
To: Daniele Pizzolli; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1661 bytes --]
Hello Daniele,
On 2015-07-23 16:47, Daniele Pizzolli <dan@toel.it> writes:
> if you use firefox, see:
>
> https://addons.mozilla.org/it/firefox/addon/org-mode-capture/
>
> The latest version convert html links to org-links (disclaimer: it is my
> little contribution).
This is great! If I may suggest an addition to it: being able to specify
how one calls emacs. Indeed, my emacsclient is a symbolic link to the
real one, which may change as I update it, but the preference interface
of the addon only gives me the target of the symbolic link.
I have also a small issue with org-protocol: it creates a new frame
(which is great) but does not raise it, and it displays two windows: the
capture one and an unrelated one. I have some code to avoid this when
I call org-capture from my system:
#+begin_src emacs-lisp
(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 "c")))
#+end_src
but I don’t know how to integrate this with org-protocol. Is there a way
to change its call to org-capture without having to rewrite the
`org-protocol-do-capture' function?
Thanks!
Alan
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
Last week athmospheric CO₂ average (Updated July 19, 2015, Mauna Loa Obs.):
401.39 ppm
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-23 14:47 ` Daniele Pizzolli
2015-07-24 7:22 ` Alan Schmitt
@ 2015-07-28 18:58 ` Peter Davis
2015-07-28 21:20 ` Alan Schmitt
2015-07-29 13:03 ` Daniele Pizzolli
2015-09-17 20:58 ` Samuel Wales
2 siblings, 2 replies; 29+ messages in thread
From: Peter Davis @ 2015-07-28 18:58 UTC (permalink / raw)
To: Daniele Pizzolli; +Cc: emacs-orgmode
Daniele Pizzolli <dan@toel.it> writes:
> On Thu, Jul 23 2015, Peter Davis wrote:
>
>> Frequently when I'm doing a Web search and find pages I like, I want
>> to save a link to the page, along with the title and perhaps a few
>> notes. Something like org-mode's capture would be great, but I'd like
>> to initiate it from a browser. I imaging hitting a plugin button on
>> the the browser's toolbar to open emacs via emacsclient, and
>> essentially do a capture with the link and whatever text I care to
>> enter.
>
>>
>> Has anyone seen or heard of or written something like this?
>
> Hello,
> if you use firefox, see:
>
> https://addons.mozilla.org/it/firefox/addon/org-mode-capture/
>
Thank you, Daniele. I'm afraid I haven't been able to get this to work on a Mac. I have the Firefox add-in installed, and emacs
configured, but when I click the icon, nothing (seems to) happen(s).
Thanks,
-pd
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-28 18:58 ` Peter Davis
@ 2015-07-28 21:20 ` Alan Schmitt
2015-07-28 22:10 ` Bob Newell
2015-07-29 12:27 ` Peter Davis
2015-07-29 13:03 ` Daniele Pizzolli
1 sibling, 2 replies; 29+ messages in thread
From: Alan Schmitt @ 2015-07-28 21:20 UTC (permalink / raw)
To: Peter Davis; +Cc: Daniele Pizzolli, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 565 bytes --]
On 2015-07-28 11:58, Peter Davis <pfd@pfdstudio.com> writes:
>> if you use firefox, see:
>>
>> https://addons.mozilla.org/it/firefox/addon/org-mode-capture/
>>
>
> Thank you, Daniele. I'm afraid I haven't been able to get this to work on
> a Mac. I have the Firefox add-in installed, and emacs
> configured, but when I click the icon, nothing (seems to) happen(s).
Did you configure a capture template for it?
Alan
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
Last week athmospheric CO₂ average (Updated July 26, 2015, Mauna Loa Obs.):
401.25 ppm
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-28 21:20 ` Alan Schmitt
@ 2015-07-28 22:10 ` Bob Newell
2015-07-28 22:33 ` Ken Mankoff
2015-07-29 12:27 ` Peter Davis
1 sibling, 1 reply; 29+ messages in thread
From: Bob Newell @ 2015-07-28 22:10 UTC (permalink / raw)
To: emacs-orgmode
Aloha kakou,
I've had this work on Firefox (with Linux) when everything is properly
set up, but it won't and probably never will work on Chrome. Even on
Firefox it isn't really ideal. But as long as you have clipboard access
configured in your Emacs, it really isn't such a great slowdown to do
cutting and pasting--- with any browser, on any system.
Yes, ideally we would have a web-clipper (similar to Evernote).
--
Bob Newell
Honolulu, Hawai`i
* Sent via Ma Gnus 0.12-Emacs 24.3-Linux Mint 17 *
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-28 22:10 ` Bob Newell
@ 2015-07-28 22:33 ` Ken Mankoff
0 siblings, 0 replies; 29+ messages in thread
From: Ken Mankoff @ 2015-07-28 22:33 UTC (permalink / raw)
To: Bob Newell; +Cc: emacs-orgmode@gnu.org
The chrome version of this works on chrome. See announcement on this list about two weeks ago...
-k.
Please excuse brevity. Sent from pocket computer with tiny non-haptic feedback keyboard.
> On Jul 28, 2015, at 18:10, Bob Newell <bobnewell@bobnewell.net> wrote:
>
> Aloha kakou,
>
> I've had this work on Firefox (with Linux) when everything is properly
> set up, but it won't and probably never will work on Chrome. Even on
> Firefox it isn't really ideal. But as long as you have clipboard access
> configured in your Emacs, it really isn't such a great slowdown to do
> cutting and pasting--- with any browser, on any system.
>
> Yes, ideally we would have a web-clipper (similar to Evernote).
>
> --
> Bob Newell
> Honolulu, Hawai`i
> * Sent via Ma Gnus 0.12-Emacs 24.3-Linux Mint 17 *
>
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-28 21:20 ` Alan Schmitt
2015-07-28 22:10 ` Bob Newell
@ 2015-07-29 12:27 ` Peter Davis
1 sibling, 0 replies; 29+ messages in thread
From: Peter Davis @ 2015-07-29 12:27 UTC (permalink / raw)
To: Alan Schmitt; +Cc: Daniele Pizzolli, emacs-orgmode
Alan Schmitt <alan.schmitt@polytechnique.org> writes:
> On 2015-07-28 11:58, Peter Davis <pfd@pfdstudio.com> writes:
>
>>> if you use firefox, see:
>>>
>>> https://addons.mozilla.org/it/firefox/addon/org-mode-capture/
>>>
>>
>> Thank you, Daniele. I'm afraid I haven't been able to get this to work on
>> a Mac. I have the Firefox add-in installed, and emacs
>> configured, but when I click the icon, nothing (seems to) happen(s).
>
> Did you configure a capture template for it?
Yes, based on the info here: http://chadok.info/firefox-org-capture/
I added the "l" item to:
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "~/org/gtd.org" "Tasks")
"* TODO %?\n %i\n %a")
("j" "Journal" entry (file+datetree "~/org/journal.org" "Journal")
"* Topic: %^{Topic?}\n\n%?\n\nEntered on %U\n %i\n %a")
("l" "org-protocol" entry (file "~/org/links.org" "Links")
"* Link: %c\n%U\n%i\n" :immediate-finish)
("n" "Notes" entry (file+datetree "~/org/notes.org" "Notes")
"* Topic: %^{Topic?}\n\n%?\n\nEntered on %U\n %i\n %a")
("r" "Reference" entry (file+datetree "~/org/reference.org" "Reference")
"* Topic: %^{Topic?}\n\n%?\n\nEntered on %U\n %i\n %a")
("q" "Questions" entry (file+datetree "~/org/questions.org" "Questions")
"* %?\n\nEntered on %U\n %i\n %a")))
Thanks,
-pd
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-28 18:58 ` Peter Davis
2015-07-28 21:20 ` Alan Schmitt
@ 2015-07-29 13:03 ` Daniele Pizzolli
2015-07-29 13:18 ` Peter Davis
1 sibling, 1 reply; 29+ messages in thread
From: Daniele Pizzolli @ 2015-07-29 13:03 UTC (permalink / raw)
To: emacs-orgmode
On Tue, Jul 28 2015, Peter Davis wrote:
> Daniele Pizzolli writes:
>
>> On Thu, Jul 23 2015, Peter Davis wrote:
[]
>>
>> https://addons.mozilla.org/it/firefox/addon/org-mode-capture/
>>
>
> Thank you, Daniele. I'm afraid I haven't been able to get this to work on a Mac. I have the Firefox add-in installed, and emacs
> configured, but when I click the icon, nothing (seems to) happen(s).
Hello Peter,
I did most of the development months ago and I do not remember a lot.
By looking at the mozilla doc[1] you should be find some pointer on how
to enable logging/debugging for extensions.
The line where emacs is launched is at [2].
I do not know a lot of Mac, maybe you miss the emacsclient command or
PATH? Maybe the run() at [2] does not work on Mac?
A manual test would be to execute on a console something like:
emacsclient 'org-protocol://capture://https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2FAdd-ons%2FSDK%2FTools%2Fconsole%23Logging_Levels/console%20-%20Mozilla%20%7C%
20MDN/console'
If the latter does work the problem should be in the run() call.
Hope this helps,
Daniele
[1] https://developer.mozilla.org/en-US/Add-ons/Setting_up_extension_development_environment
[2] http://hub.darcs.net/oschwand/firefox-org-capture/browse/lib/main.js#156
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-29 13:03 ` Daniele Pizzolli
@ 2015-07-29 13:18 ` Peter Davis
2015-07-29 14:05 ` Alan Schmitt
0 siblings, 1 reply; 29+ messages in thread
From: Peter Davis @ 2015-07-29 13:18 UTC (permalink / raw)
To: Daniele Pizzolli; +Cc: emacs-orgmode
Daniele Pizzolli <dan@toel.it> writes:
> On Tue, Jul 28 2015, Peter Davis wrote:
>
>> Daniele Pizzolli writes:
>>
>
> A manual test would be to execute on a console something like:
>
> emacsclient 'org-protocol://capture://https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2FAdd-ons%2FSDK%2FTools%2Fconsole%23Logging_Levels/console%20-%20Mozilla%20%7C%
> 20MDN/console'
>
> If the latter does work the problem should be in the run() call.
Thank you, Daniele. I've tried the above command line, and I get:
emacsclient: can't find socket; have you started the server?
To start the server in Emacs, type "M-x server-start".
emacsclient: No socket or alternate editor. Please use:
--socket-name
--server-file (or environment variable EMACS_SERVER_FILE)
--alternate-editor (or environment variable ALTERNATE_EDITOR)
I have (server-start) at the top of my .emacs file, and I've restarted manually a few times, so I suspect emacsclient is failing
silently somehow and that's the problem. I'll try to troubleshoot that.
Thank you!
-pd
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-29 13:18 ` Peter Davis
@ 2015-07-29 14:05 ` Alan Schmitt
2015-07-29 14:17 ` Peter Davis
0 siblings, 1 reply; 29+ messages in thread
From: Alan Schmitt @ 2015-07-29 14:05 UTC (permalink / raw)
To: Peter Davis; +Cc: Daniele Pizzolli, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]
On 2015-07-29 06:18, Peter Davis <pfd@pfdstudio.com> writes:
> Thank you, Daniele. I've tried the above command line, and I get:
>
> emacsclient: can't find socket; have you started the server?
> To start the server in Emacs, type "M-x server-start".
> emacsclient: No socket or alternate editor. Please use:
>
> --socket-name
> --server-file (or environment variable EMACS_SERVER_FILE)
> --alternate-editor (or environment variable ALTERNATE_EDITOR)
>
> I have (server-start) at the top of my .emacs file, and I've restarted
> manually a few times, so I suspect emacsclient is failing
> silently somehow and that's the problem. I'll try to troubleshoot that.
You’re probably running the emacsclient that comes by default with OS X,
which is probably a different version from your emacs. Here I had to
change the path in the extension setting to use
“/usr/local/bin/emacsclient” instead of the system
“/usr/bin/emacsclient”.
Alan
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
Last week athmospheric CO₂ average (Updated July 26, 2015, Mauna Loa Obs.):
401.25 ppm
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-29 14:05 ` Alan Schmitt
@ 2015-07-29 14:17 ` Peter Davis
2015-07-29 14:59 ` Nick Dokos
0 siblings, 1 reply; 29+ messages in thread
From: Peter Davis @ 2015-07-29 14:17 UTC (permalink / raw)
To: Alan Schmitt; +Cc: Daniele Pizzolli, emacs-orgmode
Alan Schmitt <alan.schmitt@polytechnique.org> writes:
> On 2015-07-29 06:18, Peter Davis <pfd@pfdstudio.com> writes:
>
>> Thank you, Daniele. I've tried the above command line, and I get:
>>
>> emacsclient: can't find socket; have you started the server?
>> To start the server in Emacs, type "M-x server-start".
>> emacsclient: No socket or alternate editor. Please use:
>>
>> --socket-name
>> --server-file (or environment variable EMACS_SERVER_FILE)
>> --alternate-editor (or environment variable ALTERNATE_EDITOR)
>>
>> I have (server-start) at the top of my .emacs file, and I've restarted
>> manually a few times, so I suspect emacsclient is failing
>> silently somehow and that's the problem. I'll try to troubleshoot that.
>
> You’re probably running the emacsclient that comes by default with OS X,
> which is probably a different version from your emacs. Here I had to
> change the path in the extension setting to use
> “/usr/local/bin/emacsclient” instead of the system
> “/usr/bin/emacsclient”.
Ah! There's no /usr/local/bin/emacsclient, but on my Mac, I have
/Applications/Emacs.app/Contents/MacOS/bin-x86_64-10_5/emacsclient
When I set the extension to use that, I get a new frame with a buffer named Org-capture%20for%20Firefox, but there's nothing in it
and it doesn't seem to correspond to a file.
Progress.
Thank you!
-pd
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-29 14:17 ` Peter Davis
@ 2015-07-29 14:59 ` Nick Dokos
2015-07-29 15:51 ` Peter Davis
0 siblings, 1 reply; 29+ messages in thread
From: Nick Dokos @ 2015-07-29 14:59 UTC (permalink / raw)
To: emacs-orgmode
Peter Davis <pfd@pfdstudio.com> writes:
> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>
>> On 2015-07-29 06:18, Peter Davis <pfd@pfdstudio.com> writes:
>>
>>> Thank you, Daniele. I've tried the above command line, and I get:
>>>
>>> emacsclient: can't find socket; have you started the server?
>>> To start the server in Emacs, type "M-x server-start".
>>> emacsclient: No socket or alternate editor. Please use:
>>>
>>> --socket-name
>>> --server-file (or environment variable EMACS_SERVER_FILE)
>>> --alternate-editor (or environment variable ALTERNATE_EDITOR)
>>>
>>> I have (server-start) at the top of my .emacs file, and I've restarted
>>> manually a few times, so I suspect emacsclient is failing
>>> silently somehow and that's the problem. I'll try to troubleshoot that.
>>
>> You’re probably running the emacsclient that comes by default with OS X,
>> which is probably a different version from your emacs. Here I had to
>> change the path in the extension setting to use
>> “/usr/local/bin/emacsclient” instead of the system
>> “/usr/bin/emacsclient”.
>
> Ah! There's no /usr/local/bin/emacsclient, but on my Mac, I have
>
> /Applications/Emacs.app/Contents/MacOS/bin-x86_64-10_5/emacsclient
>
> When I set the extension to use that, I get a new frame with a buffer named Org-capture%20for%20Firefox, but there's nothing in it
> and it doesn't seem to correspond to a file.
>
> Progress.
>
You need to (require 'org-protocol) in your .emacs (or wherever).
And if you don't want the new frame, you can uncheck that it in the extension's preferences.
Nick
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-29 14:59 ` Nick Dokos
@ 2015-07-29 15:51 ` Peter Davis
2015-07-29 17:04 ` Peter Davis
0 siblings, 1 reply; 29+ messages in thread
From: Peter Davis @ 2015-07-29 15:51 UTC (permalink / raw)
To: Nick Dokos; +Cc: emacs-orgmode
Nick Dokos <ndokos@gmail.com> writes:
> Peter Davis <pfd@pfdstudio.com> writes:
>
>> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>>
>>> On 2015-07-29 06:18, Peter Davis <pfd@pfdstudio.com> writes:
>>>
>>>> Thank you, Daniele. I've tried the above command line, and I get:
>>>>
>>>> emacsclient: can't find socket; have you started the server?
>>>> To start the server in Emacs, type "M-x server-start".
>>>> emacsclient: No socket or alternate editor. Please use:
>>>>
>>>> --socket-name
>>>> --server-file (or environment variable EMACS_SERVER_FILE)
>>>> --alternate-editor (or environment variable ALTERNATE_EDITOR)
>>>>
>>>> I have (server-start) at the top of my .emacs file, and I've restarted
>>>> manually a few times, so I suspect emacsclient is failing
>>>> silently somehow and that's the problem. I'll try to troubleshoot that.
>>>
>>> You’re probably running the emacsclient that comes by default with OS X,
>>> which is probably a different version from your emacs. Here I had to
>>> change the path in the extension setting to use
>>> “/usr/local/bin/emacsclient” instead of the system
>>> “/usr/bin/emacsclient”.
>>
>> Ah! There's no /usr/local/bin/emacsclient, but on my Mac, I have
>>
>> /Applications/Emacs.app/Contents/MacOS/bin-x86_64-10_5/emacsclient
>>
>> When I set the extension to use that, I get a new frame with a buffer named Org-capture%20for%20Firefox, but there's nothing in it
>> and it doesn't seem to correspond to a file.
>>
>> Progress.
>>
>
> You need to (require 'org-protocol) in your .emacs (or wherever).
> And if you don't want the new frame, you can uncheck that it in the extension's preferences.
Excellent! That works. It prepends "CAPTURE-2-" to the filename I specified in the template, but otherwise seems to work
beautifully.
Now to look for the Chrome version.
Thanks, all!
-pd
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-29 15:51 ` Peter Davis
@ 2015-07-29 17:04 ` Peter Davis
2015-07-29 18:23 ` Nick Dokos
0 siblings, 1 reply; 29+ messages in thread
From: Peter Davis @ 2015-07-29 17:04 UTC (permalink / raw)
To: Nick Dokos; +Cc: emacs-orgmode
Peter Davis <pfd@pfdstudio.com> writes:
>
> Excellent! That works. It prepends "CAPTURE-2-" to the filename I specified in the template, but otherwise seems to work
> beautifully.
This is not working as expected. Each time I click the Org Capture button in Firefox, it opens a new buffer (CAPTURE-2-links.org,
CAPTURE-3-links.org, etc.). These buffers have no prior contents, only the current link I'm trying to capture. If I save the buffer,
it saves to links.org, the filename I specified, apparently appending to the file. Is that as expected?
> Now to look for the Chrome version.
I found a Chrome Org Capture extension, but no way to configure it for which emacsclient to use, which capture template, etc. Am I
missing something?
Thank you.
-pd
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-29 17:04 ` Peter Davis
@ 2015-07-29 18:23 ` Nick Dokos
2015-07-29 19:35 ` Peter Davis
0 siblings, 1 reply; 29+ messages in thread
From: Nick Dokos @ 2015-07-29 18:23 UTC (permalink / raw)
To: emacs-orgmode
Peter Davis <pfd@pfdstudio.com> writes:
> Peter Davis <pfd@pfdstudio.com> writes:
>
>>
>> Excellent! That works. It prepends "CAPTURE-2-" to the filename I specified in the template, but otherwise seems to work
>> beautifully.
>
> This is not working as expected. Each time I click the Org Capture button in Firefox, it opens a new buffer (CAPTURE-2-links.org,
> CAPTURE-3-links.org, etc.). These buffers have no prior contents, only the current link I'm trying to capture. If I save the buffer,
> it saves to links.org, the filename I specified, apparently appending to the file. Is that as expected?
>
What does your org-capture template look like? Did you try it explicitly
(i.e. not through the extension, just an ordinary capture)?
FWIW, it works fine for me.
>> Now to look for the Chrome version.
>
> I found a Chrome Org Capture extension, but no way to configure it for which emacsclient to use, which capture template, etc. Am I
> missing something?
>
Whatever you are missing, I'm missing too. In my case, it wants to call
xdg-open which basically calls the desktop environment's underlying
"open" (e.g. gnome-open, exo-open, etc.), so I think I need to configure
that underlying open properly. But I have no idea what happens on OSX.
Nick
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-29 18:23 ` Nick Dokos
@ 2015-07-29 19:35 ` Peter Davis
0 siblings, 0 replies; 29+ messages in thread
From: Peter Davis @ 2015-07-29 19:35 UTC (permalink / raw)
To: Nick Dokos; +Cc: emacs-orgmode
Nick Dokos <ndokos@gmail.com> writes:
> Peter Davis <pfd@pfdstudio.com> writes:
>
>> Peter Davis <pfd@pfdstudio.com> writes:
>>
>>>
>>> Excellent! That works. It prepends "CAPTURE-2-" to the filename I specified in the template, but otherwise seems to work
>>> beautifully.
>>
>> This is not working as expected. Each time I click the Org Capture button in Firefox, it opens a new buffer (CAPTURE-2-links.org,
>> CAPTURE-3-links.org, etc.). These buffers have no prior contents, only the current link I'm trying to capture. If I save the buffer,
>> it saves to links.org, the filename I specified, apparently appending to the file. Is that as expected?
>>
>
> What does your org-capture template look like? Did you try it explicitly
> (i.e. not through the extension, just an ordinary capture)?
>
> FWIW, it works fine for me.
The template is this:
("l" "org-protocol" entry (file "~/org/links.org" "Links")
"\n* Link: %c\n%U\n%i\n" :immediate-finish)
If I do a capture explicitly using this template, it also gives me the CAPTURE-N-... buffer.
>>> Now to look for the Chrome version.
>>
>> I found a Chrome Org Capture extension, but no way to configure it for which emacsclient to use, which capture template, etc. Am I
>> missing something?
>>
>
> Whatever you are missing, I'm missing too. In my case, it wants to call
> xdg-open which basically calls the desktop environment's underlying
> "open" (e.g. gnome-open, exo-open, etc.), so I think I need to configure
> that underlying open properly. But I have no idea what happens on OSX.
Thanks. The OS X instructions on the org-protocol page <http://orgmode.org/worg/org-contrib/org-protocol.html> seem to be tied to a
Mac app, EmacsClient.app, which is tied to Aquamacs, a Mac-ified version of Gnu emacs which is not the one I'm interested in
using. Also, I've tried installing EmacsClient.app per the instructions (i.e., download and unpack the ZIP, but the ZIP does not
unpack for me. If I unpack EmacsClient.zip, it gives me EmacsClient.zip.cpgz.
Thanks,
-pd
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-23 14:18 "Capture"-like browser plugin? Peter Davis
` (4 preceding siblings ...)
2015-07-23 14:47 ` Daniele Pizzolli
@ 2015-07-29 19:48 ` Jay Dresser
2015-07-30 11:15 ` Nick Dokos
5 siblings, 1 reply; 29+ messages in thread
From: Jay Dresser @ 2015-07-29 19:48 UTC (permalink / raw)
To: emacs-orgmode
Peter Davis <pfd <at> pfdstudio.com> writes:
> Frequently when I'm doing a Web search and find pages I like, I want to
save a link to the page, along with the
> title and perhaps a
> few notes. Something like org-mode's capture would be great, but I'd like
to initiate it from a browser. I
> imaging hitting a plugin
> button on the the browser's toolbar to open emacs via emacsclient, and
essentially do a capture with the
> link and whatever text I
> care to enter.
>
> Has anyone seen or heard of or written something like this?
>
> Thanks!
> -pd
Not sure that you need a plug-in or extension, I just use this bookmarklet:
javascript:location.href='org-
protocol://capture://x/'+encodeURIComponent(location.href)+'/'+encodeURIComp
onent(document.title)+'/'+encodeURIComponent(prompt('Tags?'))
It prompts for the tags, which I separate with ":" (to be org-like).
This works fine in Chromium and I would think Firefox too.
Then it calls this capture template:
("x" "Browser Capture to Incoming"
entry
(file+headline "~/Org/bookmarks.org" "Incoming")
"* %c :%i:"
:immediate-finish t)
This makes bookmarks of the form:
* [[url][title]] :tags:
but of course you can change that with the template.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-29 19:48 ` Jay Dresser
@ 2015-07-30 11:15 ` Nick Dokos
0 siblings, 0 replies; 29+ messages in thread
From: Nick Dokos @ 2015-07-30 11:15 UTC (permalink / raw)
To: emacs-orgmode
Jay Dresser <org-mode@jaydresser.us> writes:
> Peter Davis <pfd <at> pfdstudio.com> writes:
>> Frequently when I'm doing a Web search and find pages I like, I want to
> save a link to the page, along with the
>> title and perhaps a
>> few notes. Something like org-mode's capture would be great, but I'd like
> to initiate it from a browser. I
>> imaging hitting a plugin
>> button on the the browser's toolbar to open emacs via emacsclient, and
> essentially do a capture with the
>> link and whatever text I
>> care to enter.
>>
>> Has anyone seen or heard of or written something like this?
>>
>> Thanks!
>> -pd
>
> Not sure that you need a plug-in or extension, I just use this bookmarklet:
>
> javascript:location.href='org-
> protocol://capture://x/'+encodeURIComponent(location.href)+'/'+encodeURIComp
> onent(document.title)+'/'+encodeURIComponent(prompt('Tags?'))
>
> It prompts for the tags, which I separate with ":" (to be org-like).
> This works fine in Chromium and I would think Firefox too.
>
But you still need to register the protocol with the browser. And that
registration step has proven problematic in the past.
--
Nick
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-07-23 14:47 ` Daniele Pizzolli
2015-07-24 7:22 ` Alan Schmitt
2015-07-28 18:58 ` Peter Davis
@ 2015-09-17 20:58 ` Samuel Wales
2015-09-18 14:03 ` Daniele Pizzolli
2 siblings, 1 reply; 29+ messages in thread
From: Samuel Wales @ 2015-09-17 20:58 UTC (permalink / raw)
To: Daniele Pizzolli; +Cc: emacs-orgmode
On 7/23/15, Daniele Pizzolli <dan@toel.it> wrote:
> https://addons.mozilla.org/it/firefox/addon/org-mode-capture/
>
> The latest version convert html links to org-links (disclaimer: it is my
> little contribution).
this extension is wonderful. all you have to do is install it and
then do what you want with it in elisp. i use it with iceweasel
40.0.3 (rebranded firefox).
however, it (or org-protocol) is very flaky. it works half of the
time, but sometimes it will do nothing and say "No server buffers
remain to edit" and sometimes it will capture the link but not the
selection. it will also sometimes capture something else you copied,
which does not appear on the page whose link gets capture.
GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2) of
2015-01-11 on maritornes, modified by Debian
org 8.3
(progn
(add-to-list
'org-capture-templates
`("L"
"Protocol Link"
entry
(file+headline
,(concat org-directory "/executive--a.org")
"xyzzy-remember")
;; \nkill %c\nselect %x
;; %:initial is like %i in org-protocol
"* [[%:link][%:description]]\n%(alpha-org-protocol-region \"%i\")"
:prepend t
:immediate-finish t
;; ensure it worked
;; just remember to go to prev buffer for where you were
:jump-to-captured t))
nil)
(defun alpha-org-protocol-region (string)
(if (= 0 (length string))
""
(concat string " --")))
thanks.
samuel
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-09-17 20:58 ` Samuel Wales
@ 2015-09-18 14:03 ` Daniele Pizzolli
2015-09-18 21:25 ` Samuel Wales
0 siblings, 1 reply; 29+ messages in thread
From: Daniele Pizzolli @ 2015-09-18 14:03 UTC (permalink / raw)
To: emacs-orgmode
On Thu, Sep 17 2015, Samuel Wales wrote:
> On 7/23/15, Daniele Pizzolli wrote:
>> https://addons.mozilla.org/it/firefox/addon/org-mode-capture/
>>
>> The latest version convert html links to org-links (disclaimer: it is my
>> little contribution).
>
> this extension is wonderful. all you have to do is install it and
> then do what you want with it in elisp. i use it with iceweasel
> 40.0.3 (rebranded firefox).
Hello Samuel,
Nice to hear.
> however, it (or org-protocol) is very flaky. it works half of the
> time, but sometimes it will do nothing and say "No server buffers
> remain to edit"
So, not so wonderful.. I just found out how to reproduce this problem.
Open a page with two frames, for example:
http://www.quackit.com/html/templates/download/preview.cfm?template=../frames/css_frames/frames_2_column_left_menu.cfm
And pressing C-a (Select All) for the selection.
And then capture the page.
Please note that you can not select the text in both frames using the
mouse.
> and sometimes it will capture the link but not the
> selection.
Do you have an example page for this? Once we have a really simple
example page with the error we can report a bug!
> it will also sometimes capture something else you copied,
> which does not appear on the page whose link gets capture.
Yes, I saw a note in the code, the /problem/ is that firefox does not
clean the selection when you change tab. So you select something in tab
1, switch to tab 2 and you get the link and page title of page 2 and the
selection of tab 1. Maybe there are workaround, like force the cleaning
of the selection after a tab change, but this can impact the user
experience. I guess that usually you expect the selection to persist
until you paste it, even if you have changed tab, or not? Coping from
tab 1 and paste in tab 2 is not an exotic use case.
I think that the selection is global and not per tab. Maybe is possible
to add a selection per tab, by listening to some events.
Another limitation of the selection in firefox is that can not span over
frames and over 3rd party injection of content (not sure on how they do
this those days) but in a page with content and disqus.com you can not
select and capture both with the mouse. And if you use C-a you will bump
into the previous problem.
Hope you find this information useful,
Daniele
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-09-18 14:03 ` Daniele Pizzolli
@ 2015-09-18 21:25 ` Samuel Wales
2015-09-18 21:50 ` Samuel Wales
0 siblings, 1 reply; 29+ messages in thread
From: Samuel Wales @ 2015-09-18 21:25 UTC (permalink / raw)
To: Daniele Pizzolli; +Cc: emacs-orgmode
hi daniele,
On 9/18/15, Daniele Pizzolli <dan@toel.it> wrote:
> And pressing C-a (Select All) for the selection.
all of the bugs occur with mouse. i never use keyboard and
org-capture together.
>> and sometimes it will capture the link but not the
>> selection.
>
> Do you have an example page for this? Once we have a really simple
> example page with the error we can report a bug!
i will try to notice reproducible cases. please note that i do not
know whether it is an interaction with other extensions.
>> it will also sometimes capture something else you copied,
>> which does not appear on the page whose link gets capture.
>
> Yes, I saw a note in the code, the /problem/ is that firefox does not
> clean the selection when you change tab. So you select something in
would it be possible to put the selection and a tab dentifier in a
variable every time you switch tabs? then org-capture would compare?
maybe that makes no sense.
thanks for your reply.
samuel
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-09-18 21:25 ` Samuel Wales
@ 2015-09-18 21:50 ` Samuel Wales
2015-10-01 0:09 ` Peter Salazar
0 siblings, 1 reply; 29+ messages in thread
From: Samuel Wales @ 2015-09-18 21:50 UTC (permalink / raw)
To: Daniele Pizzolli; +Cc: emacs-orgmode
fwiw my x logs contain some lines like these:
Waiting for Emacs...
Waiting for Emacs...*ERROR*: Capture abort: (end-of-file)
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-09-18 21:50 ` Samuel Wales
@ 2015-10-01 0:09 ` Peter Salazar
2015-11-11 21:57 ` Samuel Wales
0 siblings, 1 reply; 29+ messages in thread
From: Peter Salazar @ 2015-10-01 0:09 UTC (permalink / raw)
To: Samuel Wales; +Cc: Daniele Pizzolli, org-mode
[-- Attachment #1: Type: text/plain, Size: 391 bytes --]
For those of you on OSX, there's also an Alfred workflow for org-capture:
https://github.com/jjasghar/alfred-org-capture
org-capture from within any app with one keystroke...
On Fri, Sep 18, 2015 at 5:50 PM, Samuel Wales <samologist@gmail.com> wrote:
> fwiw my x logs contain some lines like these:
>
> Waiting for Emacs...
> Waiting for Emacs...*ERROR*: Capture abort: (end-of-file)
>
>
[-- Attachment #2: Type: text/html, Size: 806 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: "Capture"-like browser plugin?
2015-10-01 0:09 ` Peter Salazar
@ 2015-11-11 21:57 ` Samuel Wales
0 siblings, 0 replies; 29+ messages in thread
From: Samuel Wales @ 2015-11-11 21:57 UTC (permalink / raw)
To: Peter Salazar; +Cc: Daniele Pizzolli, org-mode
the org capture extension seems to no longer put an icon on the
address bar in iceweasel 42.0, fwiw. of course, this could be due to
other extensions for all i know.
i wonder if doing it [the org protocol firefox stuff] manually would
be less sensitive to firefox version changes? anybody got foolproof
instructions?
On 9/30/15, Peter Salazar <cycleofsong@gmail.com> wrote:
> For those of you on OSX, there's also an Alfred workflow for org-capture:
> https://github.com/jjasghar/alfred-org-capture
>
> org-capture from within any app with one keystroke...
>
> On Fri, Sep 18, 2015 at 5:50 PM, Samuel Wales <samologist@gmail.com> wrote:
>
>> fwiw my x logs contain some lines like these:
>>
>> Waiting for Emacs...
>> Waiting for Emacs...*ERROR*: Capture abort: (end-of-file)
>>
>>
>
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
Ramsay's disease DOES progress. MANY people have died from it. And
ANYBODY can get it.
Denmark: free Karina Hansen NOW.
^ permalink raw reply [flat|nested] 29+ messages in thread
end of thread, other threads:[~2015-11-11 21:57 UTC | newest]
Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-23 14:18 "Capture"-like browser plugin? Peter Davis
2015-07-23 14:37 ` Jonathan Leech-Pepin
2015-07-23 14:39 ` Loris Bennett
2015-07-23 14:44 ` Cook, Malcolm
2015-07-23 14:47 ` Peter Davis
2015-07-23 14:47 ` Daniele Pizzolli
2015-07-24 7:22 ` Alan Schmitt
2015-07-28 18:58 ` Peter Davis
2015-07-28 21:20 ` Alan Schmitt
2015-07-28 22:10 ` Bob Newell
2015-07-28 22:33 ` Ken Mankoff
2015-07-29 12:27 ` Peter Davis
2015-07-29 13:03 ` Daniele Pizzolli
2015-07-29 13:18 ` Peter Davis
2015-07-29 14:05 ` Alan Schmitt
2015-07-29 14:17 ` Peter Davis
2015-07-29 14:59 ` Nick Dokos
2015-07-29 15:51 ` Peter Davis
2015-07-29 17:04 ` Peter Davis
2015-07-29 18:23 ` Nick Dokos
2015-07-29 19:35 ` Peter Davis
2015-09-17 20:58 ` Samuel Wales
2015-09-18 14:03 ` Daniele Pizzolli
2015-09-18 21:25 ` Samuel Wales
2015-09-18 21:50 ` Samuel Wales
2015-10-01 0:09 ` Peter Salazar
2015-11-11 21:57 ` Samuel Wales
2015-07-29 19:48 ` Jay Dresser
2015-07-30 11:15 ` Nick Dokos
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).