Re: title refreshing (xtt) and the 4.6.0 release



Hello!

> The patch using the Xlibs is 'clean' and efficient for refreshing the
> title on a _local_host_.
>
> Tested various combinations of Solaris 8, 9, Linux kernel 2.4.17 xfree86
> 4.1.0, 4.2.0, 4.2.1 with 6 or 7 different terminals, but have yet to
> reconfigure one or two solaris machines to test with the XSun xserver.
> All favorable results on a local machine.

I'm really surprised by the amount of interest to this topic and by the
amount of time spent on it.  I even start thinking that maybe I shouldn't
have applied the patch for changing the title, because the time spent on
this issue could have been better spent on something else.

>  - It can't really be done in less than 100 lines of code.
>     (at one point I had 250 lines)
>     As a non-critical function, to avoid bloating main.c,
>     should it be moved out to something like xtt_restore.c ?

I'd rather remove 10 lines to set the title than add 250 lines to restore
the title.

> - For use on a local host, a delay in the request/read xtt
>    of a few millisec using usleep() resolves any mis-reads
>    of  the output from "\033[21t" . But on a remote host,
>    the delay can't be less than one second. Because most
>    users are on a local host (correct me if I'm wrong),
>    the default delay should be set for local. Then, for remote
>    host sessions, the delay for the timeout could be adjusted
>    on-the-fly (by editing $HOME/.mc/ini or even better,
>    by a command line option like "mc -r").

Just imagine that you know nothing about mc and you are reading the help.
Would you understand what this is about?  I can imagine that some users
would be confused and will blame unrelated problems on the "incorrect
delay".  I can imagine users writing a wrapper around mc to set the
timeout correctly if they log in remotely.  Yet the same users will close
mc together with the terminal without ever needing the saved title.

>    On exit from mc, just print something generic like:
>    "xterm: [shell]" or "username hosname"
>     to overwrite the hanging xterm_title.

It used to be "Thank you for using GNU Midnight Commander" in 4.5.55.
Too long for my taste.

I think that if you expect the audience of the patch (i.e.  those who
really care about the title after they exit mc) to edit $HOME/.mc/ini
and/or give command line options when running mc remotely, then probably
the same users won't have any problem adding something like this to the
environment:

PROMPT_COMMAND='echo -ne "\033]0;${USER} ${HOSTNAME%% *}:${PWD/#$HOME/~}\007"'

It's standard in Red Hat 8.0 and it sets the title after every command,
not just mc.

-- 
Regards,
Pavel Roskin



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