Org.jl icon indicating copy to clipboard operation
Org.jl copied to clipboard

Warning: No method for converting Org.RegularLink to a term representation currently exists

Open nathanaelbosch opened this issue 2 years ago • 4 comments

This warning came up a lot when I tried out the package:

Warning: No method for converting Org.RegularLink to a term representation currently exists

It would be great to have this fixed!

nathanaelbosch avatar Jan 02 '24 12:01 nathanaelbosch

As a first try to fix this issue I did:

term(io::IO, l::Org.RegularLink, s::Vector{String}) = (term(io, l.description[1]); term(io, l.path))

This removes the warnings and shows the description correctly, but the path is not rendered.

EDIT: A more robust version seems to be

term(io::IO, l::Org.RegularLink, s::Vector{String}) = begin
    if !isnothing(l.description)
        for d in l.description
            term(io, d)
        end
    end
    term(io, l.path)
end

nathanaelbosch avatar Jan 02 '24 12:01 nathanaelbosch

Thanks, Nathanael! As it happens term(io::IO, o::OrgDoc, link::RegularLink, stylecodes::Vector{String}=String[]) already exists but the warning isn't very good. I'll see what I can do about that.

tecosaur avatar Feb 20 '24 06:02 tecosaur

I've just pushed 7ec8d9d32dbd6eadc489900d2550c2179fc48db1, which should help

tecosaur avatar Feb 20 '24 06:02 tecosaur