18 January, 2011

Emacsclient Setup on Windows 7 Starter

Problem -- not starting a new instance of Emacs but reusing an Emacs already running when opening a file with a file type associated with Emacs in Windows Explorer on my netbook @home running Windows 7 Starter. I also wanted the icons of the associated file types to have the Emacs icon.

My quick fix to this was to
  • write a bat file, runemacsclientw.bat much like the example on the EmacsWiki to start emacsclientw.exe,
  • convert the bat file to exe with a simple converter,
    • choosed the above bat file as batch file,
    • checked Invisible application (don't know if this matters...),
    • under the Versioninformation tab picked an Emacs icon file from under the etc/icons path,
    • compiled, and exited,
  • fix read/execute permissions for the users group on the new exe file, runemacsclientw.exe, placed in the emacs bin directory
  • associate file types to be opened by Emacs with runemacsclientw.exe, and
  • add (server-start) to the Emacs init file, .emacs
Done, now I pinned a link to runemacsclientw.exe on the taskbar and defined an alias, emacs, for runemacsclientw.exe in my .bashrc. I run cygwin/bash on my Windows boxes.

First Post

Ok my first blog post, should be about me right? No, you can read about me on my web site http://www.adesam.se/robert/.

Instead let's talk about what I am presumably going to write about. I think it's going to be about computers, technology in general and Emacs in particular. Maybe I will find time to post notes about GTD etc as well...

Emacs -- what is it and why do I use it? It's a way of life... or as stated in Wikipedia, it's a text editor that is higly extensible and customisable. If you know a little bit of LISP one can very quickly tweak Emacs to do what you want. I use Emacs for writing papers, programming, reading/writing emails, and organising my life. Now days I am quite comfortable with Emacs, but over the years I have tried to exchange Emacs for other tools like Eclipse, Thunderbird, Mail.app, etc but I have given up. Emacs is for me, and it works basically the same way on all systems I use: Mac OS X, Windows, Linux, Solaris...