#5 Emacs support; decoration styles

open-accepted
Martin Blais
None
3
2005-11-16
2005-11-16
Lalo Martins
No

The title decoration code allows for indentation in
over-and-under decorations (rst-default-indent).

In my "under" decorations, however, I like to run the
decoration one space bigger than the text.

Another style I have seen is to run decorations to the
full document width, regardless of the title text. (In
this style, over-and-under titles are usually centred.)

It would be neat if rst.el had customizable options
allowing all these styles.

Suggestion: rst-right-only-indent for "under" decorations.

If rst-default-indent is nil (rather than 0), the
over-and-under deco goes to the right margin and the
text is centred. If rst-right-only-indent is nil
(rather than 0), the "under" deco goes to the right margin.

Discussion

  • David Goodger
    David Goodger
    2005-11-16

    • assigned_to: nobody --> blais
     
  • David Goodger
    David Goodger
    2005-11-16

    Logged In: YES
    user_id=7733

    Looks reasonable to me. Martin?

     
  • Martin Blais
    Martin Blais
    2005-11-16

    • status: open --> open-accepted
     
  • Martin Blais
    Martin Blais
    2005-11-16

    Logged In: YES
    user_id=10996

    Just a note: it is not legal to have spaces BEFORE a title
    in underline-only style. However, it is legal for the
    underline to extend BEYOND the title.

    Right now, the "indent" parameter of the decoration is not
    meaningful if the style is 'underilne. I would make it take
    that meaning: if the style is 'underline, the "indent" value
    refers to the number of characters to extend the underline
    beyond the title. A value of 0 would be "flush with the
    title", a special value of 't (or maybe nil) would mean to
    extend to the fill-column.

    I'll have to see how that jives with the default values
    (what you're suggesting may have some other implications),
    but at least this way you would be able specify the style
    you want in your list of favourite decoration styles.

    Good suggestion.