From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konstantin Kliakhandler Subject: New Chrome Extension Date: Tue, 7 Jul 2015 18:44:31 +0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c3b55c238387051a4ae7ad Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50736) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCV3K-0003QH-FR for emacs-orgmode@gnu.org; Tue, 07 Jul 2015 11:44:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCV3F-0000OC-UF for emacs-orgmode@gnu.org; Tue, 07 Jul 2015 11:44:58 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:36149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCV3F-0000KN-Oo for emacs-orgmode@gnu.org; Tue, 07 Jul 2015 11:44:53 -0400 Received: by widjy10 with SMTP id jy10so192695755wid.1 for ; Tue, 07 Jul 2015 08:44:51 -0700 (PDT) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --001a11c3b55c238387051a4ae7ad Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello everyone, I wrote up a small chrome extension for org-protocol. Comments, improvements and positive criticism are all welcome. The code is available at https://github.com/sprig/org-capture-extension The extension can be installed from https://chrome.google.com/webstore/detail/org-capture/kkkjlfejijcjgjllecmne= jhogpbcigdc Enjoy, Kosta --=20 Konstantin Kliakhandler http://slumpy.org )=C2=B0) )=C2=B0( (=C2=B0( --001a11c3b55c238387051a4ae7ad Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello everyone,

I wrote up a small chro= me extension for org-protocol. Comments, improvements and positive criticis= m are all welcome.=C2=A0

The code is available at= =C2=A0https://gi= thub.com/sprig/org-capture-extension

Enjoy,
Kosta

