[uw.unix] Setting EDITOR

lindsay@watnext.waterloo.edu (Lindsay Patten) (09/19/89)

How can one set up one's EDITOR variable to pick the right emacs version
even in the face of scripts which set their own paths?  Previously, I set
my path so that I got the right one but now some scripts set their own path
and I end up getting the wrong emacs.  What is the best way of setting this
variable?

Thanks,
Lindsay Patten            "People are package deals - No substitutions allowed"
Pattern Analysis & Machine Intelligence Group                   lindsay@watnext
Department of Systems Design Engineering           lindsay@watnext.waterloo.edu
University of Waterloo              {utai|decvax|uunet}!watmath!watnext!lindsay

jmsellens@watdragon.waterloo.edu (John M. Sellens) (09/22/89)

In article <11520@watcgl.waterloo.edu> lindsay@watnext.waterloo.edu (Lindsay Patten) writes:
>How can one set up one's EDITOR variable to pick the right emacs version
>even in the face of scripts which set their own paths?  Previously, I set
>my path so that I got the right one but now some scripts set their own path
>and I end up getting the wrong emacs.  What is the best way of setting this
>variable?
>
>Thanks,
>Lindsay Patten            "People are package deals - No substitutions allowed"
>Pattern Analysis & Machine Intelligence Group                   lindsay@watnext
>Department of Systems Design Engineering           lindsay@watnext.waterloo.edu
>University of Waterloo              {utai|decvax|uunet}!watmath!watnext!lindsay


How about something like this:
   set your PATH and then
   setenv EDITOR `showpath findfirst=emacs`
which will put an abolute path to your desired emacs in the variable.

accwai@maytag.waterloo.edu (Andy Wai) (09/22/89)

In article <11520@watcgl.waterloo.edu> lindsay@watnext.waterloo.edu (Lindsay Patten) writes:
>How can one set up one's EDITOR variable to pick the right emacs version
>even in the face of scripts which set their own paths?

setenv EDITOR `showpath findfirst=emacs`

>Previously, I set
>my path so that I got the right one but now some scripts set their own path
>and I end up getting the wrong emacs.  What is the best way of setting this
>variable?

That's a bug.  The script in question (icr-hardware-request I would
assume) has been fixed to restore PATH just before the editor is invoked.

Andy

accwai@maytag.waterloo.edu (Andy Wai) (09/22/89)

In article <511@maytag.waterloo.edu> accwai@maytag.waterloo.edu (Andy Wai) writes:
>In article <11520@watcgl.waterloo.edu> lindsay@watnext.waterloo.edu (Lindsay Patten) writes:
>>How can one set up one's EDITOR variable to pick the right emacs version
>>even in the face of scripts which set their own paths?
>
>setenv EDITOR `showpath findfirst=emacs`

Well, come to think of it, this is bad.  Starting up a new emacs on
every little thing is expensive.  How about:

setenv EDITOR /software/emacs/etc/emacsclient

and put

(server-start)

somewhere in your .emacs file.   Anyway, just a thought...

Andy