From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabrice Popineau Subject: Re: problems with org-protocol + capture templates Date: Tue, 16 Apr 2013 22:16:24 +0200 Message-ID: References: <86boadu485.fsf@somewhere.org> <87li8ioom0.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c37f3c53e57904da800cf7 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USCWf-0003NC-M3 for emacs-orgmode@gnu.org; Tue, 16 Apr 2013 16:30:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USCWc-0005lx-Dc for emacs-orgmode@gnu.org; Tue, 16 Apr 2013 16:30:49 -0400 Received: from plane.gmane.org ([80.91.229.3]:42921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USCWc-0005lk-1T for emacs-orgmode@gnu.org; Tue, 16 Apr 2013 16:30:46 -0400 Received: from public by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1USCWY-00019H-Ie for emacs-orgmode@gnu.org; Tue, 16 Apr 2013 22:30:42 +0200 In-Reply-To: <87li8ioom0.fsf@bzg.ath.cx> 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: Bastien Cc: public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org, Sebastien Vauban --001a11c37f3c53e57904da800cf7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I use org-protocol with Chrome and Windows 8, emacs 24.3+ and some recent Org mode. I definitely can select the capture template. I use emacsclientw.exe rather than emacs.exe to store the link. It also means that emacs is already started and org-mode already loaded. Fabrice 2013/4/16 Bastien > Hi S=E9bastien, > > "Sebastien Vauban" > writes: > > > Alvar Maciel wrote: > >> Hi to all, > >> I'm using org-mode as personal day planner with almost all the > >> configuration of http://doc.norang.ca/org-mode.html > >> I try to use org-protocol to send links to emacs using the config of > >> worg. But when emacs open i can not select the template of the > >> capture mode (it's weird months ago was working) and i don't know > >> were is my mistake. > >> this is my keybindidng > >> > >> var orgProtoString =3D 'org-protocol://capture://'+ > >> encodeURIComponent(gBrowser.currentURI.spec) + '/' + > >> encodeURIComponent(gBrowser.contentWindow.document.title) + '/' + > >> encodeURIComponent(content.window.getSelection()); > >> > >> gBrowser.loadURI(orgProtoString); > >> > >> my capture template > >> > >> (setq org-capture-templates > >> (quote (("t" "todo" entry (file "~/en uso/2013/org/refile.org") > >> "* TODO %?\n%U\n%a\n" :clock-in t :clock-resume t) > >> ("r" "respond" entry (file "~/en uso/2013/org/refile.org > ") > >> "* NEXT Respond to %:from on %:subject\nSCHEDULED: > >> %t\n%U\n%a\n" :clock-in t :clock-resume t :immediate-finish t) > >> ("n" "note" entry (file "~/en uso/2013/org/refile.org") > >> "* %? :NOTE:\n%U\n%a\n" :clock-in t :clock-resume t) > >> ("j" "Journal" entry (file+datetree "~/Dropbox/en > >> uso/2013/org/diary.org") > >> "* %?\n%U\n" :clock-in t :clock-resume t) > >> ("w" "org-protocol" entry (file "~/en uso/2013/org/ > refile.org") > >> "* TODO Review %c\n%U\n" :immediate-finish t) > >> ("p" "Phone call" entry (file "~/en uso/2013/org/ > refile.org") > >> "* PHONE %? :PHONE:\n%U" :clock-in t :clock-resume t) > >> ("h" "Habit" entry (file "~/en uso/2013/org/refile.org") > >> "* NEXT %?\n%U\n%a\nSCHEDULED: %(format-time-string > >> \"<%Y-%m-%d %a .+1d/3d>\")\n:PROPERTIES:\n:STYLE: > >> habit\n:REPEAT_TO_STATE: NEXT\n:END:\n")))) > > > > AFAIK, no, you can't dynamically select your template. > > I'm not using org-protocol anymore but I certainly *do* remember that > you can dynamically select a capture template. > > So maybe Alvar's issue needs some investigation. > > -- > Bastien > > > --=20 Fabrice Popineau ----------------------------- SUPELEC D=E9partement Informatique 3, rue Joliot Curie 91192 Gif/Yvette Cedex Tel direct : +33 (0) 169851950 Standard : +33 (0) 169851212 ------------------------------ --001a11c37f3c53e57904da800cf7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I use org-protocol with Chrome and Windows 8, emacs 24.3+ = and some recent Org mode.
I definitely can select the capture tem= plate.
I use emacsclientw.exe rather than emacs.exe to stor= e the link.
It also means that emacs is already started and org-mode already= loaded.

Fabrice

<= /div>


20= 13/4/16 Bastien <bzg@gnu.org>
Hi S=E9bastien,

"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gman= e.org> writes:

> Alvar Maciel wrote:
>> Hi to all,
>> I'm using org-mode as personal day planner with almost all the=
>> configuration of http://doc.norang.ca/org-mode.html
>> I try to use org-protocol to send links to emacs using the config = of
>> worg. But when =A0emacs open i can not select the template of the<= br> >> capture mode (it's weird months ago was working) and i don'= ;t =A0know
>> were is my mistake.
>> =A0this is my keybindidng
>>
>> var orgProtoString =3D 'org-protocol://capture://'+
>> =A0 encodeURIComponent(gBrowser.currentURI.spec) + '/' + >> =A0 encodeURIComponent(gBrowser.contentWindow.document.title) + &#= 39;/' +
>> =A0 encodeURIComponent(content.window.getSelection());
>>
>> gBrowser.loadURI(orgProtoString);
>>
>> my capture template
>>
>> (setq org-capture-templates
>> =A0 =A0 =A0 (quote (("t" "todo" entry (file &q= uot;~/en uso/2013/org/refil= e.org")
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"* TODO %?\n%U\n%a\n" :cl= ock-in t :clock-resume t)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 ("r" "respond" ent= ry (file "~/en uso/2013/org/refile.org")
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"* NEXT Respond to %:from on %= :subject\nSCHEDULED:
>> %t\n%U\n%a\n" :clock-in t :clock-resume t :immediate-finish t= )
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 ("n" "note" entry = (file "~/en uso/2013/org/refile.org")
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"* %? :NOTE:\n%U\n%a\n" := clock-in t :clock-resume t)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 ("j" "Journal" ent= ry (file+datetree "~/Dropbox/en
>> uso/2013/org/diary.= org")
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"* %?\n%U\n" :clock-in t = :clock-resume t)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 ("w" "org-protocol"= ; entry (file "~/en uso/2013/org/refile.org")
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"* TODO Review %c\n%U\n" = :immediate-finish t)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 ("p" "Phone call" = entry (file "~/en uso/2013/org/refile.org")
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"* PHONE %? :PHONE:\n%U" = :clock-in t :clock-resume t)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 ("h" "Habit" entry= (file "~/en uso/2013/org/refile.org")
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"* NEXT %?\n%U\n%a\nSCHEDULED:= %(format-time-string
>> \"<%Y-%m-%d %a .+1d/3d>\")\n:PROPERTIES:\n:STYLE:<= br> >> habit\n:REPEAT_TO_STATE: NEXT\n:END:\n"))))
>
> AFAIK, no, you can't dynamically select your template.

I'm not using org-protocol anymore but I certainly *do* rem= ember that
you can dynamically select a capture template.

So maybe Alvar's issue needs some investigation.

--
=A0Bastien





-- Fabrice Popineau
-----------------------------
SUPELEC
D=E9partement Informatique
3, rue Joliot Curie
91= 192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212<= /div>
------------------------------

--001a11c37f3c53e57904da800cf7--