From: Josh <jnfo-d@grauman.com>
To: emacs-orgmode@gnu.org
Subject: Re: Macro that calls external program
Date: Mon, 11 Mar 2019 06:28:59 -0700 (PDT) [thread overview]
Message-ID: <alpine.LRH.2.21.1903110618070.9357@colo.shuman.org> (raw)
In-Reply-To: <87va0prz8r.fsf@geus3064linuxwsm.geus.dk>
Thanks Ken.
Yes, at first I was trying to accomplish my task with Macros, but after
finding out that I could run the whole Org file through a pre-filter, I
realized that this would be a much cleaner and easier way rather than
having multiple types of macros or code blocks. So now I'm trying to
figure out how to attach an external program to
`org-export-before-parsing-hook' or `org-export-before-processing-hook' to
pipe the entire Org file through...
Josh
On Mon, 11 Mar 2019, Ken Mankoff wrote:
> Hi Josh,
>
> On 2019-03-10 at 23:37 +0100, Josh <jnfo-d@grauman.com> wrote...
>> I am new to emacs and orgmode. I spent the last couple days reading
>> most of the docs before diving in,
>
> Welcome!
>
>> but I didn't see anywhere how I could have a macro that instead of
>> replacing the macro with lisp code, calls an external program instead.
>>
>> Something like:
>> #+MACRO: func call /home/josh/mybinary $1
>>
>> {{{func(Text Argument)}}}
>>
>> and this would be setup to call an external program and the output of
>> the program would replace the macro on export.
>>
>> /home/josh/mybinary "Text Argument"
>
> I do wonder if you're asking an XY problem, especially after reading your follow-up question about running an entire Org file through a pre-filter.
>
> Why does it have to be a macro that you call? Why not #+NAME:'d Babel code block, which can (presumably) run any program you want.
>
> -k.
>
prev parent reply other threads:[~2019-03-11 20:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-10 22:37 Macro that calls external program Josh
2019-03-11 7:46 ` Eric S Fraga
2019-03-11 11:19 ` Josh
2019-03-11 19:03 ` Eric Abrahamsen
2019-03-11 20:48 ` John Kitchin
2019-03-11 19:24 ` Ken Mankoff
2019-03-11 13:28 ` Josh [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LRH.2.21.1903110618070.9357@colo.shuman.org \
--to=jnfo-d@grauman.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.