Attached is a patch based on the last patch, that corrects issue 1&4.

-FR

On Mon, Dec 19, 2011 at 4:00 PM, Felix Rosencrantz
<f.rosencra...@gmail.com> wrote:
> Looks pretty good, I have four small issues:
>
> 1) automatic-rename is also turned off by setting window name via
> escape sequence, which is not spelled out, anywhere in the man page,
> and this is what actually was biting me originally. (or I missed it in
> the patched version or forgot to add that in the patch I sent.)
>
> 2)  "A window's title is the title of it's active pane." This might be
> a little unclear, since just before there it says only panes have
> titles.
>
> 3)  "in target" seems awkward to me in this "Windows and sessions have
> names, which may be used to specify them in target and...", but that
> may be correct way to say it.
>
> 4)  It should say: "A window's name is set with one of:"  the version
> sent said "window's title"
>
> Only items 1&4 need to be corrected.  I can send a patch, but don't
> have time right now.
> -FR
>
> On Mon, Dec 19, 2011 at 12:35 PM, Nicholas Marriott
> <nicholas.marri...@gmail.com> wrote:
>> How about this?
>>
>> Index: tmux.1
>> ===================================================================
>> RCS file: /cvs/src/usr.bin/tmux/tmux.1,v
>> retrieving revision 1.257
>> diff -u -p -r1.257 tmux.1
>> --- tmux.1      9 Dec 2011 16:28:18 -0000       1.257
>> +++ tmux.1      19 Dec 2011 20:34:33 -0000
>> @@ -2110,7 +2110,7 @@ may contain any of the following special
>>  .It Li "#I" Ta "Current window index"
>>  .It Li "#P" Ta "Current pane index"
>>  .It Li "#S" Ta "Session name"
>> -.It Li "#T" Ta "Current window title"
>> +.It Li "#T" Ta "Current pane title"
>>  .It Li "#W" Ta "Current window name"
>>  .It Li "##" Ta "A literal" Ql #
>>  .El
>> @@ -2129,13 +2129,9 @@ global environment set (see the
>>  .Sx ENVIRONMENT
>>  section).
>>  .Pp
>> -The window title (#T) is the title set by the program running within the 
>> window
>> -using the OSC title setting sequence, for example:
>> -.Bd -literal -offset indent
>> -$ printf '\e033]2;My Title\e033\e\e'
>> -.Ed
>> -.Pp
>> -When a window is first created, its title is the hostname.
>> +For details on how the names and titles can be set see the
>> +.Sx "NAMES AND TITLES"
>> +section.
>>  .Pp
>>  #[attributes] allows a comma-separated list of attributes to be specified,
>>  these may be
>> @@ -2654,6 +2650,59 @@ The following variables are available, w
>>  .It Li "window_name" Ta "Name of window"
>>  .It Li "window_width" Ta "Width of window"
>>  .El
>> +.Sh NAMES AND TITLES
>> +.Nm
>> +distinguishes between names and titles.
>> +Windows and sessions have names, which may be used to specify them in target
>> +and are displayed in the status line and various lists: the name is the
>> +.Nm
>> +identifier for a window or session.
>> +Only panes have titles.
>> +A pane's title is typically set by the program running inside the pane and
>> +is not modified by
>> +.Nm .
>> +It is the same mechanism used to set for example the
>> +.Xr xterm 1
>> +window title in an
>> +.Xr X 7
>> +window manager.
>> +A window's title is the title of it's active pane.
>> +.Nm
>> +itself may set the title of the terminal in which the client is running, see
>> +the
>> +.Ic set-titles
>> +option.
>> +.Pp
>> +A session's name is set with the
>> +.Ic new-session
>> +and
>> +.Ic rename-session
>> +commands. A window's title is set with one of:
>> +.Bl -enum -width Ds
>> +.It
>> +A command argument (such as
>> +.Fl n
>> +for
>> +.Ic new-window
>> +or
>> +.Ic new-session ) .
>> +.It
>> +An escape sequence:
>> +.Bd -literal -offset indent
>> +$ printf '\e033kWINDOW_NAME\e033\e\e'
>> +.Ed
>> +.It
>> +Automatic renaming, which sets the name to the active command in the 
>> window's
>> +active pane.
>> +See the
>> +.Ic automatic-rename .
>> +.El
>> +.Pp
>> +When a pane is first created, its title is the hostname.
>> +A pane's title can be set via the OSC title setting sequence, for example:
>> +.Bd -literal -offset indent
>> +$ printf '\e033]2;My Title\e033\e\e'
>> +.Ed
>>  .Sh ENVIRONMENT
>>  When the server is started,
>>  .Nm
>> @@ -2717,8 +2766,8 @@ terminal.
>>  By default, the status line is enabled (it may be disabled with the
>>  .Ic status
>>  session option) and contains, from left-to-right: the name of the current
>> -session in square brackets; the window list; the current window title in 
>> double
>> -quotes; and the time and date.
>> +session in square brackets; the window list; the title of the active pane
>> +in double quotes; and the time and date.
>>  .Pp
>>  The status line is made of three parts: configurable left and right sections
>>  (which may contain dynamic content such as the time or output from a shell
>>
>>
>> On Fri, Dec 09, 2011 at 09:14:40AM -0800, Felix Rosencrantz wrote:
>>> I've attached a proposed patch to the man page, that updates the
>>> details described in this thread.
>>>
>>> Thanks.
>>> -FR.
>>>
>>> On Thu, Nov 3, 2011 at 5:19 PM, Nicholas Marriott
>>> <nicholas.marri...@gmail.com> wrote:
>>> > On Thu, Nov 03, 2011 at 02:57:40PM -0700, Felix Rosencrantz wrote:
>>> >> I was having a problem where my window names were disappearing when my 
>>> >> shell
>>> >> started, at first I was thinking the problem was related to the
>>> >> automatic-renaming option. ?After some investigation, the problem was 
>>> >> that my
>>> >> prompt was sending a code "\033k\033\\", which is used to clear screen's 
>>> >> title,
>>> >> there is a note about this in the comments in input.c.
>>> >>
>>> >> One problem that made this difficult to track down was that the manual 
>>> >> page is
>>> >> not very precise, and particular details are omitted. ?It's not clear to 
>>> >> me from
>>> >> the man page that windows and panes have their own separate title/names.
>>> >> Though here is what I think the state of tmux is:
>>> >> ? ?Windows have names which can be set in one of three ways:
>>> >> ? ?1) By tmux command (e.g. new-window, new-session, or rename-window)
>>> >> ? ?2) By escape code (e.g. printf '\033kWINDOW_NAME\033\\")
>>> >> ? ?3) Automatic renaming, which tries to be the active command in the
>>> >> ? ? ? active pane of the window.
>>> >
>>> > yes this is correct
>>> >
>>> > personally i don't like that escape sequence, it is a gnu screen
>>> > extension, should try to find something more sensible instead. maybe
>>> > \033]1, not sure what xterm uses that for
>>> >
>>> > i'm not sure if we should document specific escape sequences, although
>>> > if you're adding a section on naming and titles it'd make sense to cover
>>> > these i suppose
>>> >
>>> >> ? ?4) Man page issues:
>>> >> ? ? ? 1) doesn't mention escape code, and that escape code turns off
>>> >> automatic rename
>>> >> ? ? ? 2) automatic-renaming isn't specific about which pane is used.
>>> >> ? ? ? 3) The status-left option mentions both a window title&name. Here 
>>> >> window
>>> >> ? ? ? ? ?title, is actually the active pane title.
>>> >> ? ?Panes have titles, which can be set one way:
>>> >> ? ?1) By escape code: printf '\033]2;My Title\033\\'
>>> >
>>> > yes that's right
>>> >
>>> > title is what would typically be displayed in the xterm window title in
>>> > a window manager
>>> >
>>> >> ? ?2) Man page issues:
>>> >> ? ? ? 1) says escape code is used for "window title"
>>> >> ? ? ? 2) The FORMATS section lists "pane_title", but otherwise not
>>> >> mentioned in man page.
>>> >> ? ?3) FAQ incorrectly states: * tmux panes do not have individual
>>> >> names, titles and so on.
>>> >> ? ?Clients have a title, used to set xterm titles,
>>> >> ? ?1) Can only be specified by tmux command set-titles-string
>>> >> ? ?2) Documentation issues:
>>> >> ? ? ? 1) The man page isn't very clear set-titles-string applies to 
>>> >> clients
>>> >>
>>> >>
>>> >> I may still be confused, so would like to confirm if this correct. ?It 
>>> >> seems
>>> >> like it would be useful if details about names&title were more precisely
>>> >> spelled out in a separate man page section.
>>> >>
>>> >> -FR.
>>> >>
>>> >> ------------------------------------------------------------------------------
>>> >> RSA(R) Conference 2012
>>> >> Save $700 by Nov 18
>>> >> Register now
>>> >> http://p.sf.net/sfu/rsa-sfdev2dev1
>>> >> _______________________________________________
>>> >> tmux-users mailing list
>>> >> tmux-users@lists.sourceforge.net
>>> >> https://lists.sourceforge.net/lists/listinfo/tmux-users
>>
>>
--- tmux.1-orig
+++ tmux.1
@@ -2110,7 +2110,7 @@
 .It Li "#I" Ta "Current window index"
 .It Li "#P" Ta "Current pane index"
 .It Li "#S" Ta "Session name"