--=C2=A0
Konstantin Kliakhandler
=C2= =A0 =C2=A0 http://slumpy.or= g
=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0=C2=A0 )=C2=B0) )=C2=B0( (=C2=B0(=
--001a11c3b55c238387051a4ae7ad-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: New Chrome Extension Date: Tue, 07 Jul 2015 12:16:35 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCVY3-0007nA-SG for emacs-orgmode@gnu.org; Tue, 07 Jul 2015 12:16:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCVXz-0005DT-On for emacs-orgmode@gnu.org; Tue, 07 Jul 2015 12:16:43 -0400 Received: from mail-qg0-x22b.google.com ([2607:f8b0:400d:c04::22b]:34862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCVXz-0005Cv-8u for emacs-orgmode@gnu.org; Tue, 07 Jul 2015 12:16:39 -0400 Received: by qget71 with SMTP id t71so86609760qge.2 for ; Tue, 07 Jul 2015 09:16:37 -0700 (PDT) In-reply-to: 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Konstantin Kliakhandler Cc: emacs-orgmode@gnu.org Hi Konstantin, On 2015-07-07 at 11:44, Konstantin Kliakhandler wrote: > I wrote up a small chrome extension for org-protocol. Comments, > improvements and positive criticism are all welcome. Thanks for making this. I just set up org-protocol and pass the "install test" on that page. Now when I click on your icon/extension Emacs comes to the foreground and I see the following error in the modeline: > No capture template referred to by "L" keys And in *Messages* I see: > Greedy org-protocol handler. Killing client. > No server editing buffers exist > No capture template referred to by "L" keys Any idea what I might be doing wrong? -k. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: New Chrome Extension Date: Tue, 07 Jul 2015 12:24:27 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCVfd-00011d-Dq for emacs-orgmode@gnu.org; Tue, 07 Jul 2015 12:24:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCVfa-0001Qz-4n for emacs-orgmode@gnu.org; Tue, 07 Jul 2015 12:24:33 -0400 Received: from mail-qg0-x22b.google.com ([2607:f8b0:400d:c04::22b]:36526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCVfa-0001Qq-0T for emacs-orgmode@gnu.org; Tue, 07 Jul 2015 12:24:30 -0400 Received: by qgeg89 with SMTP id g89so86716299qge.3 for ; Tue, 07 Jul 2015 09:24:29 -0700 (PDT) In-reply-to: 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Konstantin Kliakhandler Cc: emacs-orgmode@gnu.org On 2015-07-07 at 12:16, Ken Mankoff wrote: > Hi Konstantin, > > On 2015-07-07 at 11:44, Konstantin Kliakhandler wrote: >> I wrote up a small chrome extension for org-protocol. Comments, >> improvements and positive criticism are all welcome. > > Thanks for making this. I just set up org-protocol and pass the > "install test" on that page. Now when I click on your icon/extension > Emacs comes to the foreground and I see the following error in the > modeline: > >> No capture template referred to by "L" keys > > And in *Messages* I see: > >> Greedy org-protocol handler. Killing client. >> No server editing buffers exist >> No capture template referred to by "L" keys If I add a capture template with hotkey "L" I get the same message but for "p". If I add a capture template with the hotkey "p" then it appears to mostly work, but I don't get selected text. I do get a link to the webpage as the capture item body. -k. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konstantin Kliakhandler Subject: Re: New Chrome Extension Date: Tue, 7 Jul 2015 19:57:37 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d041825bc946628051a4bec89 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCWC2-0001PO-TX for emacs-orgmode@gnu.org; Tue, 07 Jul 2015 12:58:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCWBy-0004H5-Ph for emacs-orgmode@gnu.org; Tue, 07 Jul 2015 12:58:02 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:36896) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCWBy-0004Gp-GV for emacs-orgmode@gnu.org; Tue, 07 Jul 2015 12:57:58 -0400 Received: by wiclp1 with SMTP id lp1so56976590wic.0 for ; Tue, 07 Jul 2015 09:57:57 -0700 (PDT) In-Reply-To: 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Ken Mankoff Cc: emacs-orgmode@gnu.org --f46d041825bc946628051a4bec89 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello Ken, The first user, hurrah! You were right to add the capture templates - I will update the docs to be more clear about that. I think the first thing to add to the extension now that it is in the open is to add configuration for the targets... Here are the templates that I use (I need to replace the captured on: with a property at some point, but this is beside the point): ("L" "Protocol Link" entry (file+headline ,(concat org-directory "notes.or= g") "Inbox") "* %? [[%:link][%:description]] \nCaptured On: %U") ("p" "Protocol" entry (file+headline ,(concat org-directory "notes.org") "Inbox") "* %^{Title}\nSource: %u, %c\n #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?") I can't recall at the moment why I use the nicer format replacements for the link and the shorter for the full quote, and it might not matter. Could you try to make your "p" template similar to mine and see if it works? Alternatively, can you paste the templates you used? Cheers, Kosta --=20 Konstantin Kliakhandler http://slumpy.org )=C2=B0) )=C2=B0( (=C2=B0( On 7 July 2015 at 19:24, Ken Mankoff wrote: > > On 2015-07-07 at 12:16, Ken Mankoff wrote: > > Hi Konstantin, > > > > On 2015-07-07 at 11:44, Konstantin Kliakhandler > wrote: > >> I wrote up a small chrome extension for org-protocol. Comments, > >> improvements and positive criticism are all welcome. > > > > Thanks for making this. I just set up org-protocol and pass the > > "install test" on that page. Now when I click on your icon/extension > > Emacs comes to the foreground and I see the following error in the > > modeline: > > > >> No capture template referred to by "L" keys > > > > And in *Messages* I see: > > > >> Greedy org-protocol handler. Killing client. > >> No server editing buffers exist > >> No capture template referred to by "L" keys > > If I add a capture template with hotkey "L" I get the same message but fo= r > "p". If I add a capture template with the hotkey "p" then it appears to > mostly work, but I don't get selected text. I do get a link to the webpag= e > as the capture item body. > > -k. > --f46d041825bc946628051a4bec89 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello Ken,

The first user, hurrah!

You were right to add the capture templates - I will u= pdate the docs to be more clear about that. I think the first thing to add = to the extension now that it is in the open is to add configuration for the= targets...

Here are the templates that I use (I n= eed to replace the captured on: with a property at some point, but this is = beside the point):

=C2=A0("L" "= ;Protocol Link" entry (file+headline ,(concat org-directory "notes.org") "Inbox") "* %?= [[%:link][%:description]] \nCaptured On: %U")
("p" "Protocol" entry (file+headline ,(con= cat org-directory "notes.org") &= quot;Inbox")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&q= uot;* %^{Title}\nSource: %u, %c\n #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?&qu= ot;)

I can't recall at the moment why I = use the nicer format replacements for the link and the shorter for the full= quote, and it might not matter. Could you try to make your "p" t= emplate similar to mine and see if it works? Alternatively, can you paste t= he templates you used?

Cheers,
Kosta

--=C2=A0
Konstantin Kliakhandler
=C2= =A0 =C2=A0 http://slumpy.or= g
=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0=C2=A0 )=C2=B0) )=C2=B0( (=C2=B0(=

On 7 July 2015 at 19:24, Ken Mankoff <manko= ff@gmail.com> wrote:

On 2015-07-07 at 12:16, Ken Mankoff <mankoff@gmail.com> wrote:
> Hi Konstantin,
>
> On 2015-07-07 at 11:44, Konstantin Kliakhandler <kosta@slumpy.org> wrote:
>> I wrote up a small chrome extension for org-protocol. Comments, >> improvements and positive criticism are all welcome.
>
> Thanks for making this. I just set up org-protocol and pass the
> "install test" on that page. Now when I click on your icon/e= xtension
> Emacs comes to the foreground and I see the following error in the
> modeline:
>
>> No capture template referred to by "L" keys
>
> And in *Messages* I see:
>
>> Greedy org-protocol handler.=C2=A0 Killing client.
>> No server editing buffers exist
>> No capture template referred to by "L" keys

If I add a capture template with hotkey "L" I get the= same message but for "p". If I add a capture template with the h= otkey "p" then it appears to mostly work, but I don't get sel= ected text. I do get a link to the webpage as the capture item body.

=C2=A0 -k.

--f46d041825bc946628051a4bec89-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: New Chrome Extension Date: Tue, 07 Jul 2015 13:13:25 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCWR4-0006zB-16 for emacs-orgmode@gnu.org; Tue, 07 Jul 2015 13:13:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCWQx-0003VT-UC for emacs-orgmode@gnu.org; Tue, 07 Jul 2015 13:13:33 -0400 Received: from mail-qk0-x229.google.com ([2607:f8b0:400d:c09::229]:32775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCWQx-0003VM-Od for emacs-orgmode@gnu.org; Tue, 07 Jul 2015 13:13:27 -0400 Received: by qkhu186 with SMTP id u186so144720642qkh.0 for ; Tue, 07 Jul 2015 10:13:27 -0700 (PDT) In-reply-to: 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Konstantin Kliakhandler Cc: emacs-orgmode@gnu.org Selected text works with your capture templates. Thanks for sending them. FYI I notice the "test" on the org-protocol.el setup pages uses this: document.location.href='org-protocol://capture://'+makeUrl(); While yours uses: capture:/L/... If you don't specify "L" or "c" then would it let me choose which template the capture gets sent to? Seems like it might be an extra keystroke to then choose the template, but also more powerful... -k. On 2015-07-07 at 12:57, Konstantin Kliakhandler wrote: > Hello Ken, > > The first user, hurrah! > > You were right to add the capture templates - I will update the docs to be > more clear about that. I think the first thing to add to the extension now > that it is in the open is to add configuration for the targets... > > Here are the templates that I use (I need to replace the captured on: with > a property at some point, but this is beside the point): > > ("L" "Protocol Link" entry (file+headline ,(concat org-directory "notes.org") > "Inbox") "* %? [[%:link][%:description]] \nCaptured On: %U") > > ("p" "Protocol" entry (file+headline ,(concat org-directory "notes.org") > "Inbox") > "* %^{Title}\nSource: %u, %c\n > #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?") > > I can't recall at the moment why I use the nicer format replacements for > the link and the shorter for the full quote, and it might not matter. Could > you try to make your "p" template similar to mine and see if it works? > Alternatively, can you paste the templates you used? > > Cheers, > Kosta From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konstantin Kliakhandler Subject: Re: New Chrome Extension Date: Tue, 7 Jul 2015 20:31:58 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0111c016647643051a4c678b Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCWjH-0001zb-Dd for emacs-orgmode@gnu.org; Tue, 07 Jul 2015 13:32:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCWjC-0000RA-V0 for emacs-orgmode@gnu.org; Tue, 07 Jul 2015 13:32:23 -0400 Received: from mail-ig0-f172.google.com ([209.85.213.172]:35913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCWjC-0000R5-Pd for emacs-orgmode@gnu.org; Tue, 07 Jul 2015 13:32:18 -0400 Received: by igrv9 with SMTP id v9so181720738igr.1 for ; Tue, 07 Jul 2015 10:32:18 -0700 (PDT) In-Reply-To: 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Ken Mankoff Cc: emacs-orgmode@gnu.org --089e0111c016647643051a4c678b Content-Type: text/plain; charset=UTF-8 Great - the %i is what gets interpolated into the pasted text. If you don't specify a template letter, as in the setup pages, then the link is sent to the same place as it would by org-store-link ("C-c l" if you use the suggested bindings). Personally, I find it less useful in my workflow, as I would then need to start a new capture and insert the link. I can understand however why someone else would find that useful. When I (or someone else) add a configuration page, this should be easy to change. Cheers, Kosta On Jul 7, 2015 8:13 PM, "Ken Mankoff" wrote: > > Selected text works with your capture templates. Thanks for sending them. > > FYI I notice the "test" on the org-protocol.el setup pages uses this: > > document.location.href='org-protocol://capture://'+makeUrl(); > > While yours uses: > > capture:/L/... > > If you don't specify "L" or "c" then would it let me choose which template > the capture gets sent to? Seems like it might be an extra keystroke to then > choose the template, but also more powerful... > > -k. > > > On 2015-07-07 at 12:57, Konstantin Kliakhandler wrote: > > Hello Ken, > > > > The first user, hurrah! > > > > You were right to add the capture templates - I will update the docs to > be > > more clear about that. I think the first thing to add to the extension > now > > that it is in the open is to add configuration for the targets... > > > > Here are the templates that I use (I need to replace the captured on: > with > > a property at some point, but this is beside the point): > > > > ("L" "Protocol Link" entry (file+headline ,(concat org-directory " > notes.org") > > "Inbox") "* %? [[%:link][%:description]] \nCaptured On: %U") > > > > ("p" "Protocol" entry (file+headline ,(concat org-directory "notes.org") > > "Inbox") > > "* %^{Title}\nSource: %u, %c\n > > #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?") > > > > I can't recall at the moment why I use the nicer format replacements for > > the link and the shorter for the full quote, and it might not matter. > Could > > you try to make your "p" template similar to mine and see if it works? > > Alternatively, can you paste the templates you used? > > > > Cheers, > > Kosta > > --089e0111c016647643051a4c678b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Great - the %i is what gets interpolated in= to the pasted text.

If you don't specify a template letter, as in= the setup pages, then the link is sent to the same place as it would by or= g-store-link ("C-c l" if you use the suggested bindings). Persona= lly, I find it less useful in my workflow, as I would then need to start a = new capture and insert the link. I can understand however why someone else = would find that useful. When I (or someone else) add a configuration page, = this should be easy to change.

Cheers,
Kosta

On Jul 7, 2015 8:13 PM, "Ken Mankoff" = <mankoff@gmail.co= m> wrote:
Selected text works with your capture templates. Thanks for sending them.
FYI I notice the "test" on the org-protocol.el setup pages uses t= his:

document.location.href=3D'org-protocol://capture://'+makeUrl();

While yours uses:

capture:/L/...

If you don't specify "L" or "c" then would it let m= e choose which template the capture gets sent to? Seems like it might be an= extra keystroke to then choose the template, but also more powerful...

=C2=A0 -k.


On 2015-07-07 at 12:57, Konstantin Kliakhandler <kosta@slumpy.org> wrote:
> Hello Ken,
>
> The first user, hurrah!
>
> You were right to add the capture templates - I will update the docs t= o be
> more clear about that. I think the first thing to add to the extension= now
> that it is in the open is to add configuration for the targets...
>
> Here are the templates that I use (I need to replace the captured on: = with
> a property at some point, but this is beside the point):
>
>=C2=A0 ("L" "Protocol Link" entry (file+headline ,(= concat org-directory "notes.org")
> "Inbox") "* %? [[%:link][%:description]] \nCaptured On:= %U")
>
> ("p" "Protocol" entry (file+headline ,(concat org-= directory "notes.org")
> "Inbox")
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "* %^{Title}\nSource:= %u, %c\n
> #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?")
>
> I can't recall at the moment why I use the nicer format replacemen= ts for
> the link and the shorter for the full quote, and it might not matter. = Could
> you try to make your "p" template similar to mine and see if= it works?
> Alternatively, can you paste the templates you used?
>
> Cheers,
> Kosta

--089e0111c016647643051a4c678b--