help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: emacs as a service


From: rustom
Subject: Re: emacs as a service
Date: Mon, 9 Mar 2009 04:42:54 -0700 (PDT)
User-agent: G2/1.0

On Mar 9, 1:39 am, "B. T. Raven" <ni...@nihilo.net> wrote:
> ALTERNATE_EDITOR=C:\emacs\bin\runemacs.exe
> goes in environment
This ALTERNATE_EDITOR thing almost works but for some reason it wants
to say Connect: No error (talk of rules and exceptions :-) and then
connects.
and so for that (that message) it puts up a DOS (cmd) window which is
a pain.
I prefer .vbs to .bat mainly because of this.
>
> in HKCR hive
> */shell/open/command
> default c:\emacs\bin\emacsclientw.exe -n "%1"
>
> Applications/emacsclientw.exe/shell/open/command
> default c:\emacs\bin\emacsclientw.exe -n "%1"
>
> I think that these will propagate to the HKLM hive on startup but beware
> of manual registry surgery. At one point, when I clicked on files
> associated with Emacs in Windows Explorer, all that would happen was
> that the runemacs.exe binary would load into an emacs buffer, a
> consummation not devoutly to be wished for. Also, it's safest to make
> associations from WE with Tools>Folder Options>File Types rather than in
> the registry but you may need ./ (also in HKCR) set to something like
> ft000003, ft000002, or ft000001 for click-opening extensionless files
> (e.g. readme). I think these are automatically generated user file types
> but I can't find any documentation on them. Again beware; some system
> files don't have extensions , even parts of the registry itself.
> See:http://www.emacswiki.org/emacs/EmacsClient#toc6
>
>
>
> > Now one fragile aspect of this is that if 2 emacsservers run well the
> > system is borked!  How is the (server-start) to be enclosed in a
> > (if server-not-started-p ...) ?
>
> Is that... run well or run, well.... ;-)
:D
>
>
>
> > And one (entirely windowsy) related question:
> > How to catch the system login, logout, shutdown etc events?
> > Once I can get some script to give me some control for this I can use
> > emacsclient to do appropriate actions.
>
> I am totally out of my depth here. Don't MSwin processes with pending
> open files warn about needed actions in case of logout or shutdown?

I guess they do; but I want control before that. In particular before
shutdown I want to do some actions, before lock computer some others
after logging in some others etc.


reply via email to

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