Re: Coming to closure on ae...

1998-05-02 Thread Raul Miller
Dale Scheetz <[EMAIL PROTECTED]> wrote:
> The reason I feel compelled to ask is that I will be creating two new
> names: xvi and xae. 

xvi, intuitively, seems to refer to an x aware version of vi (elvis or
vim).  How about xaevi?

-- 
Raul


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Coming to closure on ae...

1998-05-02 Thread Dale Scheetz
On Sat, 2 May 1998, Raul Miller wrote:

> Dale Scheetz <[EMAIL PROTECTED]> wrote:
> > The reason I feel compelled to ask is that I will be creating two new
> > names: xvi and xae. 
> 
> xvi, intuitively, seems to refer to an x aware version of vi (elvis or
> vim).  How about xaevi?

A bit bulky ;-)

There is already a /bin/vi script that executes ae as vi, as a "least
surprise" issue. When running "vi" in an xterm, the help screen would
indicate the program to use instead, so I don't see any problems with
"expectation". I'm also leaning toward aex and vix, as they will appear in
the directory together with their nonx partners.

On another part of the problem. I just tried to use a symlink to execute
ae with the correct .rc file. I cd'd to the /bin directory (where ae
resides) and typed:

ln -s '/bin/ae -f /etc/aex.rc' xae

and, while it seemed to build the link I desired (it looks good with ls
-l) when I try to execute xae, bash tells me the file is not found.

Any idea what I am doing wrong?

Thanks,

Dwarf
--
_-_-_-_-_-   Author of "The Debian Linux User's Guide"  _-_-_-_-_-_-

aka   Dale Scheetz   Phone:   1 (850) 656-9769
  Flexible Software  11000 McCrackin Road
  e-mail:  [EMAIL PROTECTED] Tallahassee, FL  32308

_-_-_-_-_-_- If you don't see what you want, just ask _-_-_-_-_-_-_-


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Coming to closure on ae...

1998-05-02 Thread Raul Miller
Dale Scheetz <[EMAIL PROTECTED]> wrote:
>   ln -s '/bin/ae -f /etc/aex.rc' xae
> 
> and, while it seemed to build the link I desired (it looks good with ls
> -l) when I try to execute xae, bash tells me the file is not found.
> 
> Any idea what I am doing wrong?

That's only going to work if you have a directory in /bin named 'ae -f ',
which has a file named 'aex.rc' in its etc subdirectory.

Basically, nothing cares what a symlink says, except that it be
a valid reference to a file.

-- 
Raul


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Coming to closure on ae...

1998-05-02 Thread Dale Scheetz
On Sat, 2 May 1998, Raul Miller wrote:

> Dale Scheetz <[EMAIL PROTECTED]> wrote:
> > ln -s '/bin/ae -f /etc/aex.rc' xae
> > 
> > and, while it seemed to build the link I desired (it looks good with ls
> > -l) when I try to execute xae, bash tells me the file is not found.
> > 
> > Any idea what I am doing wrong?
> 
> That's only going to work if you have a directory in /bin named 'ae -f ',
> which has a file named 'aex.rc' in its etc subdirectory.
> 
> Basically, nothing cares what a symlink says, except that it be
> a valid reference to a file.
> 
I had heard somewhere that I could make a symlink that called the file
with parameters. I take it from your comments above that this is not true?
>From your comments it sounds like bash is reporting the file not found for
xae, but the file it can't find is '/bin/ae -f /etc/aex.rc'?

I can do the same thing in a shell script, but this looked simpler and
easier to manage...oh well ;-)

Thanks,

Dwarf
--
_-_-_-_-_-   Author of "The Debian Linux User's Guide"  _-_-_-_-_-_-

aka   Dale Scheetz   Phone:   1 (850) 656-9769
  Flexible Software  11000 McCrackin Road
  e-mail:  [EMAIL PROTECTED] Tallahassee, FL  32308

_-_-_-_-_-_- If you don't see what you want, just ask _-_-_-_-_-_-_-


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Coming to closure on ae...

1998-05-02 Thread Oliver Elphick
Dale Scheetz wrote:...
  >There doesn't seem to be a "reliable" method for determining whether or
  >not you are in an xterm. Any method so far suggested has "natural"
  >configuration situations that break the method.

When you start an xterm, TERM is set to xterm; why not test for that?
The trouble with using different executables is that they will only
get run when the user chooses.  I have found ae popping up unexpectedly
after I have removed elvis.  Because I didn't choose to load it, it came
up in its default state.

If someone manages to get an xterm where TERM is set to something different,
it won't work, but it seems a bit unreasonable for anyone to do such
a thing.

