It's currently not intended to work for packages installed in user
scope --- only for packages in the main installation --- although
probably it shouldn't report a path error for a user-scope package.

I'm not sure how difficult it would be to make redirection work on a
user-scope package's documentation. The function doesn't "just work"
for user-scope, because the location where documentation is rendered is
different for user-scope packages and installation-scope packages. It
might end up being about the same implementation effort to improve the
error message or to make the function work on user-scope packages,
though.

At Sun, 12 Jul 2020 15:16:37 -0700 (PDT), "'Joel Dueck' via Racket Users" wrote:
> Trying to generate URLs for linking into the Racket docs. I get the error 
> below, but only when the package/identifier combo in question are installed 
> in user scope, and only when using the `#:external-root-url` keyword 
> argument:
> 
>     > (define x (xref-binding->definition-tag (load-collections-xref) 
> '(deta/query lookup) 0))
>     > x
>     '(def ((lib "deta/query.rkt") lookup))
> 
>     ;; works good:
>     > (xref-tag->path+anchor (load-collections-xref) x)
>     #<path:/Users/joel/Library/Racket/7.7/pkgs/deta-doc/doc/deta/index.html>
>     "(def._((lib._deta/query..rkt)._lookup))"
> 
>     > (xref-tag->path+anchor (load-collections-xref) x #:external-root-url 
> "http://docs.racket-lang.org/";)
>     . . ../../../../../../Applications/Racket 
> v7.7/collects/racket/private/kw.rkt:1393:47: path-element->string: contract 
> violation
>     expected: path?
>     given: 'up
> 
> Is this a bug? Or is there a way to make this work for user-scope packages 
> as well?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20200713073746.2ce%40sirmail.smtp.cs.utah.edu.

Reply via email to