* using info in a filter
@ 2016-03-28 15:16 John Kitchin
2016-03-30 14:02 ` Nicolas Goaziou
0 siblings, 1 reply; 3+ messages in thread
From: John Kitchin @ 2016-03-28 15:16 UTC (permalink / raw)
To: Org Mode Mailing List
How does one use the info in a filter?
e.g.
in (defun my-block-filter (data backend info))
data is the transcoded block string, and I want to add something to it
based on say the type of block, name and header of the corresponding
block. Is it possible to get to that from the info? Or is this a case
where it is easier to make a custom backend with a function like:
(defun sb-format (sb contents info)) that builds up the output string?
--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: using info in a filter
2016-03-28 15:16 using info in a filter John Kitchin
@ 2016-03-30 14:02 ` Nicolas Goaziou
2016-03-30 18:33 ` John Kitchin
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2016-03-30 14:02 UTC (permalink / raw)
To: John Kitchin; +Cc: Org Mode Mailing List
Hello,
John Kitchin <jkitchin@andrew.cmu.edu> writes:
> How does one use the info in a filter?
>
> e.g.
>
> in (defun my-block-filter (data backend info))
>
> data is the transcoded block string, and I want to add something to it
> based on say the type of block, name and header of the corresponding
> block. Is it possible to get to that from the info? Or is this a case
> where it is easier to make a custom backend with a function like:
>
> (defun sb-format (sb contents info)) that builds up the output string?
Purpose for INFO in filters is to give access to export options. You
cannot have easily access to the element being exported.
Another option is to use a parse tree filter, or as you suggest,
a custom back-end.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: using info in a filter
2016-03-30 14:02 ` Nicolas Goaziou
@ 2016-03-30 18:33 ` John Kitchin
0 siblings, 0 replies; 3+ messages in thread
From: John Kitchin @ 2016-03-30 18:33 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Org Mode Mailing List
ok, thanks.
Nicolas Goaziou writes:
> Hello,
>
> John Kitchin <jkitchin@andrew.cmu.edu> writes:
>
>> How does one use the info in a filter?
>>
>> e.g.
>>
>> in (defun my-block-filter (data backend info))
>>
>> data is the transcoded block string, and I want to add something to it
>> based on say the type of block, name and header of the corresponding
>> block. Is it possible to get to that from the info? Or is this a case
>> where it is easier to make a custom backend with a function like:
>>
>> (defun sb-format (sb contents info)) that builds up the output string?
>
> Purpose for INFO in filters is to give access to export options. You
> cannot have easily access to the element being exported.
>
> Another option is to use a parse tree filter, or as you suggest,
> a custom back-end.
>
> Regards,
--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-30 18:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-28 15:16 using info in a filter John Kitchin
2016-03-30 14:02 ` Nicolas Goaziou
2016-03-30 18:33 ` John Kitchin
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.