[Top][All Lists]

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

Re: [O] ox-texinfo: empty line before "* Menu:" is missing

From: Jonas Bernoulli
Subject: Re: [O] ox-texinfo: empty line before "* Menu:" is missing
Date: Wed, 06 Apr 2016 20:57:43 +0200
User-agent: mu4e 0.9.17; emacs

The related `org-texinfo--build-menu' has a similar issue.  Unlike
`org-texinfo-make-menu' which may end up not inserting a newline
when it should, it may end up removing a newline when it should not.

Given this Org file:

  #+TITLE: Demo2 Manual
  #+TEXINFO_DIR_TITLE: Demo2: (demo2).
  * chapter ends with subsection
  ** section
  *** subsection
  * chapter ends with section
  ** just a section
  * another chapter

we end up with an info file containing

  * subsection::
  chapter ends with section

but there should be an empty line between these two lines.

This only happens if the preceeding chapter ends with a subsection.
If that ends with section then everything is good.  There might be
other instances where `org-texinfo--build-menu' removes to much

My suggestion is to remove `org-element-normalize-string' from
`org-texinfo--build-menu'.  Again this change might result in some
insignificant whitespace not being removed and again that is better
than removing significant whitespace.

Without doing this the detailed note listing would look like this:

  — The Detailed Node Listing —
  chapter ends with subsection                    # bold
  * section::                                     # empty line follows
  section                                         # bold
  * subsection::                                  # no empty line follows
  chapter ends with section                       # not bold
  * just a section:

Ps: In both cases you might find better solutions which not only never
    omit necessary whitespace but also never keep/add unnecessary
    whitespace.  But for me just not removing/not adding necessary
    whitespace would be good enough and I believe that the changes I
    have suggested accomplish that.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]