Geert, That's really handy, thanks. There were a few little things I needed to do to get it working on windows:
1. Adding the protocol to the browser doesn't work on windows (see http://kb.mozillazine.org/Network.protocol-handler.app.%28protocol%29) so you have to add it to the windows registry by following the instructions in http://kb.mozillazine.org/Register_protocol. The .reg file I used was like this: REGEDIT4 [HKEY_CLASSES_ROOT\remember] @="URL:remember Protocol" "URL Protocol"="" [HKEY_CLASSES_ROOT\remember\shell] [HKEY_CLASSES_ROOT\remember\shell\open] [HKEY_CLASSES_ROOT\remember\shell\open\command] @="\"C:\\Program Files\\Emacs\\site-lisp\\planner-annotation\\remember.bat\" \"%1\"" 2. I changed the shell script into a batch file called remember.bat: "c:\Program Files\Emacs\emacs\bin\emacsclient" --eval "(progn (gjk/planner-annotation-helper \"%1\" ) nil)" Regards David Lord On 25/10/2007, Geert Kloosterman <[EMAIL PROTECTED]> wrote: > Hi all, > > Ever wanted to create a planner annotation or start remember directly > from within an external web browser, say Firefox? Here's how I do it. > > I've registered special protocol handlers in the browser, > "remember://" and "annotation://". I've configured these handlers to > call a script that passes the information to a running Emacs session > using emacsclient/gnuclient. The remember/annotation handlers are > invoked through bookmarklets (bookmarks which execute JavaScript code). > > The "remember://" protocol starts M-x remember with a planner link for > the current website filled in, using the document title as the > description of the link, just like planner-w3m does. > > The "annotation://" protocol handler works similar to > `planner-annotation-as-kill': it puts a planner link in the kill ring. > > An example: > > [[http://www.emacswiki.org/cgi-bin/wiki/PlannerMode][EmacsWiki: > PlannerMode]] > > I created this link by a simple click in my web browser, and of course > a yank from within Emacs. I've put the bookmarklets on a toolbar in > my browser for easy access. > > I'm using Opera myself, but I tested it to work with Firefox. > > Attached is an emacs-lisp file with the necessary lisp code and > in the comments the necessary helper script and bookmarklet code. The > file also contains some documentation. > > The helper script either needs a recent emacsclient that can evaluate > lisp forms (Emacs 22+) or gnuclient. Of course you will need to have > emacs-server or gnuserv running. > > In summary, to use all this: > > - make sure the lisp code is loaded by Emacs > - extract the shell script from the comments and put it somewhere > in your path (don't forget chmod +x) > - register the protocols in your browser (see lisp file for details) > - add the bookmarklets (see the lisp file) to your browser > - click on the bookmarklets and enjoy :-) > > I'm using this for quite some time now, I hope you will find this > useful too. > > Best, > Geert > > > _______________________________________________ > Planner-el-discuss mailing list > [email protected] > https://mail.gna.org/listinfo/planner-el-discuss > > > _______________________________________________ Planner-el-discuss mailing list [email protected] https://mail.gna.org/listinfo/planner-el-discuss
