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: Chris McMahan
Subject: Re: emacs as a service
Date: Mon, 09 Mar 2009 18:01:22 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (windows-nt)

Using Windows XP and Emacs 23.0.90.1, I always launch emacs from a shell
window (rxvt running tcsh in my case) in which I've set the following
relevant envrionment variables in my .tcshrc:

setenv EDITOR "emacsclient --alternate-editor runemacs"
setenv ALTERNATE_EDITOR "runemacs"

My path also includes the emacs/bin directory...

The --alternate-editor switch is probably redundant, but that's what it
took to get it working for me.

- Chris

rustom <address@hidden> writes:

> On Mar 9, 1:39 am, "B. T. Raven" <address@hidden> 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.

-- 
     (.   .)
  =ooO=(_)=Ooo=====================================
  Chris McMahan | address@hidden
  =================================================


reply via email to

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