From: Ihor Radchenko <yantar92@gmail.com>
To: Fabio Natali <me@fabionatali.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Allowed characters/formatting in Org text blocks
Date: Sun, 26 Jun 2022 08:29:02 +0800 [thread overview]
Message-ID: <8735fsuv1t.fsf@localhost> (raw)
In-Reply-To: <YrekVANXrV/cCzQZ@localhost>
Fabio Natali <me@fabionatali.com> writes:
> Now consider a slight variation where "Hello world" is formatted as a
> Org heading. The 'org-babel-goto-named-src-block' function is no longer
> able to identify the text block. Executing the Emacs Lisp block results
> in the error message below.
>
> #+name: bar
> #+begin_src text
> * Hello world
> #+end_src
> ...
> Is this expected? Am I misunderstanding what text blocks are for and
> what characters/formatting they're allowed to use?
Headline markup has the highest priority. Your block is interpreted as
<paragraph with #+name affiliated keyword>
#+name: bar
#+begin_sec text
<headline>
* Hello world
<paragraph>
#+end_src
See https://orgmode.org/manual/Literal-Examples.html
You need to escape "*" and "#+" at the beginning of line inside code
blocks using comma: ",*", ",#+".
Org will do it for you automatically if you use C-c ' interface to edit
source blocks.
Best,
Ihor
next prev parent reply other threads:[~2022-06-26 0:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-26 0:12 Allowed characters/formatting in Org text blocks Fabio Natali
2022-06-26 0:29 ` Ihor Radchenko [this message]
2022-06-26 11:09 ` Fabio Natali
2022-06-26 11:39 ` Ihor Radchenko
2022-06-26 17:31 ` Fabio Natali
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=8735fsuv1t.fsf@localhost \
--to=yantar92@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=me@fabionatali.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).