emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Fabio Natali <me@fabionatali.com>
To: emacs-orgmode@gnu.org
Subject: Allowed characters/formatting in Org text blocks
Date: Sun, 26 Jun 2022 01:12:04 +0100	[thread overview]
Message-ID: <YrekVANXrV/cCzQZ@localhost> (raw)

Hello,

I seem to be having problems when selecting an Org text block from an
Emacs Lisp snippet. An MVE follows.

Consider a buffer with the following blocks. In this first example, the
Emacs Lisp block runs successfully. The block "foo" is identified
correctly and the point gets moved accordingly.

#+name: foo
#+begin_src text
Hello world
#+end_src

#+begin_src emacs-lisp
(org-babel-goto-named-src-block "foo")
#+end_src

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

#+begin_src emacs-lisp
(org-babel-goto-named-src-block "bar")
#+end_src

#+results:
: source-code block ‘bar’ not found in this buffer

Is this expected? Am I misunderstanding what text blocks are for and
what characters/formatting they're allowed to use?

Thanks, best wishes, Fabio.


             reply	other threads:[~2022-06-26  0:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-26  0:12 Fabio Natali [this message]
2022-06-26  0:29 ` Allowed characters/formatting in Org text blocks Ihor Radchenko
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=YrekVANXrV/cCzQZ@localhost \
    --to=me@fabionatali.com \
    --cc=emacs-orgmode@gnu.org \
    /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).