5

I'm using org-mode to write some documentation. After changing some wording, fill-paragraph has arranged things so there's a number followed by a full stop at the start of a line. Like this:

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah
64. Blah blah blah blah blah blah blah blah

Blah blah blah blah blah.

When I export to HTML, org-mode then makes an ordered list item of that one line, making things look a mess. Is there anything I can do to indicate that a particular number followed by a full stop should never be treated as a list item?

I use the list behaviour elsewhere, so I don't want to globally disable it.

  • 1
    Not quite an answer, but you could use soft-wrapping (visual-line-mode built-in, visual-fill-column-mode 3rd party) instead of hard-wrapping by fill-paragraph. Would it break other things for you? – T. Verron Mar 31 '15 at 9:21
4

Customize org-plain-list-ordered-item-terminator.

While generally, customizing what org considers or doesn't consider a list item is somewhat tricky, the option provides exactly what you need. You have three options:

    1. this is an item,
  • 2) this is an item, or

  • 3 both 1. and 2) are items.

[Note that stackexchange also seems to have a problem interpreting this.]

Select 2, and you should be set.

  • Thanks! Strange it doesn't allow more customization - both sequences strike me as quite likely to occur in text naturally. Something like "1/ " would make more sense, to my eyes. But now I know of the variable, I can have a look and maybe try to fix that myself... – Tom Seddon Apr 4 '15 at 20:34
  • 1
    Start with the variable org-list-full-item-re and the function org-item-re. Then you'd have to experiment and see if it is hardcoded somewhere else. – olaf b Apr 5 '15 at 12:10
  • 1
    Also org-element--set-regexps Then run org-element-update-syntax – olaf b Apr 5 '15 at 12:17
7

This has been a problem for me when creating documents in Danish, where "3rd quarter" is "3. kvartal". The solution I use in such situations is to replace the space after the dot by a non-breaking space by typing C-q 240. This is appropriate in such situations where the dot is not an end of sentence character and could perhaps be used as a work around in your situation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.