Re: [O] ox-texinfo: empty line before "* Menu:" is missing
> Fixed. Thank you. Thanks to you too! Jonas
Re: [O] ox-texinfo: empty line before "* Menu:" is missing
Hello, Jonas Bernoulli writes: > 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_CATEGORY: Emacs > #+TEXINFO_DIR_TITLE: Demo2: (demo2). > #+TEXINFO_DIR_DESC: 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. Fixed. Thank you. Regards, -- Nicolas Goaziou
Re: [O] ox-texinfo: empty line before "* Menu:" is missing
Hello, Jonas Bernoulli writes: > Given this Org file > > #+TITLE: Demo Manual > #+TEXINFO_DIR_CATEGORY: Emacs > #+TEXINFO_DIR_TITLE: Demo: (demo). > #+TEXINFO_DIR_DESC: Demo. > > * Missing empty line > > There is text between the heading and the menu > > ** There is text before this menu > ** the empty line before Menu IS missing > > * Has empty line > > ** There is no text between heading and this menu > ** the empty line before Menu is NOT missing > > using C-c C-e i i produces a texi file containing > > There is text between the heading and the menu > @menu > > and an info file containing > > There is text between the heading and the menu > * Menu: > > and that is then also displayed like that in Info. But there should be > an empty line before "* Menu:". Fixed. Thank you. Regards, -- Nicolas Goaziou
Re: [O] ox-texinfo: empty line before "* Menu:" is missing
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_CATEGORY: Emacs #+TEXINFO_DIR_TITLE: Demo2: (demo2). #+TEXINFO_DIR_DESC: 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 whitespace. 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.
[O] ox-texinfo: empty line before "* Menu:" is missing
Hello Given this Org file #+TITLE: Demo Manual #+TEXINFO_DIR_CATEGORY: Emacs #+TEXINFO_DIR_TITLE: Demo: (demo). #+TEXINFO_DIR_DESC: Demo. * Missing empty line There is text between the heading and the menu ** There is text before this menu ** the empty line before Menu IS missing * Has empty line ** There is no text between heading and this menu ** the empty line before Menu is NOT missing using C-c C-e i i produces a texi file containing There is text between the heading and the menu @menu and an info file containing There is text between the heading and the menu * Menu: and that is then also displayed like that in Info. But there should be an empty line before "* Menu:". This can be fixed in `org-texinfo-make-menu' by replacing "@menu\n%s@end menu" with "\n@menu\n%s@end menu". In rare cases (which I have not further investigated) this change leads to two empty lines in the texi file where there should only be one, but these two empty lines won't make it into the info file, which after all is what really matters here, after all that's what the end-user will be looking at. The behavior is currently the same in "maint" and "master". Best regards, Jonas