emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Welle <mwe012008@gmx.net>
To: emacs-orgmode@gnu.org
Subject: special blocks extras
Date: Sun, 26 Feb 2023 09:02:44 +0100	[thread overview]
Message-ID: <875yboua57.fsf@luisa.c0t0d0s0.de> (raw)

Hi,

I wanted to play with special blocks and started by installing the
package org-special-block-extras and defining a new block:

(org-defblock hmwfoo nil (reps 3)
  "Ahoj"
  (message "ahoj: %s" contents)
  (org-parse (s-repeat reps contents)))

For the tests I started with exporting to html.

A link like [[hmwfoo:][oink]] seems to work, I see three concatenated
oinks.

A block like

#+begin_hmwfoo
oink
#+end_hmwfoo

exports to only one single oink. According to my understanding both, the
link and the block, should be equivalent?

Well, then I activated the special block extras minor mode before
exporting and things got strange. The link still seems to work, but the
block results in an html page rendered like this:

#+end_export oink

oink

oink

#+begin_export html

Three oinks, but lots of line breaks and the export markers are part of
the rendered page. Hm, that's not what I expected ;). Do I use it the
wrong way or is there a bug hidden somewhere?

All the best
hmw


                 reply	other threads:[~2023-02-26  8:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=875yboua57.fsf@luisa.c0t0d0s0.de \
    --to=mwe012008@gmx.net \
    --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).