On Thu, Jan 09, 2025 at 03:20:30AM -0800, Lindsay Lawrence wrote:
> My working version for linking into a wiki page (handling sessions) and
> support for raw html looks like the code below
> which lets me write wiki code like
>
> .
> Goto my ^{?DevForum#viprc viprc}
> .
>
> and on the DevForum page
>
> .
> ;{<h3 id="viprc">My viprc</h3>}
Cool! If this works, could we also introduce it into the original
version?
If so, I would suggest some minor improvements:
> # >>> lindsay
> (ifn (= "?" (car (chop (car S))))
You can check with 'pre?' for the first char of a symbol. Thus:
(ifn (pre? "?" (car S))
But: Doesn't this conflict with with other URLs having an argument?
Shouldn't it be "#" instead of "?"?
> (prin "???")
> (<href>
> (or (glue " " (cdr S)) (pack (car S)))
> (if *Login
> (setq Url (glue "" (list (baseHRef NIL *SesId) (pack (car
> S)) )) )
> (setq Url (glue "" (list (baseHRef *Port1) (pack (car S))
> )) )
What is "(setq Url" for? I suspect this just a debugging artefact.
Glueing nothing with "(glue "" (list" is just 'pack'. But as 'baseHRef'
automatically packs all its arguments anyway, I believe you can simply
write:
(if *Login
(baseHRef NIL *SesId (car S))
(baseHRef *Port1 (car S)) )
(I have not tested)
Can you try the changes?
☺/ A!ex
--
UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe