From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mario Martelli Subject: Re: org-protocol documentation Date: Sun, 25 Jun 2017 12:15:20 +0200 Message-ID: References: <68E12968-9AF5-440A-B22C-AC55B70BA910@schnuddelhuddel.de> <87k248b6p8.fsf@nicolasgoaziou.fr> <7C76EDC3-CC7E-4AFE-B45B-867752C1B33A@schnuddelhuddel.de> <87a8519rlg.fsf@nicolasgoaziou.fr> <8760fp9mui.fsf@nicolasgoaziou.fr> <2FAD7DF2-2A0C-4703-A383-BA8D3346C691@schnuddelhuddel.de> <18D83D3C-C472-4614-988F-1F1DA5EB5CEC@schnuddelhuddel.de> <87efub7psj.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_EAE12C8F-8D72-47F1-9CD6-078F0E8ED707" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dP4Zn-0005mR-57 for emacs-orgmode@gnu.org; Sun, 25 Jun 2017 06:15:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dP4Zi-0005zM-69 for emacs-orgmode@gnu.org; Sun, 25 Jun 2017 06:15:31 -0400 Received: from mail-wr0-x231.google.com ([2a00:1450:400c:c0c::231]:34654) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dP4Zh-0005yw-Kw for emacs-orgmode@gnu.org; Sun, 25 Jun 2017 06:15:26 -0400 Received: by mail-wr0-x231.google.com with SMTP id 77so116937335wrb.1 for ; Sun, 25 Jun 2017 03:15:25 -0700 (PDT) In-Reply-To: <87efub7psj.fsf@nicolasgoaziou.fr> 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" To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org --Apple-Mail=_EAE12C8F-8D72-47F1-9CD6-078F0E8ED707 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi, > Also, I suggest using ox-texinfo from development version, if you can, > as the Texinfo output should be superior. Done that, eventually. > Also, if the syntax is not quite right, no worries, > we'll fix it. That is probably necessary. Please note, that the documentation assumes that the patches regarding = =E2=80=9Copen-source=E2=80=9D are applied. --Apple-Mail=_EAE12C8F-8D72-47F1-9CD6-078F0E8ED707 Content-Disposition: attachment; filename=0001-org-protocol-documentation-is-moved-to-core-document.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-org-protocol-documentation-is-moved-to-core-document.patch" Content-Transfer-Encoding: quoted-printable =46rom=20cac507876c9d5acb7c61e62a425e1fdfa1676418=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Mario=20Martelli=20=0A= Date:=20Sun,=2025=20Jun=202017=2012:00:51=20+0200=0ASubject:=20[PATCH]=20= org-protocol=20documentation=20is=20moved=20to=20core=20documentation=0A=0A= ---=0A=20doc/org.texi=20|=20819=20= ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-=0A=201=20= file=20changed,=20811=20insertions(+),=208=20deletions(-)=0A=0Adiff=20= --git=20a/doc/org.texi=20b/doc/org.texi=0Aindex=20879756e6f..59725cbc6=20= 100644=0A---=20a/doc/org.texi=0A+++=20b/doc/org.texi=0A@@=20-7516,15=20= +7516,818=20@@=20For=20more=20information,=20including=20how=20to=20read=20= atom=20feeds,=20see=0A=20@section=20Protocols=20for=20external=20access=0A= =20@cindex=20protocols,=20for=20external=20access=0A=20@cindex=20= emacsserver=0A+@cindex=20org-protocol=0A=20=0A-You=20can=20set=20up=20= Org=20for=20handling=20protocol=20calls=20from=20outside=20applications=20= that=0A-are=20passed=20to=20Emacs=20through=20the=20@file{emacsserver}.=20= =20For=20example,=20you=20can=0A-configure=20bookmarks=20in=20your=20web=20= browser=20to=20send=20a=20link=20to=20the=20current=20page=20to=0A-Org=20= and=20create=20a=20note=20from=20it=20using=20capture=20= (@pxref{Capture}).=20=20Or=20you=0A-could=20create=20a=20bookmark=20that=20= will=20tell=20Emacs=20to=20open=20the=20local=20source=20file=20of=0A-a=20= remote=20website=20you=20are=20looking=20at=20with=20the=20browser.=20=20= See=0A-@uref{http://orgmode.org/worg/org-contrib/org-protocol.php}=20for=20= detailed=0A-documentation=20and=20setup=20instructions.=0A+You=20can=20= set=20up=20Org=20for=20handling=20protocol=20calls=20from=20outside=0A= +applications=20that=20are=20passed=20to=20Emacs=20through=20the=0A= +@file{emacsserver}.=20=20For=20example,=20you=20can=20configure=20= bookmarks=20in=0A+your=20web=20browser=20to=20send=20a=20link=20to=20the=20= current=20page=20to=20Org=20and=20create=0A+a=20note=20from=20it=20using=20= capture=20(@pxref{Capture}).=20=20Or=20you=20could=20create=20a=0A= +bookmark=20that=20will=20tell=20Emacs=20to=20open=20the=20local=20= source=20file=20of=20a=0A+remote=20website=20you=20are=20looking=20at=20= with=20the=20browser.=20=20=0A+=0A+@node=20About=20org-protocolel=0A= +@section=20About=20org-protocol.el=0A+@samp{org-protocol.el}=20is=20= based=20on=20code=20and=20ideas=20from=20= @uref{./org-annotation-helper.org,=20org-annotation-helper.el}=20and=0A= +@samp{org-browser-url.el}.=0A+=0A+"@samp{org-protocol:/sub-protocol:/}"=20= triggers=20actions=20associated=20with=20@samp{sub-protocol}=0A+through=20= the=20custom=20variable=20@samp{org-protocol-protocol-alist}.=0A+=0A+It=20= comes=20with=20four=20predefined=20handlers:=0A+@table=20@asis=0A+@item=20= @samp{org-protocol-store-link}=0A+=09triggered=20through=20the=20= sub-protocol=20"@samp{store-link}".=20Stores=20an=20Org-link=20and=0A= +pushes=20the=20URL=20to=20the=20@samp{kill-ring}.=0A+@item=20= @samp{org-protocol-capture}=0A+=09Fill=20a=20@samp{CAPTURE}=20buffer=20= with=20information=20gathered=20somewhere=20else.=20This=0A+handler=20is=20= triggered=20through=20the=20"@samp{capture}"=20sub-protocol=20and=20uses=20= the=0A+function=20@samp{org-capture}.=0A+@item=20= @samp{org-protocol-remember}=0A+=09Fills=20a=20remember=20buffer=20with=20= information=20gathered=20somewhere=20else.=20This=0A+handler=20is=20= triggered=20through=20the=20"@samp{remember}"=20sub-protocol=20and=20= still=0A+available=20for=20backward=20compatibility.=20This=20handler=20= uses=20@samp{org-remember}.=20Use=0A+the=20current=20= @samp{org-protocol-capture}.=0A+@item=20@samp{org-protocol-open-source}=0A= +=09"@samp{open-source}".=20Maps=20URLs=20to=20local=20filenames.=20Use=20= this=20to=20open=20sources=20of=0A+already=20published=20contents=20in=20= emacs=20for=20editing.=0A+@end=20table=0A+=0A+@samp{org-protocol}=20= helps=20creating=20custom=20handlers=20= @uref{../org-tutorials/org-protocol-custom-handler.org,=20(tutorial)}=20= and=20so=20called=0A+@samp{org-protocol-projects}.=0A+=0A+=0A+@@As=20= of=20Org=20mode=209.0=20a=20new=20org-protocol=20key=3Dvalue=20syntax=20= is=20supported@@=0A+=0A+Org-protocol=20can=20now=20handle=20= query-style=20parameters=20such=20as:=0A+=0A+@example=0A= +org-protocol://store-link?url=3Dhttp:%2F%2Flocalhost%2Findex.html&title=3D= The%20title=0A= +org-protocol://capture?template=3Dx&title=3DHello&body=3DWorld&url=3Dhttp= :%2F%2Fexample.com=0A+@end=20example=0A+=0A+Old-style=20links=20such=20= as=0A= +@samp{org-protocol://store-link:/http:%2F%2Flocalhost%2Findex.html/The%20= title}=0A+continue=20to=20be=20supported.=0A+=0A+If=20you=20have=20= defined=20your=20own=20handler=20functions=20for=0A= +@code{org-protocol-protocol-alist},=20change=20them=20to=20accept=20= either=20a=20property=0A+list=20(for=20new-style=20links)=20or=20a=20= string=20(for=20old-style=20links).=20=20Use=0A= +@code{org-protocol-parse-parameters}=20to=20convert=20old-style=20links=20= into=20property=0A+lists.=0A+=0A+@@As=20of=20Org=20mode=20release=20= 7.01=20@samp{org-protocol-remember}=20is=20now=20by=20= @samp{org-protocol-capture}.@@=0A+If=20not=20stated=20otherwise,=20= you=20may=20simply=20replace=20each=20occurrence=20of=0A+@emph{capture}=20= with=20@emph{remember}=20throughout=20this=20document,=20if=20you=20= still=20want=20to=20use=0A+remember=20templates.=20Use=20@samp{M-x=20= org-version}=20to=20find=20out=20about=20the=20version=20you're=0A= +using.=0A+=0A+=0A+@anchor{orga3188cf}=0A+=0A+@node=20Installation=0A= +@section=20Installation=0A+@itemize=0A+@item=0A+To=20load=20= org-protocol.el=20add=20the=20following=20to=20your=20@samp{.emacs}:=0A+=0A= +@example=0A+(server-start)=0A+(require=20'org-protocol)=0A+@end=20= example=0A+@end=20itemize=0A+=0A+@node=20Browser=20/=20system=20setup=0A= +@subsection=20Browser=20/=20system=20setup=0A+@itemize=0A+@item=0A= +@ref{Linux=20setup=20(Gnome)}=0A+@item=0A+@ref{Linux=20setup=20(KDE)}=0A= +@item=0A+@ref{Windows=20setup}=0A+@item=0A+@ref{macOS=20setup}=0A+@end=20= itemize=0A+=0A+@enumerate=0A+@item=0A+Linux=20setup=20(Gnome)=0A+=0A+For=20= this=20to=20work,=20you'll=20need=20the=20Gnome-Libraries=20to=20be=20= installed.=0A+=0A+@example=0A+gconftool-2=20-s=20= /desktop/gnome/url-handlers/org-protocol/command=20= '/usr/local/bin/emacsclient=20%s'=20--type=20String=0A+gconftool-2=20-s=20= /desktop/gnome/url-handlers/org-protocol/enabled=20--type=20Boolean=20= true=0A+@end=20example=0A+=0A+@item=0A+Linux=20setup=20(KDE)=0A+=0A+Add=20= a=20file=20@samp{org.protocol}=20to=20= @samp{~/.kde/share/kde4/services/}:=0A+=0A+@example=0A+#=20-*-=20conf=20= -*-=0A+[Protocol]=0A+protocol=3Dorg-protocol=0A= +exec=3D/usr/bin/emacsclient=20'%u'=0A+input=3Dnone=0A+output=3Dnone=0A= +helper=3Dtrue=0A+listing=3D=0A+reading=3Dfalse=0A+writing=3Dfalse=0A= +makedir=3Dfalse=0A+deleting=3Dfalse=0A+Icon=3Demacs=0A+Description=3DA=20= protocol=20for=20org-mode=0A+@end=20example=0A+=0A+@anchor{org3cb52a6}=0A= +=0A+@item=0A+Windows=20setup=0A+=0A+Windows=20users=20may=20register=20= the=20"@samp{org-protocol}"=20once=20for=20all=20by=20adjusting=20the=0A= +following=20to=20their=20facts,=20save=20it=20as=20*.reg=20file=20and=20= double-click=20it.=20This=0A+worked=20for=20me=20on=20Windows-XP=20= Professional=20and=20the=20emasc23=20from=20ourcomments.org=0A= +(@uref{http://ourcomments.org/cgi-bin/emacsw32-dl-latest.pl}).=20I'm=20= no=20Windows=20user=0A+though=20and=20enhancements=20are=20more=20than=20= welcome=20on=20the=20org-mode=20mailinglist.=20The=0A+original=20file=20= is=20from=20@uref{http://kb.mozillazine.org/Register_protocol}.=0A+=0A= +@example=0A+REGEDIT4=0A+=0A+[HKEY_CLASSES_ROOT\org-protocol]=0A= +@@=3D"URL:Org=20Protocol"=0A+"URL=20Protocol"=3D""=0A= +[HKEY_CLASSES_ROOT\org-protocol\shell]=0A= +[HKEY_CLASSES_ROOT\org-protocol\shell\open]=0A= +[HKEY_CLASSES_ROOT\org-protocol\shell\open\command]=0A= +@@=3D"\"C:\\Programme\\Emacs\\emacs\\bin\\emacsclientw.exe\"=20\"%1\""=0A= +@end=20example=0A+=0A+@item=0A+macOS=20setup=0A+=0A+To=20bridge=20= external=20calls=20to=20emacs=20you=20need=20to=20install=20a=0A= +protocol-handler.=20= @uref{https://github.com/aaronbieber/org-protocol-handler/commits/master/C= ommits%20%C2%B7%20aaronbieber/org-protocol-handler/,=20Aaron=20Bieber's=20= org-protocol-handler}=20will=20work=20fine.=0A+=0A+If=20you=20are=20= using=20a=20macOS=20native=20Emacs,=20it=20is=20recommended=20to=20use=20= the=0A+emacsclient=20bundled=20with=20Emacs.=20Such=20as=0A= +@samp{/Applications/Emacs.app/Contents/MacOS/bin/emacsclient}=20in=20= the=20case=0A+of=20@uref{https://emacsformacosx.com,=20Emacs=20For=20Mac=20= OS=20X}.=0A+=0A+After=20installing=20the=20protocol-handler=20you=20= should=20then=20@ref{Verify=20the=20installation}.=20Once=20verified,=20= you=20can=20begin=20using=20org-protocol.=0A+=0A+The=20= @uref{https://bitbucket.org/mituharu/emacs-mac,=20Emacs=20Mac=20Port}=20= comes=20with=20org-protocol.=20No=20installation=20of=20a=0A+protocol=20= handler=20is=20needed=20with=20it.=0A+@end=20enumerate=0A+=0A+@node=20= Applications=0A+@subsection=20Applications=0A+@anchor{org91000c6}=0A+=0A= +@enumerate=0A+@item=0A+Firefox=0A+=0A+If=20you=20are=20using=20Firefox=20= on=20macOS,=20see=20@ref{macOS=20setup}.=20=0A+=0A+=0A+Please=20refer=20= to=20@uref{http://kb.mozillazine.org/Register_protocol}=20and=20use=0A= +"org-protocol"=20as=20protocol.=0A+=0A+@anchor{org83914ec}=0A+=0A+@item=0A= +Acrobat=20Reader=0A+=0A+Adapted=20from=20= @uref{http://article.gmane.org/gmane.emacs.orgmode/6810}=0A+=0A+You=20= place=20a=20javascript=20file=20for=20each=20menu=20entry=20in=0A= +@samp{~/.adobe/Acrobat//JavaScripts}=20on=20unix-like=20= systems=20or=0A+@samp{c:/Program=20Files/Adobe/Acrobat=20= /Reader/Javascripts/}=20on=0A+Windows,=20or=20wherever=20your=20= Adobe=20Reader=20Installation=20might=20look=20for=0A+javascript.=0A+=0A= +The=20examples=20given=20here=20will=20place=20new=20menu=20entries=20= in=20the=20"Tools"=0A+menu,=20after=20restarting=20Adobe=20Reader.=0A+=0A= +@anchor{org6e6a1d8}=0A+=0A+@enumerate=0A+@item=0A+org-store-link.js=0A+=0A= +@example=0A+//=20from=20= http://article.gmane.org/gmane.emacs.orgmode/6810=0A= +app.addMenuItem(@{cName:"org-store-link",=20cParent:"Tools",=0A+=20=20=20= cExec:"app.launchURL('org-protocol://store-link://'=20+=20= encodeURIComponent(this.URL)=20+=20'/'=20+=20= encodeURIComponent(this.info.Title));"@});=0A+@end=20example=0A+=0A= +@anchor{orgdd4727b}=0A+=0A+@item=0A+org-capture.js=0A+=0A+@example=0A= +//=20from=20http://article.gmane.org/gmane.emacs.orgmode/6810=0A= +app.addMenuItem(@{cName:"org-capture",=20cParent:"Tools",=0A+=20=20=20= cExec:"app.launchURL('org-protocol://capture://'=20+=20= encodeURIComponent(this.URL)=20+=20'/'=20+=20= encodeURIComponent(this.info.Title)=20+=20'/');"@});=0A+@end=20example=0A= +=0A+And=20this=20one,=20if=20you=20still=20use=20remember=20templates:=0A= +=0A+@anchor{org3949e6c}=0A+=0A+@item=0A+org-remember.js=0A+=0A+@example=0A= +//=20from=20http://article.gmane.org/gmane.emacs.orgmode/6810=0A= +app.addMenuItem(@{cName:"org-remember",=20cParent:"Tools",=0A+=20=20=20= cExec:"app.launchURL('org-protocol://remember://'=20+=20= encodeURIComponent(this.URL)=20+=20'/'=20+=20= encodeURIComponent(this.info.Title)=20+=20'/');"@});=0A+@end=20example=0A= +=0A+=0A+@anchor{org6ef67df}=0A+@end=20enumerate=0A+=0A+@item=0A+Opera=0A= +=0A+If=20you=20are=20using=20Opera=20on=20macOS,=20see=20@ref{macOS=20= setup}.=20=0A+=0A+Opera=20setup=20is=20described=20here:=0A= +@uref{http://www.opera.com/support/kb/view/535/}.=0A+=0A+To=20set=20up=20= opera=20for=20use=20with=20org-protocol,=20follow=20these=20steps:=0A+=0A= +@enumerate=0A+@item=0A+Choose=20"@emph{Tools}"=20->=20= "@emph{Prefences}"=20from=20the=20menu.=0A+@item=0A+Select=20the=20tab=20= "@emph{Advanced}".=0A+@item=0A+Choose=20"@emph{Programs}"=20from=20the=20= list=20on=20the=20left.=0A+@item=0A+Now=20click=20the=20button=20= "@emph{Add}"=20on=20the=20very=20right.=0A+@item=0A+In=20the=20new=20= dialog=20window,=20enter=20"@samp{org-protocol}"=20as=20= "@emph{Protocol}",=20choose=20the=0A+radio=20button=20"@emph{Open=20with=20= other=20application}"=20and=20enter=20the=20path=20to=0A+emacsclient.=0A= +@end=20enumerate=0A+=0A+@anchor{orgb32e0fa}=0A+=0A+@item=0A+Safari=0A+=0A= +To=20use=20org-protocol=20add=20a=20bookmark=20to=20your=20favorites=20= bar.=20=0A+Doing=20that=20enables=20you=20to=20trigger=20the=20bookmark=20= by=20a=20keystroke.=20=0A+=0A+Here=20is=20the=20URL=20to=20use=20as=20= "@emph{Location}"=20for=20browser=20bookmarks.=20Just=20remove=20the=0A= +line=20breaks,=20replace=20"@samp{sub-protocol}"=20with=20the=20real=20= sub-protocol=20to=20use=20and=20=0A+exchange=20the=20@samp{x}=20with=20= the=20template=20shortcut=20of=20your=20choice.=0A+=0A+@example=0A= +javascript:(function()@{window.location.href=3D'org-protocol://sub-protoc= ol?=0A+template=3Dx&url=3D'+encodeURIComponent(window.location.href)+=0A= +'&title=3D'+encodeURIComponent(document.title)+=0A= +'&body=3D'+encodeURIComponent(window.getSelection());@})();=0A+@end=20= example=0A+@end=20enumerate=0A+=0A+@node=20Verify=20the=20installation=0A= +@subsection=20Verify=20the=20installation=0A+After=20your=20protocol=20= is=20registered=20with=20your=20browser/OS,=20these=20links=20here=0A= +should=20work.=20Click=20on=20them=20and=20see=20if=20emacs=20reacts:=0A= +=0A+@html=0A+
    =0A+=20
  • Org=20= store-link
  • =0A+=20
  • Org=20= capture=20(select=20some=20text=20if=20you=20like)
  • =0A+=20
  • Org=20remember=20(select=20some=20text=20= please)
  • =0A+
=0A+@end=20html=0A+=0A+=0A+@anchor{org6223309}=0A= +@strong{*}=20Using=20org-protocol=0A+=0A+To=20actually=20use=20= org-protocol=20add=20a=20bookmark=20to=20Firefox=20or=20Opera.=0A+=0A= +Here=20is=20the=20URL=20to=20use=20as=20"@emph{Location}"=20for=20= browser=20bookmarks.=20Just=20remove=20the=0A+line=20breaks=20and=20= replace=20"@samp{sub-protocol}"=20with=20the=20real=20sub-protocol=20to=20= use:=0A+=0A+@example=0A= +javascript:location.href=3D'org-protocol://sub-protocol?=0A+=20=20=20=20= =20=20=20=20=20=20=20= template=3Dx&url=3D'+encodeURIComponent(window.location.href)+=0A+=20=20=20= =20=20=20=20=20=20=20=20'&title=3D'+encodeURIComponent(document.title)+=0A= +=20=20=20=20=20=20=20=20=20=20=20= '&body=3D'+encodeURIComponent(window.getSelection());@})();=0A+@end=20= example=0A+=0A+This=20URL=20may=20be=20used=20for=20all=20three=20= standard=20handlers=20in=20@samp{org-protocol.el}.=20Some=0A+of=20the=20= values=20will=20be=20ignored=20(e.g.=20@samp{store-link:/}=20will=20use=20= the=20URL=20and=20title=0A+only).=0A+=0A+@anchor{org15dcbb6}=0A+=0A= +@menu=0A+*=20Browser=20/=20system=20setup::=0A+*=20Applications::=0A+*=20= Verify=20the=20installation::=0A+@end=20menu=0A+=0A+@node=20Links=20and=20= bookmarks=20@samp{org-protocol-store-link}=0A+@section=20Links=20and=20= bookmarks:=20@samp{org-protocol-store-link}=0A+@samp{org-store-link}=20= stores=20an=20Org-link=20insertable=20through=20@samp{M-x=20= org-insert-link}=20and=0A+pushes=20the=20URL=20found=20onto=20the=20= @samp{kill-ring}=20for=20yanking=20(@samp{C-y}).=20The=20sub-protocol=0A= +used=20is=20"@samp{store-link}":=0A+=0A+@example=0A+emacsclient=20= org-protocol://store-link?url=3DURL&title=3DTITLE=0A+@end=20example=0A+=0A= +will=20store=20this=20Org-link:=0A+=0A+@example=0A+[[URL][TITLE]]=0A= +@end=20example=0A+=0A+In=20addition,=20@samp{URL}=20will=20be=20pushed=20= on=20the=20@samp{kill-ring}=20for=20yanking=20('@samp{C-y}').=20You=20= will=0A+have=20to=20encode=20@samp{URL}=20and/or=20@samp{TITLE}=20if=20= they=20contain=20slashes,=20and=20probably=20quote=0A+those=20for=20the=20= shell.=0A+=0A+To=20use=20this=20feature,=20add=20a=20bookmark=20with=20= an=20arbitrary=20name=20(e.g.=0A+"@emph{Org:=20store-link}")=20and=20= enter=20this=20as=20"@samp{Location}":=0A+=0A+@example=0A= +javascript:location.href=3D'org-protocol://store-link?url=3D'+encodeURICo= mponent(location.href)=0A+@end=20example=0A+=0A+@anchor{org00a295d}=0A+=0A= +@node=20Note=20taking=20and=20citations=20@samp{org-protocol-capture}=0A= +@section=20Note=20taking=20and=20citations:=20= @samp{org-protocol-capture}=0A+This=20one=20is=20triggered=20through=20= the=20sub-protocol=20"@samp{capture}"=20and=20consumes=20up=20to=0A+four=20= data=20fields:=0A+=0A+@example=0A+emacsclient=20= org-protocol:/capture?template=3DTEMPLATE?url=3DURL?title=3DTITLE?body=3DB= ODY=0A+@end=20example=0A+=0A+will=20pop=20up=20an=20= @emph{@strong{Capture}}=20buffer=20and=20fill=20the=20template=20with=20= the=20data=0A+submitted.=0A+=0A+To=20use=20this=20feature,=20add=20a=20= bookmark=20with=20an=20arbitrary=20name=20(e.g.=0A+"@emph{Org:=20= capture}")=20and=20enter=20this=20as=20"@samp{Location}":=0A+=0A+=0A= +@example=0A+javascript:location.href=3D'org-protocol://capture?=0A+=20=20= =20=20=20=20=20=20=20=20=20= template=3Dx&url=3D'+encodeURIComponent(window.location.href)+=0A+=20=20=20= =20=20=20=20=20=20=20=20'&title=3D'+encodeURIComponent(document.title)+=0A= +=20=20=20=20=20=20=20=20=20=20=20= '&body=3D'+encodeURIComponent(window.getSelection());@})();=0A+@end=20= example=0A+=0A+The=20result=20depends=20on=20the=20template=20used.=20= See=20@ref{org2eb70b8,=20,=20An=20example=20capture=20template}=0A= +further=20down.=0A+=0A+Note,=20that=20this=20one,=20as=20opposed=20to=20= the=20other=20two=20standard=20handlers,=20does=20not=0A+mix=20with=20= more=20parameters=20to=20emacsclient.=20All=20parameters=20but=20the=0A= +#'@samp{org-protocol://capture?...}'=20one=20will=20be=20discarded.=0A+=0A= +@anchor{org7e3d71c}=0A+=0A+@node=20Which=20capture=20template=20is=20= used?=0A+@subsection=20Which=20capture=20template=20is=20used?=0A+You=20= don't=20need=20to=20setup=20a=20capture=20template=20to=20use=20= @samp{org-protocol-capture},=0A+since=20Org-mode=20provides=20a=20= default=20template=20for=20those=20cases.=20=20Newer=20versions=0A= +provide=20an=20interactive=20interface=20for=20choosing=20a=20template.=20= =20You=20may=20provide=20a=0A+template=20to=20be=20used=20by=20= customizing=20the=20variable=0A+@samp{org-capture-default-template}=20= @footnote{Before=20commit=20= @samp{fc49c1ec96b2c789f573ae1ba936b930a8494402},=203rd=20Sept.=202010,=0A= +if=20a=20template=20with=20the=20key=20string=20"@samp{w}"=20was=20= defined,=20this=20one=20was=20chosen=20by=0A+default.=20=20This=20was=20= done=20to=20make=20bookmarks=20used=20for=20= @uref{./org-annotation-helper.el,=20org-annotation-helper}=20work=0A= +without=20changing=20the=20template.}.=0A+=0A+The=20problem=20with=20= this=20solution=20would=20be,=20that=20only=20one=20template=20can=20be=20= used=0A+with=20the=20fuction.=20If=20this=20approach=20fit=20your=20= needs=20you=20might=20omit=0A+the=20@samp{template}=20parameter=20in=20= the=20@ref{org6223309,=20,=20example=20above}.=0A+=0A+=0A= +@anchor{org2eb70b8}=0A+=0A+@enumerate=0A+@item=0A+An=20example=20= capture=20template=0A+=0A+@lisp=0A+(setq=20org-capture-templates=0A+=20=20= =20=20=20=20(quote=0A+=20=20=20=20=20=20=20(("w"=0A+=09=20"Default=20= template"=0A+=09=20entry=0A+=09=20(file+headline=20"~/org/capture.org"=20= "Notes")=0A+=09=20"*=20%^@{Title@}\n\n=20=20Source:=20%u,=20%c\n\n=20=20= %i"=0A+=09=20:empty-lines=201)=0A+=09;;=20...=20more=20templates=20here=20= ...=0A+=09)))=0A+@end=20lisp=0A+=0A+@table=20@asis=0A+@item=20"@samp{w}"=0A= +makes=20this=20one=20the=20default=20template=20used=20for=0A= +"@samp{org-protocol://capture://}"=20URLs.=0A+@item=20@samp{entry}=0A= +makes=20it=20a=20regular=20entry=20with=20a=20headline.=0A+@item=20= @samp{file+headline}=0A+files=20the=20note=20in=20file=20= "@samp{~/org/capture.org}"=20as=20child=20of=0A+the=20headline=20= "@samp{Notes}"=0A+@item=20'@samp{%c}'=0A+will=20be=20replaced=20by=20an=20= Org-link=20pointing=20to=20the=20location=20of=20the=0A+page=20you=20= have=20been=20visiting=20when=20clicking=20on=20the=20link.=20The=20page=0A= +title=20will=20be=20the=20link's=20description.=0A+@item=20'@samp{%i}'=0A= +will=20be=20replaced=20by=20the=20selected=20text=20in=20your=20browser=20= window=20if=0A+any.=0A+@end=20table=0A+=0A+In=20addition,=20you=20may=20= use=20the=20following=20placeholders=20in=20your=20template:=0A+=0A= +@multitable=20{aaaaaaaaaaaaaaa}=20{aaaaaaaaaaaaaaaaaaaaaaaaa}=0A= +@headitem=20Placeholders=0A+@tab=20Replacement=0A+@item=20@samp{%:link}=0A= +@tab=20URL=20of=20the=20web-page=0A+@item=20@samp{%:description}=0A= +@tab=20The=20title=20of=20the=20web-page=0A+@item=20@samp{%:initial}=0A= +@tab=20Selected=20text.=0A+@end=20multitable=0A+=0A+You=20may=20read=20= more=20about=20templates=20and=20their=20special=20escape=20characters=20= in=20the=0A= +@uref{http://orgmode.org/manual/Capture-templates.html#Capture-templates,= =20Org-mode=20manual}.=0A+=0A+=0A+@anchor{org897a9c6}=0A+@end=20= enumerate=0A+=0A+@node=20Org-protocol-remember=0A+@subsection=20= Org-protocol-remember=0A+The=20@samp{org-protocol-remember}=20handler=20= is=20now=20obsolete.=20=20However,=20the=20handler=20is=0A+still=20= available=20for=20backward=20compatibility.=20=20To=20use=20this=20= handler,=20closely=0A+follow=20the=20setup=20for=20the=20current=20= @samp{org-protocol-capture}=20handler,=20and=20simply=0A+replace=20each=20= occurrence=20of=20@emph{capture}=20with=20@emph{remember}.=0A+=0A+As=20= remember=20templates=20look=20slightly=20different=20than=20capture=20= templates,=20we=0A+provide=20an=20example=20here.=0A+=0A= +@anchor{org8b49459}=0A+=0A+@enumerate=0A+@item=0A+An=20example=20= remember=20template=0A+=0A+@lisp=0A+(setq=20org-remember-templates=0A+=20= =20=20=20=20=20'((?w=20"*=20%^@{Title@}\n\n=20=20Source:=20%u,=20%c\n\n=20= =20%i"=20nil=20"Notes")))=0A+@end=20lisp=0A+=0A+@table=20@asis=0A+@item=20= '@samp{?w}'=0A+makes=20this=20one=20the=20default=20template=20used=20= for=0A+"@samp{org-protocol://remember://}"=20URLs.=0A+@item=20= '@samp{%c}'=0A+will=20be=20replaced=20by=20an=20Org-link=20pointing=20to=20= the=20location=20of=20the=0A+page=20you=20have=20been=20visiting=20when=20= clicking=20on=20the=20link.=20The=20page=0A+title=20will=20be=20the=20= link's=20description.=0A+@item=20'@samp{%i}'=0A+will=20be=20replaced=20= by=20the=20selected=20text=20in=20your=20browser=20window=20if=0A+any.=0A= +@end=20table=0A+=0A+In=20addition,=20you=20may=20use=20the=20following=20= placeholders=20in=20your=20template:=0A+=0A+@multitable=20= {aaaaaaaaaaaaaaa}=20{aaaaaaaaaaaaaaaaaaaaaaaaa}=0A+@headitem=20= Placeholders=0A+@tab=20Replacement=0A+@item=20@samp{%:link}=0A+@tab=20= URL=20of=20the=20web-page=0A+@item=20@samp{%:description}=0A+@tab=20The=20= title=20of=20the=20web-page=0A+@item=20@samp{%:initial}=0A+@tab=20= Selected=20text.=0A+@end=20multitable=0A+=0A+You=20may=20read=20more=20= about=20templates=20and=20their=20special=20escape=20characters=20in=20= the=0A= +@uref{http://orgmode.org/manual/Capture-templates.html#Capture-templates,= =20Org-mode=20manual}.=0A+=0A+@anchor{org19b05e1}=0A+@end=20enumerate=0A= +=0A+@menu=0A+*=20Which=20capture=20template=20is=20used?::=0A+*=20= Org-protocol-remember::=0A+@end=20menu=0A+=0A+@node=20Edit=20published=20= content=20@samp{org-protocol-open-source}=0A+@section=20Edit=20published=20= content:=20@samp{org-protocol-open-source}=0A+This=20one=20was=20= designed=20to=20help=20with=20opening=20sources=20for=20editing=20when=20= browsing=0A+in=20the=20first=20place.=20@samp{org-protocol-open-source}=20= uses=20the=20custom=20variable=0A+@samp{org-protocol-project-alist}=20to=20= map=20URLs=20to=20(local)=20filenames.=0A+=0A+Let's=20take=20= @uref{http://orgmode.org/worg/}=20as=20our=20example.=0A+=0A+Our=20= intention=20is=20to=20click=20a=20bookmark=20(or=20link)=20to=20open=20= the=20source=20of=20the=0A+published=20file=20we=20are=20reading=20in=20= our=20favourite=20editor.=20The=20bookmark-URL=20above=0A+could=20be=20= used=20again.=20But=20since=20@samp{org-protocol-open-source}=20regards=20= the=20first=0A+field=20only,=20this=20here=20will=20do:=0A+=0A+@example=0A= +javascript:location.href=3D'org-protocol://open-source://'+encodeURICompo= nent(location.href)=0A+@end=20example=0A+=0A+To=20open=20files=20= published=20on=20Worg=20locally,=20@samp{org-protocol-project-alist}=20= should=20look=0A+like=20this=20(you=20may=20skip=20the=20second=20= project):=0A+=0A+@lisp=0A+(setq=20org-protocol-project-alist=0A+=20=20=20= =20=20=20'(("Worg"=0A+=09=20:base-url=20"http://orgmode.org/worg/"=0A+=09= =20:working-directory=20"/home/user/worg/"=0A+=09=20:online-suffix=20= ".html"=0A+=09=20:working-suffix=20".org")=0A+=09("My=20local=20= Org-notes"=0A+=09=20:base-url=20"http://localhost/org/"=0A+=09=20= :working-directory=20"/home/user/org/"=0A+=09=20:online-suffix=20".php"=0A= +=09=20:working-suffix=20".org")))=0A+@end=20lisp=0A+=0A+If=20you're=20= now=20browsing=20= @uref{http://orgmode.org/worg/org-contrib/org-protocol.html}=0A+and=20= find=20a=20typo=20or=20have=20an=20idea=20how=20to=20enhance=20the=20= documentation,=20simply=20click=0A+the=20bookmark=20and=20start=20= editing.=0A+=0A+=0A+If=20you=20are=20using=20hugo=20to=20publish=20Org=20= files.=20The=20configuration=20is=0A+slightly=20differnet=20as=20you=20= have=20to=20name=20the=20whole=20filename=20of=20@samp{index.org}.=0A+If=20= you=20clone=20the=20repo=20given=20in=20the=20example=20below=20you=20= could=20you=20try=20out=20the=20following:=0A+@lisp=0A+("Hugo=20based=20= MobileOrg=20Documentation=20Site"=0A+=20:base-url=20= "https://mobileorg.github.io/"=0A+=20:working-directory=20= "~/Documents/Github/MobileOrg/mobileorg.github.io/content/"=0A+=20= :online-suffix=20".html"=0A+=20:working-suffix=20"index.org")=0A+@end=20= lisp=0A+=0A+For=20blogs=20and=20date-style=20URI=20please=20see=20= @ref{orgc5ad545,=20,=20Handle=20rewritten=20URLs}=0A+=0A+=0A+There=20are=20= two=20functions=20to=20help=20you=20fill=20= @samp{org-protocol-project-alist}=20with=0A+valid=20contents.=20One=20= possibility=20is=20@samp{org-protocol-create}=20that=20guides=20you=20= through=0A+the=20process.=20If=20you're=20editing=20an=20Org-mode=20file=20= that=20is=20part=20of=20a=20publishing=0A+project=20in=20= @samp{org-publish-project-alist},=20try=0A+=0A+@example=0A+M-x=20= org-protocol-create-for-org=20RET=0A+@end=20example=0A+=0A= +@anchor{orgc5ad545}=0A+=0A+@node=20Handle=20rewritten=20URLs=0A= +@subsection=20Handle=20rewritten=20URLs=0A+In=20some=20cases,=20= replacing=20@samp{:base-url}=20with=20@samp{:working-directory}=20and=0A= +@samp{:online-suffix}=20with=20@samp{:working-suffix}=20will=20not=20= yield=20the=20desired=20results.=0A+=0A+Suppose=20you=20maintain=20an=20= online=20store=20located=20at=20@samp{http://example.com/}.=20The=0A= +local=20sources=20reside=20in=20@samp{/home/user/example/}.=20While=20= most=20of=20the=20URLs=20map=0A+directly=20to=20local=20file=20names=20= by=20stripping=20URL=20parameters=20from=20the=20end=20and=0A+replacing=20= the=20@samp{:base-url}=20with=20@samp{:working-diretory}=20and=20= @samp{:online-suffix}=20with=0A+@samp{:working-suffix},=20this=20might=20= not=20work=20for=20rewritten=20URLs.=20It's=20common=0A+practice=20to=20= serve=20all=20products=20in=20such=20a=20store=20through=20one=20file=20= and=20rewrite=0A+URLs=20that=20do=20not=20match=20an=20existing=20file=20= on=20the=20server.=0A+=0A+That=20way,=20a=20request=20to=20= @samp{http://example.com/print/posters-A4.html}=20might=20be=0A= +rewritten=20on=20the=20server=20to=20something=20like=0A= +@samp{http://example.com/shop/products.php/posters-A4.html.php},=20= where=0A+@samp{/posters-A4-digital.html.php}=20is=20the=20so=20called=20= path=20info.=20Note=20that=20the=0A+browser=20will=20not=20notice=20the=20= rewrite.=0A+=0A+If=20you=20now=20click=20your=20= @samp{org-protocol://open-source://}=20bookmark,=20the=20handler=0A+will=20= probably=20not=20find=20a=20file=20named=0A= +@samp{/home/user/example/print/posters-A4.html.php}=20and=20fail.=0A+=0A= +Or,=20even=20more=20simple,=20assume=20you're=20browsing=20= @samp{http://example.com/}.=20A=20file=0A+named=20= @samp{/home/user/example/.php}=20is=20not=20likely=20to=20exist.=0A+=0A= +Since=20Org-mode=20commit=20= @samp{69b46e10aab3b2374ecbc1a963ba56e77102a9a4}=20from=2015th=0A+Nov.=20= 2009,=20such=20an=20entry=20in=20@samp{org-protocol-project-alist}=20may=20= hold=20an=0A+additional=20property=20@samp{:rewrites}.=20This=20property=20= is=20a=20list=20of=20cons=20cells,=20each=0A+of=20which=20maps=20a=20= regular=20expression=20to=20a=20path=20relative=20to=20the=0A= +@samp{:working-directory}.=0A+=0A+Now=20map=20the=20URL=20to=20the=20= path=20@samp{/home/user/example/products.php}=20by=20adding=20the=0A= +@samp{:rewrites}=20property=20like=20this:=0A+=0A+@lisp=0A+(setq=20= org-protocol-project-alist=0A+=20=20=20=20=20'(("example.com"=0A+=09= :base-url=20"http://example.com/"=0A+=09:working-directory=20= "/home/user/example/"=0A+=09:online-suffix=20".php"=0A+=09= :working-suffix=20".php"=0A+=09:rewrites=20(("example.com/print/"=20.=20= "products.php")=0A+=09=09=20=20=20("example.com/$"=20.=20"index.php"))=0A= +=09)))=0A+@end=20lisp=0A+=0A+Guess=20what=20the=20second=20= @samp{:rewrites}=20element=20does.=20Since=20@samp{example.com/$}=20is=20= used=20as=0A+a=20regular=20expression,=20it=20maps=20= @samp{http://example.com/},=20@samp{https://example.com},=0A= +@samp{http://www.example.com/}=20and=20similar=20to=20= @samp{/home/user/example/index.php}.=0A+=0A+If=20you=20are=20using=20= date=20style=20URLs=20like=20= @samp{https://cool-blog.com/2017/05/20/cool-post/},=0A+the=20following=20= setup=20could=20be=20useful.=0A+=0A+@lisp=0A+(setq=20= org-protocol-project-alist=0A+=20=20'(("Icarus=20based=20blog"=0A+=20=20=20= =20=20:base-url=20"https://cool-blog.com/"=0A+=20=20=20=20=20= :working-directory=20= "~/MyBlog/themes/hugo-icarus-theme/exampleSite/content/post/"=0A+=20=20=20= =20=20:online-suffix=20".html"=0A+=20=20=20=20=20:working-suffix=20= ".org"=20;;=20or=20".md"=0A+=20=20=20=20=20:rewrites=20= (("\\(https://cool-blog.com/[0-9]+/[0-9]+/[0-9]+/\\)"=20.=20".org"))=0A+=20= =20=20=20=20)))=0A+@end=20lisp=0A+=0A+The=20@samp{:rewrites}=20are=20= searched=20as=20a=20last=20resort=20if=20and=20only=20if=20no=20existing=20= file=0A+name=20is=20matched.=0A+=0A+@menu=0A+*=20Handle=20rewritten=20= URLs::=0A+@end=20menu=0A+=0A+@node=20Other=20browsers=0A+@section=20= Other=20browsers=0A+#@anchor{org7b66bec}=0A+=0A+@node=20Conkeror=20setup=0A= +@subsection=20Conkeror=20setup=0A+Setting=20up=20org-protocol=20in=20= @uref{http://conkeror.org/,=20Conkeror}=20(an=20emacs=20inspired=20= Mozilla=20web=0A+browser)=20requires=20a=20slightly=20different=20= method.=20You=20may=20simply=20add=20the=0A+following=20snippets=20of=20= code=20to=20your=20.conkerorrc=20file.@footnote{Adapted=20from=20Tassilo=20= Horn's=20blog,=20"Calling=0A+org-remember=20from=20inside=20conkeror,"=20= November=2014,=202008.=0A= +@uref{http://tsdh.wordpress.com/2008/11/14/calling-org-remember-from-insi= de-conkeror/}}=0A+Please=20note=20that=20the=20URIs=20used=20are=20of=20= the=20old=20style=20before=20Org=0A+9.0.=20You=20might=20want=20to=20= change=20them=20to=20the=20new=20style.=0A+=0A+For=20org-store-link,=20= add=20the=20following=20to=20.conkerorrc:=0A+=0A+@example=0A+function=20= org_store_link=20(url,=20title,=20window)=20@{=0A+=20=20=20=20var=20= cmd_str=20=3D=20'emacsclient=20= \"org-protocol://store-link://'+url+'/'+title+'\"';=0A+=20=20=20=20if=20= (window=20!=3D=20null)=20@{=0A+=09window.minibuffer.message('Issuing=20'=20= +=20cmd_str);=0A+=20=20=20=20@}=0A+=20=20=20=20= shell_command_blind(cmd_str);=0A+@}=0A+=0A+interactive("org-store-link",=20= "Stores=20[[url][title]]=20as=20org=20link=20and=20copies=20url=20to=20= emacs=20kill=20ring",=0A+=09=20=20=20=20function=20(I)=20@{=0A+=09=09= org_store_link(encodeURIComponent(I.buffer.display_uri_string),=20= encodeURIComponent(I.buffer.document.title),=20I.window);=0A+=09=20=20=20= =20@});=0A+@end=20example=0A+=0A+For=20org-capture=20(or=20org-remember=20= ---=20just=20exchange=20@emph{capture}=20with=20@emph{remember}),=20use=0A= +the=20following:=0A+=0A+@example=0A+function=20org_capture=20(url,=20= title,=20selection,=20window)=20@{=0A+=20=20=20=20var=20cmd_str=20=3D=20= 'emacsclient=20= \"org-protocol://capture://'+url+'/'+title+'/'+selection+'\"';=0A+=20=20=20= =20if=20(window=20!=3D=20null)=20@{=0A+=09= window.minibuffer.message('Issuing=20'=20+=20cmd_str);=0A+=20=20=20=20@}=0A= +=20=20=20=20shell_command_blind(cmd_str);=0A+@}=0A+=0A= +interactive("org-capture",=20"Clip=20url,=20title,=20and=20selection=20= to=20capture=20via=20org-protocol",=0A+=09=20=20=20=20function=20(I)=20= @{=0A+=09=09org_capture(encodeURIComponent(I.buffer.display_uri_string),=20= encodeURIComponent(I.buffer.document.title),=20= encodeURIComponent(I.buffer.top_frame.getSelection()),=20I.window);=0A+=09= =20=20=20=20@});=0A+@end=20example=0A+=0A+Now,=20you=20should=20be=20= able=20to=20invoke=20the=20commands=20from=20within=20conkeror=0A+with=20= @samp{M-x=20org-store-link}=20and=20@samp{M-x=20org-capture}=20(or=20= remember).=0A+=0A+Or,=20if=20you'd=20like=20your=20familiar=20emacs=20= keybindings,=20you=20can=20add=20the=0A+following=20to=20your=20= .conkerorrc:=0A+=0A+@example=0A+define_key(content_buffer_normal_keymap,=20= "C-c=20r",=20"org-capture");=0A+define_key(content_buffer_normal_keymap,=20= "C-c=20l",=20"org-store-link");=0A+@end=20example=0A+=0A+@node=20Uzbl=0A= +@subsection=20Uzbl=0A+Uzbl=20is=20a=20minimalistic=20webkit=20browser=20= for=20Unix/Linux.=0A+=0A+@itemize=0A+@item=0A= +@uref{http://www.uzbl.org/}=0A+@end=20itemize=0A+=0A+You=20can=20pass=20= encoded=20url=20data=20from=20uzbl=20to=20org-protocol=20by=20adding=20= the=0A+following=20lines=20to=20@samp{.config/uzbl/config}.=0A+=0A= +@example=0A+=0A+#=20Org-protocol=0A+=0A+@@cbind=20=09\\r=20=3D=20sh=20= 'emacsclient=20= "org-protocol://capture://\@@\@@= /\@@\@@/\@@\@= @"'=0A+@@cbind=20=09\\l=20=3D=20sh=20'emacsclient=20= "org-protocol://capture://\@@\@@= /\@@\@@"'=0A+=0A+@end=20example=0A+=0A= +These=20bind=20org-protocol-capture=20and=20org-store-line=20to=20""=20= and=20""=20respectively.=0A+=0A+@anchor{org3e33b3e}=0A+=0A+@node=20= Keybindings=20for=20Firefox=0A+@subsection=20Keybindings=20for=20Firefox=0A= +Please=20note=20that=20the=20URIs=20used=20are=20of=20the=20old=20style=20= before=20Org=0A+9.0.=20You=20might=20want=20to=20change=20them=20to=20= the=20new=20style.=0A+=0A+You=20can=20add=20key=20bindings=20for=20the=20= @samp{org-protocol}=20commands=20using=20the=20keyconfig=0A+Firefox=20= extension.=0A+=0A+First,=20install=20keyconfig=20from=20= @uref{http://mozilla.dorando.at/keyconfig.xpi}.=0A+=0A+Open=20the=20= keyconfig=20dialog=20by=20going=20to=20Tools=20and=20then=20Keyconfig.=0A= +=0A+Click=20the=20'Add=20a=20new=20Key'=20button.=20Enter=20"Org=20= store=20link"=20as=20the=20name.=0A+Enter=20the=20following=20in=20the=20= box=20with=20@emph{*=20CODE=20*}=20in=20it:=0A+=0A+@example=0A+var=20= orgProtoString=20=3D=20'org-protocol://store-link://'+=0A+=20=20= encodeURIComponent(gBrowser.currentURI.spec)=20+=20'/'=20+=0A+=20=20= encodeURIComponent(gBrowser.contentWindow.document.title)=20+=20'/'=20+=0A= +=20=20encodeURIComponent(gBrowser.contentWindow.getSelection());=0A+=0A= +gBrowser.loadURI(orgProtoString);=0A+@end=20example=0A+=0A+Click=20OK.=20= You=20will=20then=20need=20to=20bind=20a=20key=20by=20clicking=20in=20= the=20box=20next=20to=20the=0A+'Apply'=20button=20and=20pressing=20= whatever=20key=20combination=20you=20want.=20Click=20'Apply'=20to=0A= +store=20the=20keybinding.=0A+=0A+Repeat=20the=20steps,=20but=20call=20= the=20next=20key=20"Org=20capture"=20and=20use=20the=20code=20below:=0A+=0A= +@example=0A+var=20orgProtoString=20=3D=20'org-protocol://capture://'+=0A= +=20=20encodeURIComponent(gBrowser.currentURI.spec)=20+=20'/'=20+=0A+=20=20= encodeURIComponent(gBrowser.contentWindow.document.title)=20+=20'/'=20+=0A= +=20=20encodeURIComponent(content.window.getSelection());=0A+=0A= +gBrowser.loadURI(orgProtoString);=0A+@end=20example=0A+=0A+Click=20= Close,=20then=20OK,=20and=20then=20restart=20Firefox.=20You=20should=20= then=20be=20able=20to=0A+access=20the=20org-protocol=20functions=20with=20= your=20chosen=20keys.=0A+=0A+@anchor{orgcd7acf4}=0A+=0A+@menu=0A+*=20= Conkeror=20setup::=0A+*=20Uzbl::=0A+*=20Keybindings=20for=20Firefox::=0A= +@end=20menu=0A+=0A+@node=20Screencast=20small=20introduction=20to=20= org-protocolel=0A+@section=20Screencast:=20small=20introduction=20to=20= org-protocol.el=0A+@html=0A+=0A+@end=20html=0A+=0A+This=20screencast=20= shows=20off=20some=20nice=20things=20you=20can=20do=20with=20Firefox,=0A= +Emacs,=20Org-mode=20and=20org-protocol.el.=0A+=0A+It=20first=20shows=20= how=20to=20create=20two=20bookmarklets,=20@samp{org-capture}=20and=0A= +@samp{org-store-link}.=20These=20bookmarklets=20enable=20your=20Firefox=20= to=20talk=20to=0A+emacsclient=20via=20a=20new=20protocol=20= (@samp{org-protocol://});=20emacsclient=20then=0A+parses=20the=20request=20= and=20tells=20Emacs=20to=20capture=20or=20store=20stuff=20at=20the=0A= +relevant=20places=20in=20your=20Org=20files.=0A+=0A+At=20the=20end=20of=20= the=20screencast,=20we=20create=20two=20ubiquity=20commands=20from=20= these=0A+bookmarklets.=20=20Now=20in=20Firefox=20@samp{ALT-SPC=20= org-capture=20RET}=20creates=20a=20note=0A+in=20my=20Org=20files.=0A=20=0A= =20@node=20Refile=20and=20copy=0A=20@section=20Refile=20and=20copy=0A--=20= =0A2.11.0=20(Apple=20Git-81)=0A=0A= --Apple-Mail=_EAE12C8F-8D72-47F1-9CD6-078F0E8ED707 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Kind regards Mario =E2=80=94=20 --Apple-Mail=_EAE12C8F-8D72-47F1-9CD6-078F0E8ED707--