-- 
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight  http://www.lfix.co.uk/oliver

PGP key from public servers; key ID 32B8FAA1

 
Come to me, all you who labour and are heavily laden, and I will
give you rest. Take my yoke upon you, and learn from me; for I am
meek and lowly in heart, and you shall find rest for your souls.
For my yoke is easy and my burden is light.(Matthew 11: 28-30)



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Coming to closure on ae...

1998-05-03 Thread Rev. Joseph Carter
On Sat, May 02, 1998 at 11:42:39PM +0200, Oliver Elphick wrote:
>   >There doesn't seem to be a "reliable" method for determining whether or
>   >not you are in an xterm. Any method so far suggested has "natural"
>   >configuration situations that break the method.
> 
> When you start an xterm, TERM is set to xterm; why not test for that?

Test $DISPLAY, it's the Right Way to test for X.

pgp4a4c5Tbig9.pgp
Description: PGP signature


Re: Coming to closure on ae...

1998-05-03 Thread Dale Scheetz
On Sat, 2 May 1998, Oliver Elphick wrote:

> Dale Scheetz wrote:...
>   >There doesn't seem to be a "reliable" method for determining whether or
>   >not you are in an xterm. Any method so far suggested has "natural"
>   >configuration situations that break the method.
> 
> When you start an xterm, TERM is set to xterm; why not test for that?
> The trouble with using different executables is that they will only
> get run when the user chooses.  I have found ae popping up unexpectedly
> after I have removed elvis.  Because I didn't choose to load it, it came
> up in its default state.

When you remove the last vi alternative, ae is run by a script in /bin
with the ae2vi.rc file. The current release is broken in this reguard, but
the next one will be fixed to continue to emulate vi.

> 
> If someone manages to get an xterm where TERM is set to something different,
> it won't work, but it seems a bit unreasonable for anyone to do such
> a thing.
> 
Although the xterm does set itself up with TERM=xterm, there are any
number of reasons for the TERM variable to be changed (vt100 comes to
mind for various telnet targets), which makes this an unreliable way to
deal with this.

What would be wrong with having the "non-x" ae tell you in the help screen
what you need to run to get xterm support? The need for this xterm support
comes from folks who want to administer a base system remotely from a
system using an xterm. This is a fairly restricted set of folks who should
be "clued" enough to deal with the help message.

Ya think?

Dwarf
--
_-_-_-_-_-   Author of "The Debian Linux User's Guide"  _-_-_-_-_-_-

aka   Dale Scheetz   Phone:   1 (850) 656-9769
  Flexible Software  11000 McCrackin Road
  e-mail:  [EMAIL PROTECTED] Tallahassee, FL  32308

_-_-_-_-_-_- If you don't see what you want, just ask _-_-_-_-_-_-_-


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Coming to closure on ae...

1998-05-03 Thread Raul Miller
Rev. Joseph Carter <[EMAIL PROTECTED]> wrote:
> Test $DISPLAY, it's the Right Way to test for X.

But not the right way to test for xterm.

-- 
Raul


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Coming to closure on ae...

1998-05-03 Thread Raul Miller
Dale Scheetz <[EMAIL PROTECTED]> wrote:
> What would be wrong with having the "non-x" ae tell you in the help
> screen what you need to run to get xterm support? The need for this
> xterm support comes from folks who want to administer a base system
> remotely from a system using an xterm. This is a fairly restricted set
> of folks who should be "clued" enough to deal with the help message.

Should be sufficient to let them know that TERM=xterm is needed
for xterm support.

-- 
Raul


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Coming to closure on ae...

1998-05-03 Thread Dale Scheetz
On Sat, 2 May 1998, Rev. Joseph Carter wrote:

> On Sat, May 02, 1998 at 11:42:39PM +0200, Oliver Elphick wrote:
> >   >There doesn't seem to be a "reliable" method for determining whether or
> >   >not you are in an xterm. Any method so far suggested has "natural"
> >   >configuration situations that break the method.
> > 
> > When you start an xterm, TERM is set to xterm; why not test for that?
> 
> Test $DISPLAY, it's the Right Way to test for X.

I see: in a console the environmental variable DISPLAY is not defined, but
it will be in any X window. 

Sounds like it should work for ae's needs...

Thanks,

Dwarf
--
_-_-_-_-_-   Author of "The Debian Linux User's Guide"  _-_-_-_-_-_-

aka   Dale Scheetz   Phone:   1 (850) 656-9769
  Flexible Software  11000 McCrackin Road
  e-mail:  [EMAIL PROTECTED] Tallahassee, FL  32308

