emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* macro with inline source does not work in table cells
@ 2018-04-10 18:09 kabriel
  2018-04-11 10:52 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: kabriel @ 2018-04-10 18:09 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: kabriel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-04-12 21:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-10 18:09 macro with inline source does not work in table cells kabriel
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

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).