From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: emacsclientw on w64 Date: Sun, 30 Sep 2012 08:58:09 +0200 Message-ID: <83pq54dmke.fsf@gnu.org> References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1348988302 10407 80.91.229.3 (30 Sep 2012 06:58:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Sep 2012 06:58:22 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 30 08:58:27 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TIDTp-0005Qq-JX for geh-help-gnu-emacs@m.gmane.org; Sun, 30 Sep 2012 08:58:21 +0200 Original-Received: from localhost ([::1]:57582 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIDTk-0005jD-7q for geh-help-gnu-emacs@m.gmane.org; Sun, 30 Sep 2012 02:58:16 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIDTe-0005iw-Ee for help-gnu-emacs@gnu.org; Sun, 30 Sep 2012 02:58:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TIDTd-0003ok-1f for help-gnu-emacs@gnu.org; Sun, 30 Sep 2012 02:58:10 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:40457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIDTc-0003nP-Pt for help-gnu-emacs@gnu.org; Sun, 30 Sep 2012 02:58:08 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MB500B00HYHN800@a-mtaout20.012.net.il> for help-gnu-emacs@gnu.org; Sun, 30 Sep 2012 08:58:06 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MB500BV6I0TM610@a-mtaout20.012.net.il> for help-gnu-emacs@gnu.org; Sun, 30 Sep 2012 08:58:06 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.166 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87002 Archived-At: > From: "B. T. Raven" > Date: Sat, 29 Sep 2012 17:21:38 -0500 > > I used to diddle with registry to get emacsclientw to work on w2000 but > am afraid to do that on w64. I found this .bat file on web along with > instructions to convert it to runemacsclientw.exe > > @echo off > :: Emacs binaries... > set binpath=c:\Program Files\emacs\bin ;; my binpath is directly in c:\ > :: emacs\bin If no arg is given set filename to c:\ ;; why directory :: > instead of file? > > if "%~1"=="" ( > set filename=c:\ > ) else ( > set filename=%~1 > ) > :: Run Emacsclient > "%binpath%\emacsclientw.exe" --no-wait > --alternate-editor="%binpath%\runemacs.exe" "%filename%" Why do you need all this tinkering? Just use the "normal" Windows way of associating files with a program. That is: . right-click on a file in Explorer and select "Open" . click "Select the program from a list" . if emacsclientw.exe is in the list, select it . if emacsclientw.exe is not already in the list, click Browse and navigate to emacsclientw.exe . check the "Always use the selected program" checkbox . click OK Repeat the above for every file type you want to open with Emacs. That's it.