_-_-_-_-_-_- If you don't see what you want, just ask _-_-_-_-_-_-_-


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Coming to closure on ae...

1998-05-03 Thread Rev. Joseph Carter
On Sat, May 02, 1998 at 08:24:50PM -0400, Raul Miller wrote:
> > Test $DISPLAY, it's the Right Way to test for X.
> 
> But not the right way to test for xterm.

If $DISPLAY is set you're either in an xterm, rxvt, or kvt.  As far as ae
would care, these are one and the same.


pgpBM27t6J25C.pgp
Description: PGP signature


Re: Coming to closure on ae...

1998-05-04 Thread Raul Miller
> > > Test $DISPLAY, it's the Right Way to test for X.

On Sat, May 02, 1998 at 08:24:50PM -0400, Raul Miller wrote:
> > But not the right way to test for xterm.

Rev. Joseph Carter <[EMAIL PROTECTED]> wrote:
> If $DISPLAY is set you're either in an xterm, rxvt, or kvt.  As far as ae
> would care, these are one and the same.

Yeah, Dale wrote me and pointed out that the problem wasn't the terminal
emulation, but the function key bindings (which are outside the scope
of something like a vt100 emulation).

Though I must admit being confused why we can't have bindings for
both the X and Console function keys.

-- 
Raul


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Coming to closure on ae...

1998-05-05 Thread Anand Kumria
On Sat, 2 May 1998, Dale Scheetz wrote:

> There doesn't seem to be a "reliable" method for determining whether or
> not you are in an xterm. Any method so far suggested has "natural" 
> configuration situations that break the method.

  How about just checking for the existance of the DISPLAY variable?

Anand.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Coming to closure on ae...

1998-05-05 Thread Anand Kumria
On Wed, 6 May 1998, Anand Kumria wrote:

[snip]

I guess I should learn to read faster since it has already been mentioned
many times.

Anand


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Coming to closure on ae...

1998-05-05 Thread Carlos Barros
On Wed, 6 May 1998, Anand Kumria wrote:

  > On Sat, 2 May 1998, Dale Scheetz wrote:
  > 
  > > There doesn't seem to be a "reliable" method for determining whether or
  > > not you are in an xterm. Any method so far suggested has "natural" 
  > > configuration situations that break the method.
  > 
  >   How about just checking for the existance of the DISPLAY variable?
  > 

What about trying to connext to X server, and if an error, do it in
terminal mode.

Bye
   Carlos Barros.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Coming to closure on ae...

1998-05-05 Thread Martin Schulze
On Tue, May 05, 1998 at 04:48:28PM +0300, Carlos Barros wrote:
> On Wed, 6 May 1998, Anand Kumria wrote:
>   > > There doesn't seem to be a "reliable" method for determining whether or
>   > > not you are in an xterm. Any method so far suggested has "natural" 
>   > > configuration situations that break the method.
>   > 
>   >   How about just checking for the existance of the DISPLAY variable?
>   > 
> 
> What about trying to connext to X server, and if an error, do it in
> terminal mode.

Which would result in opening X connections when working on the
console.  No, that's not funny, this already happened with urlview
here, not funny to wait for your browser/editor while it runs somewhere
on X.

Regards,

Joey

-- 
  / Martin Schulze  *  [EMAIL PROTECTED]  *  26129 Oldenburg /
 / http://home.pages.de/~joey/
/  VFS: no free i-nodes, contact Linus  -- finlandia, Feb '94   /


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Coming to closure on ae...

1998-05-05 Thread Dale Scheetz
On Tue, 5 May 1998, Martin Schulze wrote:

> On Tue, May 05, 1998 at 04:48:28PM +0300, Carlos Barros wrote:
> > On Wed, 6 May 1998, Anand Kumria wrote:
> >   > > There doesn't seem to be a "reliable" method for determining whether 
> > or
> >   > > not you are in an xterm. Any method so far suggested has "natural" 
> >   > > configuration situations that break the method.
> >   > 
> >   >   How about just checking for the existance of the DISPLAY variable?
> >   > 
> > 
> > What about trying to connext to X server, and if an error, do it in
> > terminal mode.
> 
> Which would result in opening X connections when working on the
> console.  No, that's not funny, this already happened with urlview
> here, not funny to wait for your browser/editor while it runs somewhere
> on X.
> 
That would be my expectation as well.

As it turns out, thanks to some excellent help from Jim Mintha, I can now
build an ae.rc file that works both in the console and in the xterm. I
still have some details to work out, but the solution is complete at this
point.

