* problems with org-protocol + capture templates
@ 2013-03-20 21:19 Alvar Maciel
2013-03-20 21:54 ` Sebastien Vauban
0 siblings, 1 reply; 7+ messages in thread
From: Alvar Maciel @ 2013-03-20 21:19 UTC (permalink / raw)
To: emacs-orgmode
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 = '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"))))
and the .desktop file in ./local/share/applications
[Desktop Entry]
Name=org-protocol
Exec=emacs %u
Type=Application
Terminal=false
Categories=System;
MimeType=x-scheme-handler/org-protocol;
reggards
Alvar
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: problems with org-protocol + capture templates
2013-03-20 21:19 problems with org-protocol + capture templates Alvar Maciel
@ 2013-03-20 21:54 ` Sebastien Vauban
2013-03-23 12:59 ` Alvar Maciel
2013-04-16 8:40 ` Bastien
0 siblings, 2 replies; 7+ messages in thread
From: Sebastien Vauban @ 2013-03-20 21:54 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Alvar,
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 = '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. The default template
for org-protocol is bound to `w'. Though, you can change that for your Emacs
sessions.
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: problems with org-protocol + capture templates
2013-03-20 21:54 ` Sebastien Vauban
@ 2013-03-23 12:59 ` Alvar Maciel
2013-04-16 8:40 ` Bastien
1 sibling, 0 replies; 7+ messages in thread
From: Alvar Maciel @ 2013-03-23 12:59 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: emacs-orgmode
On Wed, Mar 20, 2013 at 6:54 PM, Sebastien Vauban
<wxhgmqzgwmuf@spammotel.com> wrote:
> AFAIK
thanks :P I will change that in my emacs session
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: problems with org-protocol + capture templates
2013-03-20 21:54 ` Sebastien Vauban
2013-03-23 12:59 ` Alvar Maciel
@ 2013-04-16 8:40 ` Bastien
2013-04-16 20:03 ` Rafael
2013-04-16 20:16 ` Fabrice Popineau
1 sibling, 2 replies; 7+ messages in thread
From: Bastien @ 2013-04-16 8:40 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ
Hi Sébastien,
"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.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 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 = '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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: problems with org-protocol + capture templates
2013-04-16 8:40 ` Bastien
@ 2013-04-16 20:03 ` Rafael
2013-04-16 20:16 ` Fabrice Popineau
1 sibling, 0 replies; 7+ messages in thread
From: Rafael @ 2013-04-16 20:03 UTC (permalink / raw)
To: emacs-orgmode
Bastien <bzg@gnu.org> writes:
> Hi Sébastien,
>
> "Sebastien Vauban"
> <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.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 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 = '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.
I just had a problem with org-protocol not working. After plenty of
googling, reinstalling and fussing, I think that I solved it and I
believe that the problem was related that I was playing with different
Emacs versions in Ubuntu and momentarily I had no emacsclient. See for
example http://ubuntuforums.org/showthread.php?t=2092293
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: problems with org-protocol + capture templates
2013-04-16 8:40 ` Bastien
2013-04-16 20:03 ` Rafael
@ 2013-04-16 20:16 ` Fabrice Popineau
2013-04-17 4:04 ` Feng Shu
1 sibling, 1 reply; 7+ messages in thread
From: Fabrice Popineau @ 2013-04-16 20:16 UTC (permalink / raw)
To: Bastien; +Cc: public-emacs-orgmode-mXXj517/zsQ, Sebastien Vauban
[-- Attachment #1: Type: text/plain, Size: 3018 bytes --]
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 <bzg@gnu.org>
> Hi Sébastien,
>
> "Sebastien Vauban"
> <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.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 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 = '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
>
>
>
--
Fabrice Popineau
-----------------------------
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
------------------------------
[-- Attachment #2: Type: text/html, Size: 4788 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: problems with org-protocol + capture templates
2013-04-16 20:16 ` Fabrice Popineau
@ 2013-04-17 4:04 ` Feng Shu
0 siblings, 0 replies; 7+ messages in thread
From: Feng Shu @ 2013-04-17 4:04 UTC (permalink / raw)
To: emacs-orgmode
Fabrice Popineau <fabrice.popineau@supelec.fr> writes:
> 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.
emacsclient don't creat a new frame by default, If you have no emacs
frame, org-protocol for firefox is nearly useless. I use a bash wrap
file "org-capture.sh" to launch emacs frame:
#+begin_src
#!/bin/bash
set -efu
TEST=$(ps ax | grep "org-capture-for-firefox" | grep -v grep | wc -l)
if [ $TEST = 1 ] ; then
exec emacsclient $*;
exit 0;
else
exec emacsclient -c -a '' -F '((name . "org-capture-for-firefox"))' $*
exit 0;
fi
#+end_src
>
> Fabrice
>
> 2013/4/16 Bastien <bzg@gnu.org>
>
> Hi Sébastien,
>
> "Sebastien Vauban"
>
>
> <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.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 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 = '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
--
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-04-17 4:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-20 21:19 problems with org-protocol + capture templates Alvar Maciel
2013-03-20 21:54 ` Sebastien Vauban
2013-03-23 12:59 ` Alvar Maciel
2013-04-16 8:40 ` Bastien
2013-04-16 20:03 ` Rafael
2013-04-16 20:16 ` Fabrice Popineau
2013-04-17 4:04 ` Feng Shu
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.