Changeset 5184:6241f5669264 for doc

Show
Ignore:
Timestamp:
2007-07-08 18:27:35 (17 months ago)
Author:
David Champion <dgc@…>
Branch:
HEAD
Message:

This patch implements the "%* " notation, which is analogous to "%> "
but gives precedence to the right side instead of to the left when the
fill length is zero. The default $pager_format is updated to use it so
that %P is always available at the edge of the screen.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • doc/manual.xml.head

    r5059 r5184  
    32563256argument, or you can remove all hooks of a specific type by saying 
    32573257something like <literal>unhook send-hook</literal>. 
     3258</para> 
     3259 
     3260</sect1> 
     3261 
     3262<sect1 id="formatstrings"> 
     3263<title>Format Strings</title> 
     3264 
     3265<para> 
     3266Format strings are a general concept you'll find in several locations 
     3267through the mutt configuration, especially in the 
     3268<link linkend="index-format">&dollar;index&lowbar;format"</link>, 
     3269<link linkend="pager-format">&dollar;pager&lowbar;format"</link>, 
     3270<link linkend="status-format">&dollar;status&lowbar;format"</link>, 
     3271and other ``*_format'' variables. These can be very straightforward, 
     3272and it's quite possible you already know how to use them. 
     3273</para> 
     3274 
     3275<para> 
     3276The most basic format string element is a percent symbol followed 
     3277by another character. For example, <literal>%s</literal> 
     3278represents a message's Subject: header in the <link 
     3279linkend="index-format">&dollar;index&lowbar;format"</link> variable. The 
     3280``expandos'' available are documented with each format variable, but 
     3281there are general modifiers available with all formatting expandos, 
     3282too. Those are our concern here. 
     3283</para> 
     3284 
     3285<para> 
     3286Some of the modifers are borrowed right out of C (though you might 
     3287know them from Perl, Python, shell, or another langugage). These are 
     3288the [-]m.n modifiers, as in <literal>%-12.12s</literal>. As with 
     3289such programming languages, these modifiers allow you to specify the 
     3290minumum and maximum size of the resulting string, as well as its 
     3291justification. If the ``-'' sign follows the percent, the string will 
     3292be left-justified instead of right-justified. If there's a number 
     3293immediately following that, it's the minimum amount of space the 
     3294formatted string will occupy -- if it's naturally smaller than that, it 
     3295will be padded out with spaces.  If a decimal point and another number 
     3296follow, that's the maximum space allowable -- the string will not be 
     3297permitted to exceed that width, no matter its natural size. Each of 
     3298these three elements is optional, so that all these are legal format 
     3299strings: 
     3300<literal>%-12s</literal> 
     3301<literal>%4c</literal> 
     3302<literal>%.15F</literal> 
     3303<literal>%-12.15L</literal> 
     3304</para> 
     3305 
     3306<para> 
     3307Mutt adds some other modifiers to format strings. If you use an equals 
     3308symbol (<literal>=</literal>) as a numeric prefix (like the minus 
     3309above), it will force the string to be centered within its minimum 
     3310space range. For example, <literal>%=14y</literal> will reserve 14 
     3311characters for the %y expansion -- that's the X-Label: header, in 
     3312<literal>&dollar;index&lowbar;format</literal>. If the expansion 
     3313results in a string less than 14 characters, it will be centered in a 
     331414-character space.  If the X-Label for a message were "test", that 
     3315expansion would look like ``     test     ''. 
     3316</para> 
     3317 
     3318<para> 
     3319There are two very little-known modifiers that affect the way that an 
     3320expando is replaced. If there is an underline (``&lowbar;'') character 
     3321between any format modifiers (as above) and the expando letter, it will 
     3322expands in all lower case. And if you use a colon (``:''), it will 
     3323replace all decimal points with underlines. 
    32583324</para> 
    32593325