emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: emacs-org list <emacs-orgmode@gnu.org>
Subject: Inline src block element not parsed correctly for export when in a list item
Date: Tue, 1 Mar 2022 22:10:39 -0500	[thread overview]
Message-ID: <CAFyQvY1OQ-EYzf3kEajHSBU0ewQN5sOmsJtRO3FyV7EgD-5ZZg@mail.gmail.com> (raw)

Hello,

I believe I have come across a corner case issue where the inline src
block element doesn't get parsed as one, if:

1. That src block is in a list item (plain list, definition list, etc.), AND
2. That src block wraps around when auto-filling.

This issue can be reproduced on the main branch:

Org mode version 9.5 (release_9.5-505-gef666)

MWE:

=====
#+author:
#+options: toc:nil

Run ~C-c C-e t A~.

* Doesn't export correctly if inline src block is in a wrapped list
- abcdefg abcdefg abcdefg abcdefg src_org[:exports code]{[[abc
  def][bar]]}.
* Exports correctly
** .. if the inline src block wraps in a paragraph
abcdefg abcdefg abcdefg abcdefg src_org[:exports code]{[[abc
def][bar]]}.
** .. if the inline src block is in a list but doesn't wrap
- abcdefg abcdefg abcdefg abcdefg src_org[:exports code]{[[abc def][bar]]}.
=====

Upon pasting the above snippet in an Org buffer and running `C-c C-e t
A`, I get:

=====
Run `C-c C-e t A'.


1 Doesn't export correctly if inline src block is in a wrapped list
===================================================================

  - abcdefg abcdefg abcdefg abcdefg src_org[:exports code]{[[abc
  def][bar]]}.


2 Exports correctly
====================

2.1 .. if the inline src block wraps in a paragraph
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  abcdefg abcdefg abcdefg abcdefg `[[abc def][bar]]'.


2.2 .. if the inline src block is in a list but doesn't wrap
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  - abcdefg abcdefg abcdefg abcdefg `[[abc def][bar]]'.
=====


Note that incorrect export of the inline src block in section 1 above.
The remaining sections exports correctly because either the inline src
block is not in a list item, or it doesn't wrap to the next line.

--
Kaushal Modi


             reply	other threads:[~2022-03-02  3:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02  3:10 Kaushal Modi [this message]
2022-03-16 12:47 ` Kaushal Modi
2022-04-06  4:22 ` Inline src org block element with containing inside item does not get exported when it contains a newline (was: Inline src block element not parsed correctly for export when in a list item) Ihor Radchenko
2022-05-14  9:40   ` Ihor Radchenko
2022-05-16  2:51     ` Kaushal Modi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFyQvY1OQ-EYzf3kEajHSBU0ewQN5sOmsJtRO3FyV7EgD-5ZZg@mail.gmail.com \
    --to=kaushal.modi@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: Inline src block element not parsed correctly for export when in a list item' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).