-.It Li "#T" Ta "Current window title"
+.It Li "#T" Ta "Current pane title"
 .It Li "#W" Ta "Current window name"
 .It Li "##" Ta "A literal" Ql #
 .El
@@ -2129,13 +2129,9 @@
 .Sx ENVIRONMENT
 section).
 .Pp
-The window title (#T) is the title set by the program running within the window
-using the OSC title setting sequence, for example:
-.Bd -literal -offset indent
-$ printf '\e033]2;My Title\e033\e\e'
-.Ed
-.Pp
-When a window is first created, its title is the hostname.
+For details on how the names and titles can be set see the 
+.Sx "NAMES AND TITLES"
+section.
 .Pp
 #[attributes] allows a comma-separated list of attributes to be specified,
 these may be
@@ -2359,7 +2355,8 @@
 or
 .Ic new-session ,
 or later with
-.Ic rename-window .
+.Ic rename-window ,
+or with a terminal escape sequence.
 It may be switched off globally with:
 .Bd -literal -offset indent
 set-window-option -g automatic-rename off
@@ -2654,6 +2651,59 @@
 .It Li "window_name" Ta "Name of window"
 .It Li "window_width" Ta "Width of window"
 .El
+.Sh NAMES AND TITLES
+.Nm
+distinguishes between names and titles.
+Windows and sessions have names, which may be used to specify them in target
+and are displayed in the status line and various lists: the name is the
+.Nm
+identifier for a window or session.
+Only panes have titles.
+A pane's title is typically set by the program running inside the pane and
+is not modified by
+.Nm .
+It is the same mechanism used to set for example the
+.Xr xterm 1
+window title in an
+.Xr X 7
+window manager.
+A window's title is the title of it's active pane.
+.Nm
+itself may set the title of the terminal in which the client is running, see
+the
+.Ic set-titles
+option.
+.Pp
+A session's name is set with the
+.Ic new-session
+and
+.Ic rename-session
+commands. A window's name is set with one of:
+.Bl -enum -width Ds
+.It
+A command argument (such as
+.Fl n
+for
+.Ic new-window
+or
+.Ic new-session ) .
+.It
+An escape sequence:
+.Bd -literal -offset indent
+$ printf '\e033kWINDOW_NAME\e033\e\e'
+.Ed
+.It
+Automatic renaming, which sets the name to the active command in the window's
+active pane.
+See the
+.Ic automatic-rename .
+.El
+.Pp
+When a pane is first created, its title is the hostname.
+A pane's title can be set via the OSC title setting sequence, for example:
+.Bd -literal -offset indent
+$ printf '\e033]2;My Title\e033\e\e'
+.Ed
 .Sh ENVIRONMENT
 When the server is started,
 .Nm
@@ -2717,8 +2767,8 @@
 By default, the status line is enabled (it may be disabled with the
 .Ic status
 session option) and contains, from left-to-right: the name of the current
-session in square brackets; the window list; the current window title in double
-quotes; and the time and date.
+session in square brackets; the window list; the title of the active pane
+in double quotes; and the time and date.
 .Pp
 The status line is made of three parts: configurable left and right sections
 (which may contain dynamic content such as the time or output from a shell
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to