On Tuesday, September 5, 2017 at 3:31:00 PM UTC+2, Leandro Facchinetti wrote: > > (Please, disregard the last email, it was sent by accident.) > > I think I understand what you’re proposing, now. > > I believe you’re getting the “#%app: missing procedure expression” error > because of the ‘()’, which is the first argument in the ‘unordered-list’ > call. > > You can try to work around this issue and still use ‘eval’. For example, > you can try to redefine the ‘#%app’ form in a way that ignores ‘()’. If > this doesn’t make sense, take a look at Beautiful Racket [1]. But it feels > like fighting the system. >
Indeed it does feel like fighting the system, which I why I thought I'd write. Thanks for the pointer though. I've found nice explainers in Beautiful Racket. Just haven't had time to sit down and read it. > > Maybe a better approach would be to redefine ‘bullet-list’ such that it > calls ‘unordered-list’, ‘list-item’, ‘paragraph’ and so forth as functions. > Or, if ‘bullet-list’ is beyond your control, try to post-process the > generated txexpr using some form of ‘decode’, for example. > Bullet-list is in my control, I was just using the example from the pollen Typography for Lawyers for inspiration since it felt like writing tags for every list felt too heavy, and I figured others had run into this issue before. So, I can re-write it to call the correct functions. I was also interesting in the post-processing in decode, but I'm still not sure where I would attach to in decode. I guess it'd be the txexpr-elements hook, but that only seems to deal with the elements. I'll have to check the docs. > More broadly, I wouldn’t say a txexpr is the end of the line. Quite the > opposite, the advantage of working with txexpr—as opposed to, for example, > strings—is precisely that they’re more convenient to handle > programmatically. The issue is just that ‘eval’ doesn’t seem to be the best > way to go about doing it. > Right, what I thought too. That's also why I was wondering if pollen had it's own "pollen-eval" or some such things (or just literally stuff it into the input). It feels like sometimes you really just want to run the output again. I can see the can of worms it would open, so understand if it's not allowed. Thanks for the help! -- You received this message because you are subscribed to the Google Groups "Pollen" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