I want to thank everyone who contributed ideas. You were all a great help
to someone out in the middle of nowhere. Much appreciated.

Luck,

Dwarf
--
_-_-_-_-_-   Author of "The Debian Linux User's Guide"  _-_-_-_-_-_-

aka   Dale Scheetz   Phone:   1 (850) 656-9769
  Flexible Software  11000 McCrackin Road
  e-mail:  [EMAIL PROTECTED] Tallahassee, FL  32308

_-_-_-_-_-_- If you don't see what you want, just ask _-_-_-_-_-_-_-


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Coming to closure on ae...

1998-05-05 Thread Remco Blaakmeer
On Tue, 5 May 1998, Carlos Barros wrote:

> On Wed, 6 May 1998, Anand Kumria wrote:
> 
>   > On Sat, 2 May 1998, Dale Scheetz wrote:
>   > 
>   > > There doesn't seem to be a "reliable" method for determining whether or
>   > > not you are in an xterm. Any method so far suggested has "natural" 
>   > > configuration situations that break the method.
>   > 
>   >   How about just checking for the existance of the DISPLAY variable?
>   > 
> 
> What about trying to connext to X server, and if an error, do it in
> terminal mode.

That doesn't work properly when working from a console if you have access
rights to a local X server. The same goes for testing the DISPLAY
variable. The only other way I can come up with is checking the WINDOWID
variable. Or look at how 'elvis' determines if it's running in X or not. I
don't know how elvis checks for X, but it does this quite well.

Remco


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Coming to closure on ae...

1998-05-06 Thread Jules Bean
--On Wed, May 6, 1998 1:45 am +0200 "Remco Blaakmeer"
<[EMAIL PROTECTED]> wrote: 

> On Tue, 5 May 1998, Carlos Barros wrote:
> 
>> On Wed, 6 May 1998, Anand Kumria wrote:
>> 
>>   > On Sat, 2 May 1998, Dale Scheetz wrote:
>>   > 
>>   > > There doesn't seem to be a "reliable" method for determining
whether or
>>   > > not you are in an xterm. Any method so far suggested has "natural" 
>>   > > configuration situations that break the method.
>>   > 
>>   >   How about just checking for the existance of the DISPLAY variable?
>>   > 
>> 
>> What about trying to connext to X server, and if an error, do it in
>> terminal mode.
> 
> That doesn't work properly when working from a console if you have access
> rights to a local X server. The same goes for testing the DISPLAY
> variable. The only other way I can come up with is checking the WINDOWID
> variable. Or look at how 'elvis' determines if it's running in X or not. I
> don't know how elvis checks for X, but it does this quite well.
> 

The original problem has been resolved, but there is an important point
here, I think.

As far as possible, we shouldn't be playing games like this.  It violates
the principle of least surprise (IMHO).

There are very few cases when an xterm should be handled differently from a
console.  If I unset DISPLAY in an xterm, I do it deliberately - I don't
want X to be used by programs.  If a clever program works out that X is
there and uses it anyway, I'm going to be annoyed.  Similarly, my vc
sessions won't normally have a DISPLAY set.  If they do, it's because I for
some reason want to use X with my apps started from a console.

I think an xterm should be exactly like a VC in almost every case I can
bring to mind.  Which is why this backspace/delete thing is so annoying...

Yours,

Jules


/+---+-\
|  Jelibean aka  | [EMAIL PROTECTED] |  6 Evelyn Rd|
|  Jules aka |   |  Richmond, Surrey   |
|  Julian Bean   | [EMAIL PROTECTED]|  TW9 2TF *UK*   |
++---+-+
|  War doesn't demonstrate who's right... just who's left. |
|  When privacy is outlawed... only the outlaws have privacy.  |
\--/



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Coming to closure on ae...

1998-05-06 Thread Carlos Barros
On Tue, 5 May 1998, Martin Schulze wrote:

  > On Tue, May 05, 1998 at 04:48:28PM +0300, Carlos Barros wrote:
  > > What about trying to connext to X server, and if an error, do it in
  > > terminal mode.
  > 
  > Which would result in opening X connections when working on the
  > console.  No, that's not funny, this already happened with urlview
  > here, not funny to wait for your browser/editor while it runs somewhere
  > on X.
  > 

Well...
if a connection is open, it means that the user has run the program
under X or did tell the program to connect to a X server or a stale
DISPLAY variable... and if that is not what the user want's is because
a user error, or does not like to use it under X even if he is under
X...  I still dont see your point...

---
if(XOpenDisplay())
xmode=true
else
xmode=false;
---
 That is what I propose.

Bye
Carlos Barros.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]