help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

My gnuServer notes on Win2000


From: Herb Martin
Subject: My gnuServer notes on Win2000
Date: Sun, 10 Aug 2003 12:36:45 GMT

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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]