* ox-texinfo: empty line before "* Menu:" is missing
@ 2016-04-06 17:51 Jonas Bernoulli
2016-04-06 18:57 ` Jonas Bernoulli
2016-04-06 20:28 ` Nicolas Goaziou
0 siblings, 2 replies; 5+ messages in thread
From: Jonas Bernoulli @ 2016-04-06 17:51 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ox-texinfo: empty line before "* Menu:" is missing
2016-04-06 17:51 ox-texinfo: empty line before "* Menu:" is missing Jonas Bernoulli
@ 2016-04-06 18:57 ` Jonas Bernoulli
2016-04-06 20:29 ` Nicolas Goaziou
2016-04-06 20:28 ` Nicolas Goaziou
1 sibling, 1 reply; 5+ messages in thread
From: Jonas Bernoulli @ 2016-04-06 18:57 UTC (permalink / raw)
To: emacs-orgmode
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ox-texinfo: empty line before "* Menu:" is missing
2016-04-06 18:57 ` Jonas Bernoulli
@ 2016-04-06 20:29 ` Nicolas Goaziou
0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2016-04-06 20:29 UTC (permalink / raw)
To: Jonas Bernoulli; +Cc: emacs-orgmode
Hello,
Jonas Bernoulli <jonas@bernoul.li> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ox-texinfo: empty line before "* Menu:" is missing
2016-04-06 17:51 ox-texinfo: empty line before "* Menu:" is missing Jonas Bernoulli
2016-04-06 18:57 ` Jonas Bernoulli
@ 2016-04-06 20:28 ` Nicolas Goaziou
2016-04-08 9:47 ` Jonas Bernoulli
1 sibling, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2016-04-06 20:28 UTC (permalink / raw)
To: Jonas Bernoulli; +Cc: emacs-orgmode
Hello,
Jonas Bernoulli <jonas@bernoul.li> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-04-08 9:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-06 17:51 ox-texinfo: empty line before "* Menu:" is missing Jonas Bernoulli
2016-04-06 18:57 ` Jonas Bernoulli
2016-04-06 20:29 ` Nicolas Goaziou
2016-04-06 20:28 ` Nicolas Goaziou
2016-04-08 9:47 ` Jonas Bernoulli
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.