emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: kabriel@3imail.com
To: emacs-orgmode@gnu.org
Cc: kabriel@3imail.com
Subject: macro with inline source does not work in table cells
Date: Tue, 10 Apr 2018 14:09:14 -0400	[thread overview]
Message-ID: <877epfx7at.fsf@3imail.com> (raw)

Hi,

I have defined a macro that uses an emacs-lisp inline source code. It
works fine in all the usual places, except table cells. A more standard
macro (that does not use a source code block) works fine. I have tried
looking through the source code in the exporter, but cannot quite figure
out why this isn't working.

Would anyone have an idea of how to get the expected behavior? Below is
an example.

<<< begin example org-mode file>>>
* Test: macro fails in table cell
#+MACRO: kw src_emacs-lisp[:exports results :results raw]{(concat "=" (upcase "$1") "=")}
#+MACRO: ku =$1=

Try "hello {{{kw(world)}}}," but let's put it in a table [[tab:eg]]

#+NAME: tab:eg
#+CAPTION: Test table with "hello {{{kw(world)}}}"
| Statement  | Object          |
|------------+-----------------|
| hello      | {{{kw(world)}}} |
| this macro | {{{ku(works)}}} |

<<< end >>>

Org mode version 9.1.1 (9.1.1-17-g24ea1b-elpaplus)
GNU Emacs 25.3.1

-- Kabriel

             reply	other threads:[~2018-04-10 18:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-10 18:09 kabriel [this message]
2018-04-11 10:52 ` Nicolas Goaziou
2018-04-12 18:32   ` Severin Kempf
2018-04-12 18:40     ` Nicolas Goaziou
2018-04-12 21:02       ` Severin Kempf

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=877epfx7at.fsf@3imail.com \
    --to=kabriel@3imail.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: macro with inline source does not work in table cells' \
    /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).