From xemacs-m  Mon May 12 08:45:59 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id IAA07280
	for <xemacs-beta@xemacs.org>; Mon, 12 May 1997 08:45:57 -0500 (CDT)
Received: (from hniksic@localhost)
          by jagor.srce.hr (8.8.5/8.8.4)
	  id PAA03189; Mon, 12 May 1997 15:45:55 +0200 (MET DST)
To: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: Re: Gnuattach
References: <kigiv0pymrs.fsf@jagor.srce.hr> <byvi4ox1q8.fsf@fresnel.math.ethz.ch>
X-Save-Project-Gutenberg: <URL:http://www.promo.net/pg/nl/pgny_nov96.html>
X-Attribution: Hrv
X-Face: Mie8:rOV<\c/~z{s.X4A{!?vY7{drJ([U]0O=W/<W*SMo/Mv:58:*_y~ki>xDi&N7XG
        KV^$k0m3Oe/)'e%3=$PCR&3ITUXH,cK>]bci&<qQ>Ff%x_>1`T(+M2Gg/fgndU%k*ft
        [(7._6e0n-V%|%'[c|q:;}td$#INd+;?!-V=c8Pqf}3J
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 12 May 1997 15:45:53 +0200
In-Reply-To: Jan Vroonhof's message of 12 May 1997 15:24:15 +0200
Message-ID: <kigwwp4952m.fsf@jagor.srce.hr>
Lines: 92
X-Mailer: Gnus v5.4.52/XEmacs 19.15

Jan Vroonhof <vroonhof@math.ethz.ch> writes:

> Hrvoje Niksic <hniksic@srce.hr> writes:
> 
> > One aspect of gnuattach that annoys me horribly is that its function
> > is totally confused with the function of gnuclient.  For instance, the
> > message "press C-x # when done" and the whole /concept/ of pressing
> > `C-x #' when done doesn't apply to gnuattach.
> 
> The problem is, it currently is two things at once.
> 
> 1. gnuclient equivalent of xemacs -nw
> 2. tty-equivalent of make-frame-on-other-display (needed because it
>    cannot be done properly without the helper program).
> 
> For 1. C-x # makes sense. For 2 absolutely not.

Oh, I see.  I'd like to have the following:

1) gnuclient and gnuattach be only one program; call it gnuclient and
   make it understand the `-nw' option;

2) if called with a file name argument, print the "C-x # bla bla"
   message;

3) make `C-x #' save/kill the buffer and close the TTY device/console
   (aargh:-).

4) make `C-x 5 0' work correctly.

That doesn't sound like too much work for a person who understands the
code.  I'd have to learn the code, first.  If gnuattach has no
maintainer, please tell me.  Then I'll work on it myself.

> > 1) no more `C-x #' silliness -- what is good for gnuclient isn't
> >    necessarily good for gnuattach;
> 
> Make this an option, maybe default to on when gnuattach is called
> with a filename argument. May be it would be nice to write the
> functionality 1. into gnuclient and let if it have a -nw option. It
> would be really nice of did the same magic based on $DISPLAY as
> xemacs does.

Ha! :-)  I should have /read/ your article first. :-)  See above.

Yes, it's definitely the Rigt Thing to do.

> > 2) when you delete the last frame on a gnuattached TTY device via
> >    `C-x 5 0', it should tell the gnuattach process to die;
> 
> Put a function in delete-frame-hook that checks whether this is the
> last frame on a gnuattach device.

That would be a very bad way to implement it, as the same can be
achieved via `delete-device' and `delete-console'.  I'll update the
`delete-device-hook'.

> If yes tell gnuattach to die, may be query to save buffer first if
> functionality is 1). This will require small changes in the book
> keeping because gnuattach is now no longer a client of buffer, but
> of a display

Hmm.  I'll look into it.

> > 3) suspending gnuattach and resuming still doesn't work well for
> >    me, I get
> > 
> >    (1) (error/warning) Error in process filter:
> >        (wrong-type-argument number-char-or-marker-p nil)
> 
> If you only get it on suspending and resuming that is really strange
> because it basically does an '(server-eval (resume-pid-console <pid>))'
> 
> Can you play around with gnudoit and see if you get any problems
> there?

Yup.

> P.S. If you make a lot of changes, please make them against the bare
> 19.15 version of the files, or ask me for a snapshot of the last
> version. This features a cleaner gnuserv.el and some extentions to
> the gnu* programs.

Is there another version but "bare 19.15"?  I thought 20.2 was the
same?  Are you the maintainer?  Maybe /you/ could make all these fine
changes? ;-)

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
4.  Thou shalt not warlorde a sig if it bee the sig of Kibo, nor if
    it bee the sig of the Inner Circle.

