* emacsclientw on w64
@ 2012-09-29 22:21 B. T. Raven
2012-09-30 6:58 ` Eli Zaretskii
[not found] ` <mailman.9993.1348988293.855.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 8+ messages in thread
From: B. T. Raven @ 2012-09-29 22:21 UTC (permalink / raw)
To: help-gnu-emacs
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%"
After associating some file extensions with it (.bat .txt and a few
others) I ran it a few times and it worked for a while and then caused a
rotating blue circle of death (had to logoff and restart windows).
Security properties on appdata\roaming\.emacs.d\server are full control
for admin, system, and me. On the runemacsclientw.exe in emacs/bin only
admin and system have full control. What do I need to do to get this to
work? It seems like a safer method of running emacsclientw than directly
through registry editing.
tnx,
Ed
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: emacsclientw on w64
2012-09-29 22:21 emacsclientw on w64 B. T. Raven
@ 2012-09-30 6:58 ` Eli Zaretskii
[not found] ` <mailman.9993.1348988293.855.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2012-09-30 6:58 UTC (permalink / raw)
To: help-gnu-emacs
> From: "B. T. Raven" <btraven@nihilo.net>
> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: emacsclientw on w64
[not found] ` <mailman.9993.1348988293.855.help-gnu-emacs@gnu.org>
@ 2012-09-30 18:36 ` B. T. Raven
2012-09-30 22:02 ` Eli Zaretskii
2012-10-01 0:54 ` Jason Rumney
0 siblings, 2 replies; 8+ messages in thread
From: B. T. Raven @ 2012-09-30 18:36 UTC (permalink / raw)
To: help-gnu-emacs
Zaretskii <eliz@gnu.org> scripsit:
>> From: "B. T. Raven" <btraven@nihilo.net>
>> 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.
>
Thanks, Eli but I think that there might be more to it than that at
least on my system. After doing that I see:
No socket or alternate editor. Please use:
EMACS_SERVER_FILE
and
ALTERNATE_EDITOR-FILE
(either user or system environment variables)
I think I want ALTERNATE_EDITOR=c:\emacs\bin\runemacs --debug-init
but I'm not sure. Can runemacs.exe take switches like emacs.exe? What
EMACS_SERVER_FILE should be set to I don't know.
Is my problem that I didn't install Emacs (still on ver. 23.3) in
Windows Programs? Could there be PATH problems related to that? I do
have (server-start) at the end of my .emacs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: emacsclientw on w64
2012-09-30 18:36 ` B. T. Raven
@ 2012-09-30 22:02 ` Eli Zaretskii
2012-10-01 0:54 ` Jason Rumney
1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2012-09-30 22:02 UTC (permalink / raw)
To: help-gnu-emacs
> From: "B. T. Raven" <btraven@nihilo.net>
> Date: Sun, 30 Sep 2012 13:36:56 -0500
>
> Thanks, Eli but I think that there might be more to it than that at
> least on my system. After doing that I see:
>
> No socket or alternate editor. Please use:
>
> EMACS_SERVER_FILE
> and
> ALTERNATE_EDITOR-FILE
> (either user or system environment variables)
You didn't turn on the Emacs server, that's why.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: emacsclientw on w64
2012-09-30 18:36 ` B. T. Raven
2012-09-30 22:02 ` Eli Zaretskii
@ 2012-10-01 0:54 ` Jason Rumney
2012-10-01 3:28 ` B. T. Raven
1 sibling, 1 reply; 8+ messages in thread
From: Jason Rumney @ 2012-10-01 0:54 UTC (permalink / raw)
To: help-gnu-emacs
On Monday, 1 October 2012 02:37:10 UTC+8, B. T. Raven wrote:
>
> No socket or alternate editor. Please use:
>
> EMACS_SERVER_FILE
> and
There is no "and" here.
> ALTERNATE_EDITOR-FILE
> (either user or system environment variables)
> I think I want ALTERNATE_EDITOR=c:\emacs\bin\runemacs --debug-init
> but I'm not sure. Can runemacs.exe take switches like emacs.exe? What
> EMACS_SERVER_FILE should be set to I don't know.
runemacs.exe passes its command-line to emacs.exe, so command line switches should work.
Don't set EMACS_SERVER_FILE at all unless you customized server-name in Emacs. The error message does not explicitly state it, but you only need to do one of the things it is suggesting to resolve the problem of emacsclient not communicating with emacs. ALTERNATE_EDITOR will always work, EMACS_SERVER_FILE will work if a different server-name is the cause of the problem.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: emacsclientw on w64
2012-10-01 0:54 ` Jason Rumney
@ 2012-10-01 3:28 ` B. T. Raven
2012-10-01 7:22 ` Eli Zaretskii
[not found] ` <mailman.10052.1349076148.855.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 8+ messages in thread
From: B. T. Raven @ 2012-10-01 3:28 UTC (permalink / raw)
To: help-gnu-emacs
> On Monday, 1 October 2012 02:37:10 UTC+8, B. T. Raven wrote:
>
>>
>> No socket or alternate editor. Please use:
>>
>> EMACS_SERVER_FILE
>> and
>
> There is no "and" here.
Right you are. I was just saying there were two env. variables.
>
>> ALTERNATE_EDITOR-FILE
>
>> (either user or system environment variables)
>
>> I think I want ALTERNATE_EDITOR=c:\emacs\bin\runemacs --debug-init
>> but I'm not sure. Can runemacs.exe take switches like emacs.exe? What
>> EMACS_SERVER_FILE should be set to I don't know.
>
> runemacs.exe passes its command-line to emacs.exe, so command line switches should work.
>
> Don't set EMACS_SERVER_FILE at all unless you customized server-name in Emacs. The error message does not explicitly state it, but you only need to do one of the things it is suggesting to resolve the problem of emacsclient not communicating with emacs. ALTERNATE_EDITOR will always work, EMACS_SERVER_FILE will work if a different server-name is the cause of the problem.
>
Thanks Eli and Jason. I did have (server-start) in .emacs but it was
last statement, so if Emacs bailed out of loading .emacs before end, it
wouldn't have interpreted that form. There was an abort prompt for
missing .org file in *Messages* buffer right at session start. I assumed
that error wasn't fatal for .emacs.
I guess if I did use EMACS_SERVER_FILE it would have to be the default:
c:\Users\myusername\AppData\Roaming\.emacs.d\server\server
Anyway it seems to work now except for associating Emacs with files with
no extensions. Is this something that can be set without going into
registry? If the OS hides extensions, Emacs won't try to load an .exe
file as if it were a bare filename, would it? I couldn't get anything to
work using assoc and ftype in the black doscommand window either.
Ed
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: emacsclientw on w64
2012-10-01 3:28 ` B. T. Raven
@ 2012-10-01 7:22 ` Eli Zaretskii
[not found] ` <mailman.10052.1349076148.855.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2012-10-01 7:22 UTC (permalink / raw)
To: help-gnu-emacs
> From: "B. T. Raven" <btraven@nihilo.net>
> Date: Sun, 30 Sep 2012 22:28:03 -0500
>
> Anyway it seems to work now except for associating Emacs with files with
> no extensions.
You mean, if you ask the system to open with emacsclientw a file with
no extension, that doesn't work?
> If the OS hides extensions
The OS doesn't hide extensions. It's the Windows Explorer that does
it (and there's an option to turn that off in "Tools->Folder Options").
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: emacsclientw on w64
[not found] ` <mailman.10052.1349076148.855.help-gnu-emacs@gnu.org>
@ 2012-10-01 15:34 ` B. T. Raven
0 siblings, 0 replies; 8+ messages in thread
From: B. T. Raven @ 2012-10-01 15:34 UTC (permalink / raw)
To: help-gnu-emacs
Sorry about posting to you only, Eli. "Reply" used to do what "Followup"
now does on Thunderbird email client.
>> From: "B. T. Raven" <btraven@nihilo.net>
>> Date: Sun, 30 Sep 2012 22:28:03 -0500
>>
>> Anyway it seems to work now except for associating Emacs with files with
>> no extensions.
>
> You mean, if you ask the system to open with emacsclientw a file with
> no extension, that doesn't work?
No, I mean that I can't check the box that allows me to open all files
without extensions in emacs. Every time I want to open another one I
have to click on the emacsclient icon again. In w2000 (through a
registry entry) I could have Emacs open all such files, no more
questions asked.
>
>
>> If the OS hides extensions
>
> The OS doesn't hide extensions. It's the Windows Explorer that does
> it (and there's an option to turn that off in "Tools->Folder Options").
>
Okay. I (rightly or wrongly) take windex to be part of the os. One of
the first things I do is to turn extensions back on.
A new behavior on w64 is that "buffer whatever still has clients" when
I try to close it. Is that more evidence that I have things set up
wrong? Anyway, thanks for the help.
Ed
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-10-01 15:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-29 22:21 emacsclientw on w64 B. T. Raven
2012-09-30 6:58 ` Eli Zaretskii
[not found] ` <mailman.9993.1348988293.855.help-gnu-emacs@gnu.org>
2012-09-30 18:36 ` B. T. Raven
2012-09-30 22:02 ` Eli Zaretskii
2012-10-01 0:54 ` Jason Rumney
2012-10-01 3:28 ` B. T. Raven
2012-10-01 7:22 ` Eli Zaretskii
[not found] ` <mailman.10052.1349076148.855.help-gnu-emacs@gnu.org>
2012-10-01 15:34 ` B. T. Raven
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).