all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* windows setup for emacsclient
@ 2008-03-12 16:36 rustom
  2008-03-16  5:27 ` B. T. Raven
  0 siblings, 1 reply; 4+ messages in thread
From: rustom @ 2008-03-12 16:36 UTC (permalink / raw)
  To: help-gnu-emacs

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: windows setup for emacsclient
  2008-03-12 16:36 windows setup for emacsclient rustom
@ 2008-03-16  5:27 ` B. T. Raven
  2008-03-17  7:55   ` rustom
  0 siblings, 1 reply; 4+ messages in thread
From: B. T. Raven @ 2008-03-16  5:27 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: windows setup for emacsclient
  2008-03-16  5:27 ` B. T. Raven
@ 2008-03-17  7:55   ` rustom
  2008-03-17 14:14     ` Chris McMahan
  0 siblings, 1 reply; 4+ messages in thread
From: rustom @ 2008-03-17  7:55 UTC (permalink / raw)
  To: help-gnu-emacs

On Mar 16, 10:27 am, "B. T. Raven" <ni...@nihilo.net> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: windows setup for emacsclient
  2008-03-17  7:55   ` rustom
@ 2008-03-17 14:14     ` Chris McMahan
  0 siblings, 0 replies; 4+ messages in thread
From: Chris McMahan @ 2008-03-17 14:14 UTC (permalink / raw)
  To: help-gnu-emacs

rustom <rustompmody@gmail.com> writes:

> On Mar 16, 10:27 am, "B. T. Raven" <ni...@nihilo.net> 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
  =================================================


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-03-17 14:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-12 16:36 windows setup for emacsclient rustom
2008-03-16  5:27 ` B. T. Raven
2008-03-17  7:55   ` rustom
2008-03-17 14:14     ` Chris McMahan

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.