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: windows setup for emacsclient Date: Mon, 17 Mar 2008 10:14:45 -0400 Organization: PANIX Public Access Internet and UNIX, NYC Message-ID: References: <2YidnVdFUe41PEHanZ2dnUVZ_ournZ2d@sysmatrix.net> <94214c87-1b2c-48e8-b63d-302f015e54d6@s8g2000prg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205764857 16771 80.91.229.12 (17 Mar 2008 14:40:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Mar 2008 14:40:57 +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 17 15:41:22 2008 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 1JbGWW-00042Y-83 for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Mar 2008 15:41:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JbGVw-0002WR-Dx for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Mar 2008 10:40:36 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!panix!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 102 Original-NNTP-Posting-Host: panix5.panix.com Original-X-Trace: reader2.panix.com 1205763284 13138 166.84.1.5 (17 Mar 2008 14:14:44 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Mon, 17 Mar 2008 14:14:44 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (windows-nt) Cancel-Lock: sha1:aSMO2Be1qD1UzluFsw7kmKb8k+s= Original-Xref: shelby.stanford.edu gnu.emacs.help:157096 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:52467 Archived-At: rustom writes: > On Mar 16, 10:27 am, "B. T. Raven" wrote: >> rustom wrote: >> > What do I have to do to open a file with emacsclient in windows? >> >> > Yeah I know one must first start emacs with server-start -- I am >> > wondering about the more windows-y part. I am, say, in windows >> > explorer and want to right-click file and choose open in emacsclient. >> > I can even do it now but I have to literally go hunting after it: >> > Shift-rt-click -> Open with ->Browse -> Program Files... -> emacs -> >> > bin -> emacsclientw -> Ok ... -> Ok >> > ...... every time the same bally-hoo. >> >> > Related to this: How to give the -n option? Because otherwise when I >> > kill that buffer emacs pops a window at me saying the client is still >> > waiting for the server or some such thing. >> >> Go to a msdos prompt and type something like: >> >> ftype emacs=c:\emacs\bin\emacsclientw.exe -n "%1" >> >> but with your appropriate path (you can call the part before = whatever >> you want) >> >> and then (for example): >> >> assoc .txt=emacs >> >> Then with regedit make a key >> >> HKEY_CLASSES_ROOT\Applications\emacsclientw.exe\shell\Open\Command >> >> with value: >> >> c:\emacs\bin\emacsclientw.exe -n "%1" >> >> with -a switch you can add an alternate editor. I have seen this set to >> /path/runemacs.exe See: >> >> http://www.emacswiki.org/cgi-bin/wiki/EmacsClient >> >> under emacsclientw for vers. 22 >> >> Also under shell (i.e) >> >> HKEY_CLASSES_ROOT\Applications\emacsclientw.exe\shell >> >> I have two names: >> >> FriendlyCache >> FrienllyCacheCTime >> >> of types REG_SZ and REG_BINARY respectively and values >> >> GNU Emacs for Windows NT/95/98/2000/ME/XP >> and >> 00 46 bf f2 04 c1 c7 01 >> >> I have no idea what they are or where they came from. >> >> You can associate other filetypes with Emacs via assoc in a dos window >> or else use Tools > Folder Options > File Types in Windows Explorer. >> >> Back up the registry before you mess with it. It is intrinsically >> dangerous to edit it manually. It may be possible to accomplish the >> above without regedit but I don't know how to do it. >> >> Ed > > Thanks for the detailed reply. But still some problems: > What Ive done is > > ftype emacs=c:\emacs22.1\bin\emacsclientw -n -a c:/emacs22.1\bin > \emacs "%1" > > assoc .txt=emacs > > Now when emacs (the server) is already running it works fine. > But if not: > 1. A box comes up saying emacsclient ERROR: connect no error > Ive to click ok to that > 2. Next a command window opens momentarily > 3. Finally emacs opens with the file > > And the command window remains open I don't know how to eliminate the dialog that pops up, and I'd also like to know! To get rid of the command window, try this: ftype emacs=c:\emacs22.1\bin\emacsclientw -n -a c:\emacs22.1\bin\runemacs "%1" Runemacs is a Windows wrapper for emacs that does away with the command window. - Chris -- (. .) =ooO=(_)=Ooo===================================== Chris McMahan | first_initiallastname@one.dot.net =================================================