From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris McMahan Newsgroups: gmane.emacs.help Subject: Re: emacs as a service Date: Mon, 09 Mar 2009 18:01:22 -0400 Organization: PANIX Public Access Internet and UNIX, NYC Message-ID: <80fxhm2w5p.fsf@one.net> References: <25226f9f-0d90-4350-99b6-eb1becce3cb2@l37g2000vba.googlegroups.com> <3d277c07-a9e6-47ed-85c1-27a63290ed80@o36g2000yqh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1236642133 7609 80.91.229.12 (9 Mar 2009 23:42:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Mar 2009 23:42:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 10 00:43:29 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lgp7w-0002Ef-87 for geh-help-gnu-emacs@m.gmane.org; Tue, 10 Mar 2009 00:43:20 +0100 Original-Received: from localhost ([127.0.0.1]:44730 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lgp6a-0005Jh-QX for geh-help-gnu-emacs@m.gmane.org; Mon, 09 Mar 2009 19:41:56 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!postnews.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad.newshosting.com!newshosting.com!198.186.194.249.MISMATCH!news-out.readnews.com!transit3.readnews.com!panix!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 74 Original-NNTP-Posting-Host: panix5.panix.com Original-X-Trace: reader1.panix.com 1236636084 13461 166.84.1.5 (9 Mar 2009 22:01:24 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Mon, 9 Mar 2009 22:01:24 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (windows-nt) Cancel-Lock: sha1:pPZsWsZSrL1tk0F8VJELY+8+w1Y= Original-Xref: news.stanford.edu gnu.emacs.help:167489 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:62794 Archived-At: 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 writes: > On Mar 9, 1:39 am, "B. T. Raven" 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 | first_initiallastname@one.dot.net =================================================