From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: rustom Newsgroups: gmane.emacs.help Subject: Re: emacs as a service Date: Mon, 9 Mar 2009 04:42:54 -0700 (PDT) Organization: http://groups.google.com Message-ID: <3d277c07-a9e6-47ed-85c1-27a63290ed80@o36g2000yqh.googlegroups.com> References: <25226f9f-0d90-4350-99b6-eb1becce3cb2@l37g2000vba.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1236636842 23221 80.91.229.12 (9 Mar 2009 22:14:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Mar 2009 22:14:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 09 23:15:19 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 1Lgnkb-0004V6-GJ for geh-help-gnu-emacs@m.gmane.org; Mon, 09 Mar 2009 23:15:09 +0100 Original-Received: from localhost ([127.0.0.1]:38844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LgnjF-0006qn-Lh for geh-help-gnu-emacs@m.gmane.org; Mon, 09 Mar 2009 18:13:45 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!o36g2000yqh.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 52 Original-NNTP-Posting-Host: 220.225.70.2 Original-X-Trace: posting.google.com 1236598975 25940 127.0.0.1 (9 Mar 2009 11:42:55 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 9 Mar 2009 11:42:55 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o36g2000yqh.googlegroups.com; posting-host=220.225.70.2; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui User-Agent: G2/1.0 X-HTTP-Via: 1.1 PT-PROXY2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:167486 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:62788 Archived-At: On Mar 9, 1:39=A0am, "B. T. Raven" wrote: > ALTERNATE_EDITOR=3DC:\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! =A0How 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.