From: Chris McMahan <cmcmahan@one.net>
To: help-gnu-emacs@gnu.org
Subject: Re: emacs as a service
Date: Mon, 09 Mar 2009 18:01:22 -0400 [thread overview]
Message-ID: <80fxhm2w5p.fsf@one.net> (raw)
In-Reply-To: 3d277c07-a9e6-47ed-85c1-27a63290ed80@o36g2000yqh.googlegroups.com
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 <rustompmody@gmail.com> writes:
> 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.
--
(. .)
=ooO=(_)=Ooo=====================================
Chris McMahan | first_initiallastname@one.dot.net
=================================================
next prev parent reply other threads:[~2009-03-09 22:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-08 13:52 emacs as a service rustom
2009-03-08 14:08 ` Marc Tfardy
2009-03-08 20:39 ` B. T. Raven
2009-03-09 11:42 ` rustom
2009-03-09 22:01 ` Chris McMahan [this message]
[not found] <mailman.17859.1219992155.18990.help-gnu-emacs@gnu.org>
2008-08-29 6:52 ` Torsten Mueller
2008-08-29 15:06 ` Chet
2008-08-29 16:04 ` Ken Goldman
2008-08-29 16:24 ` Dan Espen
-- strict thread matches above, loose matches on Subject: below --
2008-08-29 6:42 Rustom Mody
2008-08-29 9:46 ` Nikolaj Schumacher
2008-08-29 11:41 ` Rustom Mody
2008-08-29 13:41 ` Nikolaj Schumacher
2008-08-29 14:40 ` Eli Zaretskii
2008-08-29 16:40 ` Nikolaj Schumacher
2008-08-30 10:53 ` Rustom Mody
[not found] ` <mailman.17988.1220093630.18990.help-gnu-emacs@gnu.org>
2008-09-02 18:00 ` Ken Goldman
2008-09-02 18:34 ` Richard G Riley
2008-09-02 18:42 ` Pascal J. Bourguignon
[not found] ` <mailman.17876.1220010121.18990.help-gnu-emacs@gnu.org>
2008-08-29 13:05 ` Torsten Mueller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=80fxhm2w5p.fsf@one.net \
--to=cmcmahan@one.net \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).