From: Ihor Radchenko <yantar92@gmail.com>
To: "Léo Ackermann" <leo.komba@gmail.com>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: Ox unindents lines but I can't see when
Date: Sat, 01 Oct 2022 13:32:48 +0800 [thread overview]
Message-ID: <87tu4o1533.fsf@localhost> (raw)
In-Reply-To: <CAFhsWEiSLKD9GQWkRnEJGSuJXO++M9vkSNZcyOa7SWkDF4dG4w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 964 bytes --]
Léo Ackermann <leo.komba@gmail.com> writes:
> I'm currently working on a tiny project org-inline-blocks that aims to
> provide a simple syntax for latex-blocks in org-mode based on indent.
> Namely, instead of #+begin_theorem ... #+end_theorem, it will be possible
> to write "Theorem." and the export will be based on indent to decide
> whether some text belongs to the block or not.
> Unfortunately, ox modifies the indentation of the org-text before running
> the filter functions. Here is an illustration.
>
> Consider the following file `hamlet.org`:
> ...
> *---*
> and this tiny `org-export-filter-body`'s function:
> ...
> *My question is thus: how can I prevent ox from unindenting the last line
> ? *
I am not sure if I understand your problem.
I tried to export the attached bug.org file to ASCII (C-c C-e t U) and
got the attached bug.txt file.
The indentation of the second paragraph is preserved.
Do I miss something?
[-- Attachment #2: bug.org --]
[-- Type: application/vnd.lotus-organizer, Size: 855 bytes --]
Prince Hamlet of Denmark is the son of the recently deceased King Hamlet,
and nephew of King Claudius, his father’s brother and successor.
Claudius hastily married King Hamlet’s widow, Gertrude, Hamlet’s mother,
and took the throne for himself. Denmark has a long-standing feud with
neighbouring Norway, in which King Hamlet slew King Fortinbras of Norway in
a battle some years ago. Although Denmark defeated Norway and the
Norwegian throne fell to King Fortinbras’s infirm brother, Denmark fears
that an invasion led by the dead Norwegian king’s son, Prince Fortinbras,
is imminent.
On a cold night on the ramparts of Elsinore, the Danish royal
castle, the sentries Bernardo and Marcellus discuss a ghost resembling the
late King Hamlet which they have recently seen, and bring Prince Hamlet’s
friend Horatio as a witness.
[-- Attachment #3: bug.txt --]
[-- Type: text/plain, Size: 960 bytes --]
Ihor Radchenko
Table of Contents
─────────────────
Prince Hamlet of Denmark is the son of the recently deceased King
Hamlet, and nephew of King Claudius, his father’s brother and successor.
Claudius hastily married King Hamlet’s widow, Gertrude, Hamlet’s mother,
and took the throne for himself. Denmark has a long-standing feud with
neighbouring Norway, in which King Hamlet slew King Fortinbras of Norway
in a battle some years ago. Although Denmark defeated Norway and the
Norwegian throne fell to King Fortinbras’s infirm brother, Denmark fears
that an invasion led by the dead Norwegian king’s son, Prince
Fortinbras, is imminent.
On a cold night on the ramparts of Elsinore, the Danish royal
castle, the sentries Bernardo and Marcellus discuss a ghost resembling
the late King Hamlet which they have recently seen, and bring Prince
Hamlet’s friend Horatio as a witness.
[-- Attachment #4: Type: text/plain, Size: 206 bytes --]
--
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92
next prev parent reply other threads:[~2022-10-01 5:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-30 10:40 Ox unindents lines but I can't see when Léo Ackermann
2022-10-01 5:32 ` Ihor Radchenko [this message]
2022-10-01 7:48 ` Léo Ackermann
2022-10-01 8:01 ` Ihor Radchenko
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=87tu4o1533.fsf@localhost \
--to=yantar92@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=leo.komba@gmail.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public 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).