Re: [pollen] smart-quotes with variables

2019-02-18 Thread Sorawee Porncharoenwase
The problem is that @(define x "asd") "asd" "@|x|" results in: '(@ "\"asd\"" "\n" "\n" "\"" "asd" "\"") Since string-proc only provides one string to smart-quotes at a time, smart-quotes can’t see the matching quotes for the latter asd, so no replacement occurs. To fix this, simp

Re: [pollen] Re: smart-quotes with variables

2019-02-18 Thread Sorawee Porncharoenwase
By multiple passes, I simply mean chaining decoding functions together, like this. (define (root . elements) ((compose1 decoder-1 decoder-2 decoder-3 ...) (txexpr '@ empty elements))) (define (decoder-1 tx) (decode tx #:txexpr-proc FOO #:string-proc BAR ...)) (define (decoder-

Re: [pollen] Simple question about nested custom tags

2019-02-26 Thread Sorawee Porncharoenwase
If digram-row‘s items will always be single, you can also make digram-row responsible for wrapping , which seems cleaner IMO. (define (digram-row . elements) (case (current-poly-target) [(txt) elements] [else (txexpr 'ol empty (map (lambda (e) (txexpr 'li empty (list e))) elements))]))

Re: [pollen] Re: Simple question about nested custom tags

2019-02-26 Thread Sorawee Porncharoenwase
You want to *invoke* digram, so: (define (lesser-yin) (case (current-poly-target) [(txt) "figure out later"] [else (digram "⚍")])) (note: untested) On Tue, Feb 26, 2019 at 7:39 AM Brendan Stromberger < brendanstromber...@gmail.com> wrote: > ;;; pollen.rkt > (define (digram . elements) >

Re: [pollen] Re: Simple question about nested custom tags

2019-02-26 Thread Sorawee Porncharoenwase
The third arguments of txexpr should be a list. That is, you should have: (define (digram-row . digrams) (txexpr 'table '((class "digram-table")) (list (txexpr `tr empty (list (txexpr `tbody empty (map (lambda (e) (txexpr 'td '((class "digram-row-cell")) (

Re: [pollen] Enthusiastic thank you and beginner question about metas

2019-03-28 Thread Sorawee Porncharoenwase
You might want to try this pollen.rkt #lang racket (provide (all-defined-out)) (define scuttlebutts (hash "Gillis" "@a;lksjd2j3j1k2j.sha256f" "Brenda" "@s8/sj31l13j2k32.sha256")) (define (author name) `(details (summary ,name) (p ,(hash-ref scuttlebutts name And here’s the output

Re: [pollen] getting the filename of current input source in pollen.rkt

2019-03-28 Thread Sorawee Porncharoenwase
Can we see your pollen.rkt? Anyhow, it’s very likely that you call (current-metas) outside of tag functions. (current-metas) is “undefined” outside of tag functions, which make sense if you think about it: pollen.rkt can be used by several Pollen markup files, and each markup file can define diffe

Re: [pollen] Unquoted values in HTML tags

2019-04-24 Thread Sorawee Porncharoenwase
First of all, from https://en.wikipedia.org/wiki/HTML_attribute#Description text and text are the same. That is, attributes are pretty much strings. Xexpr thus follows this, requiring that you always pass a string as an attribute. To get what you want, you would write ◊div[#:span "2"]{text}

Re: [pollen] A few questions about pollen capabilities

2019-05-10 Thread Sorawee Porncharoenwase
> > I want to be able to define aliases for pages, and be able to do like > `@link[the-alias]`. I noticed that i could use metas to implement this, so > that's fine. > > I want to have a CLI command that outputs all the aliases and the files > they refer to, as a way to remember the aliases. Ideal

Re: [pollen] [Newbie] Viewing X-Expressions outside DrRacket

2019-06-11 Thread Sorawee Porncharoenwase
racket article.html.pm On Tue, Jun 11, 2019 at 12:25 PM wrote: > I've been going through the Pollen tutorials, and I like what I see so > far. In DrRacket, when I run a .pm file, the lower half of the screen shows > a nice x-expression version of the file. (See 7.3.1 "Creating a Pollen > Markup

Re: [pollen] Custom pre-processing before pollen does its stuff

2019-07-23 Thread Sorawee Porncharoenwase
Can you provide an example of what you want to accomplish? On Tue, Jul 23, 2019 at 8:57 PM wrote: > I want to make some small additions to the syntax available to authors. > I'm considering two paths and would like some advice. > > 1. I could write a custom #lang that turns my pollen+additions i

Re: [pollen] Google Groups replacement needed

2019-08-12 Thread Sorawee Porncharoenwase
Wow... this is alarming. It's their fault and yet they couldn't do anything? A quick Googling (welp) led me to: - https://groups.io/ - http://librelist.com/ These are free of charge. Personally, I really like https://www.discourse.org/, but it's not free (unless you host it on your own server).

Re: [pollen] Google Groups replacement needed

2019-08-12 Thread Sorawee Porncharoenwase
> > + We're all using GH already, I think. > Not all people have GitHub accounts. - They may not be developers. - They might use other services like GitLab or BitBucket instead. As GitHub is pretty easy to register, I'd say these are not big issues. Note that the second point also applies to Goo