Hi Trent,

nice too hear some comments from you, too. :-)

On Tue, Jul 01, 2008 at 11:00:49AM +1000, Trent W. Buck wrote:
> Axel Beckert <[EMAIL PROTECTED]> writes:
> > b) spawing external editors doesn't work right if the configured
> > editor needs a terminal (i.e. doesn't open its own window). In my
> > example I have $EDITOR set to zile (Zile Is a Lossy Emacs :-), a
> > small, fast and efficient editor with Emacs look and feel.
> 
> It's not possible for conkeror to accurately determine whether $EDITOR
> requires a controlling xterm (consider: $EDITOR may be a wrapper script
> that heuristically decides which "real" editor to run).

Somehow I expected such an answer. ;-)

> However, conkeror should probably connect stdin to /dev/null, so that
> when line editors (ed) and ncurses editors (zile et al) immediately
> exit, rather than "hanging".

That looks like a good idea, too. Although I would prefer a solution
where those just get the terminal conkeror was started in (if any).
I'm though not sure, if this is more a xulrunner than a conkeror
issue.

> conkeror might also redirect stdout and stderr to a buffer (rather
> than conkeror's parent xterm), so that if $EDITOR exits
> unsuccessfully, conkeror can display the error message.

Sounds good, too.

> These issues should only affect people who start conkeror (or X) from a
> terminal; if you use e.g. gdm to start X and ratpoison's C-t ! to start
> conkeror, then stdin should already be /dev/null.

Hmmm, I know I had this issue on some via ssh remotely started
conkeror, so that one clear had not /dev/null connected to STDIN. I
though mainly use it with ratpoison and dmenu (Ctrl-t d c <Enter> :-).
Maybe dmenu has an issue here.

> >    What could make the situation slightly better is the following
> >    patch which first checks the $VISUAL environment variable before
> >    checking $EDITOR or falling back to emacs because $VISUAL is
> >    usually only set to editors with GUI while $EDITOR can be set to
> >    some text-mode only editor.
> 
> This should be done in your Debian package even if upstream doesn't;

Yepp! Already planned for the next release of the package.

> you should also patch the Debian version to fall back to
> sensible-editor rather than (say) vi or emacs.

That's exactly what I've planned. :-)

> >    Unfortunately I have no idea how to test if some editor needs a
> >    terminal, but if we can manage to get a spawned text-mode editor
> >    can connect to the terminal conkeror was called from (if any), this
> >    would a big step towards the perfect solution for this issue. :-)
> 
> You can't be sure that conkeror was started from a terminal.

I think I'll experiment with that a little bit. I'm curious to see if
it really can't be done. :-)

> I generally think trying to start an editor there is the wrong way to go
> about things, but if you make it work I'm still interested in the
> details :-)

Yeah, I see that it's unusual, but for me it was the only obvious way
if you can't find out, if some editor needs a terminal: Just give it
that one you already have. :-)

                Regards, Axel
-- 
Axel Beckert - [EMAIL PROTECTED], [EMAIL PROTECTED] - http://noone.org/abe/
_______________________________________________
Conkeror mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/conkeror

Reply via email to