Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with headers lower then 3 in org-mode reader #3214

Closed
kepi opened this issue Nov 4, 2016 · 7 comments
Closed

Problem with headers lower then 3 in org-mode reader #3214

kepi opened this issue Nov 4, 2016 · 7 comments

Comments

@kepi
Copy link

kepi commented Nov 4, 2016

Since version 1.17.2 I'm not able to export org documents correctly if there is heading level lower than 3.

* heading one
text
** heading two
text
*** heading three
text
**** heading four
text

Exporting to markdown results in:

heading one
===========

text

heading two
-----------

text

### heading three

text

1.  heading four

    text

Which is wrong. In version 1.17.1-2 it works without any problem. Similar problem is in textile output, looks like markdown is implementing header 4 and lower as numbered list instead of heading.

@jgm
Copy link
Owner

jgm commented Nov 4, 2016 via email

@tarleb
Copy link
Collaborator

tarleb commented Nov 4, 2016

Sound like this is the result of 1.17.2 adding support for the H export option. That option controls the level below which headlines are converted into list items. The Emacs default for this option is 3, so the org-reader, aiming for maximal compatibility, does the same. This therefor is indeed indented behavior. However, two similar questions came up on pandoc-discuss already, so I'm starting to wonder if that was an error. It seems unexpected to many people and maybe pandoc should use a different default value.

@kepi, you can avoid this conversion by adding

#+OPTIONS: H:9

somewhere near the top of your org-mode file. See the orgmode documentation for details. Of the export options listed there, pandoc v1.17.2 and up supports ^, ', *, -, arch, author, creator, d, email, and H. The current master also supports the todo option.

@kepi
Copy link
Author

kepi commented Nov 5, 2016

@tarleb thanks for this workaround, I'll try that.

I can see that you are right and default exports are behaving same way. I hit the problem when I tried export to textile which is clearly broken and can't work with this. It renders html instead of textile when it find this list instead of heading. I should report it to different issue probably.

Anyway one thing is sure. It is problem because it behaved differently for long time and now there is confusion from it. It would be great to at least let users now somehow.

Thanks again for quick reply and workaround.

@jgm
Copy link
Owner

jgm commented Nov 5, 2016

+++ Kepi [Nov 04 16 17:56 ]:

It renders html instead of textile
when it find this list instead of heading. I should report it to
different issue probably.

Yes. This can be closed.

Anyway one thing is sure. It is problem because it behaved differently
for long time and now there is confusion from it. It would be great to
at least let users now somehow.

Well, we do have a changelog! I note items like

* Support headline levels export setting (Albert
* Krewinkel).  The depths of headlines can be modified using the
  `H` option.  Deeper headlines will be converted to lists.

@kepi
Copy link
Author

kepi commented Nov 5, 2016

I'm not against closing but I red changelog and I didn't realize this is the thing causing problem. Main problem is default behaviour changed.

@jgm
Copy link
Owner

jgm commented Nov 5, 2016

Yes, granted, this could have been noted more prominently in the changelog/commit message.

@jgm jgm closed this as completed Nov 5, 2016
@tarleb
Copy link
Collaborator

tarleb commented Nov 5, 2016

Duly noted.

thevogoncoder added a commit to thevogoncoder/MCI_Programmieren_3 that referenced this issue Feb 21, 2023
- Added filter for <span> tags in headers
- changed org-mode export option H: (see issue jgm/pandoc#3214)
- Updated solarized theme to current version (see Prog1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants