[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Getting link destination errors with index
From: |
Valery Ushakov |
Subject: |
Re: Getting link destination errors with index |
Date: |
Fri, 29 Jun 2018 23:57:30 +0300 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
On Wed, Jun 27, 2018 at 11:49:35 +0100, Mark Summerfield wrote:
> On Wed, 27 Jun 2018 13:22:08 +0300
> Valery Ushakov <address@hidden> wrote:
> > On Wed, Jun 27, 2018 at 11:19:29 +0100, Mark Summerfield wrote:
> >
> > > But when I use it twice, I get multiple errors:
> >
> > Can you provide a small self-contained example?
>
> I just realised that I can.
Ok, so the problem here is that Lout (I guess, too lazy to RTFS)
generates unique "lout%d" @FilterOut file name for each instance of a
filtering symbol - @Pipe in this case. But you only have one instance
of @Pipe, the one in the defintion of @X. So they end up with the
same file name for each invocation of your utility. Now, I guess,
again, is that lout reuses internal @Include implementation to get the
filtered data or something like that, so the end result is that on
each invocation of @X you get xrefs in the database that refer to the
same file name for different data.
The fix is to not use @Pipe, but to use @Filter directly.
import @BasicSetup
def @X
right @IndexData
{
def @Filter { "./fakelx.sh" "<" @FilterIn ">" @FilterOut }
@F { @IndexData }
}
@X{ Classes/Inheritance/Mixins } # NB: not quoted because filtered
And change reallx.sh to use standard input instead of command line
arguments.
If that's too much of a trouble, you can
import @BasicSetup
def @X
left @IndexData
right @Output
{
def @Filter { "./fakelx.sh" @IndexData "<" @FilterIn ">" @FilterOut }
@F { @Output }
}
{ "Classes/Inheritance/Mixins" } @X {} # NB: quoted
Note that you cannot use right @IndexData here (and ignore it when
passed as input) b/c you also need to refer to it inside @Filer to
pass it on the command line and that creates a loop.
I hope you can adapt this to your actual usage.
-uwe