emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] problems with org-protocol + capture templates


From: Feng Shu
Subject: Re: [O] problems with org-protocol + capture templates
Date: Wed, 17 Apr 2013 12:04:23 +0800
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2 (gnu/linux)

Fabrice Popineau <address@hidden> 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 <address@hidden>
>
>     Hi Sébastien,
>     
>     "Sebastien Vauban"
>     
>     
>     <address@hidden> 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

-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]