* My gnuServer notes on Win2000
@ 2003-08-10 12:36 Herb Martin
2003-08-10 13:05 ` Matthias Rempe
2003-08-12 21:08 ` kgold
0 siblings, 2 replies; 5+ messages in thread
From: Herb Martin @ 2003-08-10 12:36 UTC (permalink / raw)
I have trouble getting gnuServ gnuClient (gnuClientW)
to work (I'm new to Emacs) but this is what I found.
The 'docs' don't explain much...
Starting gnuServ manually is worthless but once you get
it working there is no need to putz around with ports and
such unless you want to change them or you want to run
it on a remote machine.
I put all the gnu* executables on my path but that didn't
help, so I shoved them into the emacs\bin directory and
found/wrote some code to make it work without having
to add THAT to the path....
I needed this snippet of code (for .emacs file):
From> Sams Teach Yourself Emacs in 24 Hours
URL> http://home.no.net/skund/emacs/emacs017.htm
Search the page for> Using gnuClient
;; start gnuserv on Windows
(if (or (eq window-system 'w32) (eq window-system 'win32))
(progn
(require 'gnuserv)
(setq server-done-function 'bury-buffer
gnuserv-frame (car (frame-list)))
(gnuserv-start)
;;; open buffer in existing frame instead of creating new one...
(setq gnuserv-frame (selected-frame))
(message "gnuserv started.")))
;; end gnuserv start on Windows
;;This was needed from the README.nt included in the distr:
(setenv "GNUSERV_SHOW_EMACS" "1"); force gnuserv to show emacs
;;But it hasn't worked yet. <frown>
Then I needed a batch file to open many files at once, e.g.,
e *.txt
e file.txt file.c file.el c:\bat\e.cmd
@REM here's the e.cmd file (on my path) - 1 line & echoes each file
@for %%a in (%*) do @echo %%a & @D:\Programs\emacs\bin\gnuclientw %%a
@REM change D:\... path for your machine
Then you can use "ftype" to set your txtfile (or whatever) to e.cmd
ftype txtfile=c:\bat\e.cmd %1
(to check the current setting you might want to just use: ftype txtile
...first.)
Or check all the txtfile types:
assoc | findstr txtfile
(sorry about the findstr, I use grep/fgrep but findstr is built-in)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: My gnuServer notes on Win2000
2003-08-10 12:36 My gnuServer notes on Win2000 Herb Martin
@ 2003-08-10 13:05 ` Matthias Rempe
2003-08-10 13:53 ` Herb Martin
2003-08-12 21:08 ` kgold
1 sibling, 1 reply; 5+ messages in thread
From: Matthias Rempe @ 2003-08-10 13:05 UTC (permalink / raw)
>>>>> "HM" == Herb Martin <news@LearnQuick.com> writes:
> I have trouble getting gnuServ gnuClient (gnuClientW) to work
> (I'm new to Emacs) but this is what I found.
> I put all the gnu* executables on my path but that didn't help,
> so I shoved them into the emacs\bin directory and found/wrote
> some code to make it work without having to add THAT to the
> path....
hmm, I have the executables in emacs\bin, too, however, I've added
emacs\bin to the Windows PATH variable.
As far as I remember, there are different versions of gnuclient (my
works with mailslots, the other with ports?). I use "gnuclient 1.7 (27
Feb 1997)", "gnuserv 1.5 (27 Feb 1997)", and "gnudoit 1.3 (27 Feb
1997)".
> I needed this snippet of code (for .emacs file):
I've nearly the same snippet, I think I got it from a post by Charles
Curley:
;; ---------------------------------------------------------------------------
;; Start GNUServ
;; ---------------------------------------------------------------------------
;; comments from C. Curley
;; start gnuserv stuff. Put it up front so you don't get into a timeout
;; problem, according to Cristian Ionescu-Idbohrn
;; <cristian.ionescu-idbohrn@axis.com>
(if (memq window-system '(win32 w32)) ; Windows NT/95
(progn
(require 'gnuserv)
(gnuserv-start)
;;; open buffer in existing frame instead of creating new one...
(setq gnuserv-frame (selected-frame))
(message "gnuserv started.")))
;; ---------------------------------------------------------------------------
In my site-lisp directory, I have gnuserv.el:
(defconst gnuserv-rcs-header-id "$Header: gnuserv.el,v 2.1a 98/10/03
14:28:00 saurian $")
I then associated files in Explorer with gnuclientw, e.g.:
txt -> open: gnuclientw.exe "%1"
Doubleclicking on a txt file then opens it in Emacs.
--
Matthias
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: My gnuServer notes on Win2000
2003-08-10 13:05 ` Matthias Rempe
@ 2003-08-10 13:53 ` Herb Martin
0 siblings, 0 replies; 5+ messages in thread
From: Herb Martin @ 2003-08-10 13:53 UTC (permalink / raw)
This fellow has a good article on it -- sort of a much better
version of my previous post (neat, formatted, more tips,
more code, etc.):
> David Vanderschel
> http://www.math.auc.dk/~dethlef/Tips/gnuserv.txt
The trick on focus is "gnuClientW -f" the -f bring the window
to the front with focus.
I added this BEFORE my "for...in...do..." loop so Emacs come
front, the files load as I watch -- and if there are no files in the
pattern, it just comes first. (He put %1 in there statically and so
when there is NO %1, it makes a %1 buffer. The for loop
covers a lot of little 'gotchas' in windows.)
@D:\Programs\emacs\bin\gnuclientw -f
@for %%a in (%*) do @echo %%a & @D:\Programs\emacs\bin\gnuclientw %%a
I add very little to the path -- if there is ONE (or two) files in a
directory,
the above batch pattern works great -- put THAT in your "bat" or "util"
directory, with either the same name as the program or a "short nickname."
David V. like Winkey from Copernic.Com and so do I -- WinKey-x is
now the quickkey for bringing Emacs front, or starting it if necessary (it's
got the full path to gnuclient -f
I try to avoid the built-in WinKeys:
Windows Key + D: Show Desktop*
Windows Key + E: Windows Explorer
Windows Key + F: Find Files or Folders...
Windows Key + M: Minimize All Windows
Windows Key + Shift+M: Undo Minimize All
Windows Key + R: Run...
Windows Key + Tab: Select Task
Windows Key + Break: System Properties
Windows Key + F1: Windows Help
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: My gnuServer notes on Win2000
2003-08-10 12:36 My gnuServer notes on Win2000 Herb Martin
2003-08-10 13:05 ` Matthias Rempe
@ 2003-08-12 21:08 ` kgold
2003-08-13 1:04 ` Herb Martin
1 sibling, 1 reply; 5+ messages in thread
From: kgold @ 2003-08-12 21:08 UTC (permalink / raw)
FWIW, I have this in my emacs for Windows, Linux, and AIX:
; gnuserv
(require 'gnuserv)
(gnuserv-start)
On Windows, running "gnuclientw" just works. On Unix, I have to start
one "emacs", and then use "gnuclient" once emacs is running.
"Herb Martin" <news@LearnQuick.com> writes:
> I have trouble getting gnuServ gnuClient (gnuClientW)
> to work (I'm new to Emacs) but this is what I found.
>
> The 'docs' don't explain much...
>
> Starting gnuServ manually is worthless but once you get
> it working there is no need to putz around with ports and
> such unless you want to change them or you want to run
> it on a remote machine.
>
> I put all the gnu* executables on my path but that didn't
> help, so I shoved them into the emacs\bin directory and
> found/wrote some code to make it work without having
> to add THAT to the path....
>
> I needed this snippet of code (for .emacs file):
> From> Sams Teach Yourself Emacs in 24 Hours
> URL> http://home.no.net/skund/emacs/emacs017.htm
> Search the page for> Using gnuClient
>
> ;; start gnuserv on Windows
> (if (or (eq window-system 'w32) (eq window-system 'win32))
> (progn
> (require 'gnuserv)
> (setq server-done-function 'bury-buffer
> gnuserv-frame (car (frame-list)))
> (gnuserv-start)
> ;;; open buffer in existing frame instead of creating new one...
> (setq gnuserv-frame (selected-frame))
> (message "gnuserv started.")))
> ;; end gnuserv start on Windows
>
> ;;This was needed from the README.nt included in the distr:
> (setenv "GNUSERV_SHOW_EMACS" "1"); force gnuserv to show emacs
> ;;But it hasn't worked yet. <frown>
>
> Then I needed a batch file to open many files at once, e.g.,
> e *.txt
> e file.txt file.c file.el c:\bat\e.cmd
>
> @REM here's the e.cmd file (on my path) - 1 line & echoes each file
> @for %%a in (%*) do @echo %%a & @D:\Programs\emacs\bin\gnuclientw %%a
> @REM change D:\... path for your machine
>
>
> Then you can use "ftype" to set your txtfile (or whatever) to e.cmd
> ftype txtfile=c:\bat\e.cmd %1
>
> (to check the current setting you might want to just use: ftype txtile
> ...first.)
> Or check all the txtfile types:
> assoc | findstr txtfile
>
> (sorry about the findstr, I use grep/fgrep but findstr is built-in)
>
>
--
--
Ken Goldman kgold@watson.ibm.com 914-784-7646
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: My gnuServer notes on Win2000
2003-08-12 21:08 ` kgold
@ 2003-08-13 1:04 ` Herb Martin
0 siblings, 0 replies; 5+ messages in thread
From: Herb Martin @ 2003-08-13 1:04 UTC (permalink / raw)
"kgold" <kgold@watson.ibm.com> wrote in message
news:bhbl00$96c$1@news.btv.ibm.com...
>
> FWIW, I have this in my emacs for Windows, Linux, and AIX:
>
> ; gnuserv
>
> (require 'gnuserv)
> (gnuserv-start)
>
> On Windows, running "gnuclientw" just works. On Unix, I have to start
> one "emacs", and then use "gnuclient" once emacs is running.
Presumably you have a "gnuserv.el" somewhere that sets this
up -- I downloaded a chunk of elisp and stuck it in my .emacs
file.
My little batch trick is so that I can do this:
e *.txt readme*
And get all .txt and anything that starts with readme to run.
It also fires the gnuserv the first time or brings emacs front
if I type it with no (matching) files.
e
Emacs starts if necessary and comes to top of window stack
(focus)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-08-13 1:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-10 12:36 My gnuServer notes on Win2000 Herb Martin
2003-08-10 13:05 ` Matthias Rempe
2003-08-10 13:53 ` Herb Martin
2003-08-12 21:08 ` kgold
2003-08-13 1:04 ` Herb Martin
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).