Filtered lists (e.g. the shorthand list) get every set and set member re-added once any set passes the filter
@plk ci sta già lavorando.
Dal 2/11/2026.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 60/100
Direzione di ricerca
Il bug si trova nel blocco di riaggiunta dei membri dell'insieme in process_lists in lib/Biber.pm, intorno alle righe 3161-3170, dove il blocco first ignora $_. Riproducilo con l'esempio di lista shorthand (.bib e .tex) della issue e controlla \datalist[list]{shorthand:...} nell'output generato. È completato quando la lista shorthand contiene solo a, b, S1 e i test esistenti sotto t/ continuano a passare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
🤖 This issue was identified by Claude Opus 5.5, and the text below is entirely written by Claude Opus 5.5
After filtering a list, process_lists adds back the members of sets that passed the filter (Biber.pm:3164-3170 on dev; this was added in 2.20 for #457):
my @sets = grep {$section->bibentry($_)->get_field('entrytype') eq 'set'} $flist->@*;
foreach my $k ($list->get_keys->@*) {
my $be = $section->bibentry($k);
if (first {$be->get_field('entryset')} @sets) {
push $flist->@*, $k;
}
}
The block passed to first doesn't use $_, so it is true for every entry that has an entryset field (every set, and every member of any set) as soon as @sets is non-empty. In the shorthand list below, only S1 has a shorthand, but S2, c and d are added too:
@set{S1, entryset = {a,b}, shorthand = {SH1}}
@set{S2, entryset = {c,d}}
@book{a, author = {Alpha, A.}, title = {TA}, year = {2000}}
@book{b, author = {Beta, B.}, title = {TB}, year = {2001}}
@book{c, author = {Gamma, C.}, title = {TC}, year = {2002}}
@book{d, author = {Delta, D.}, title = {TD}, year = {2003}}
@book{e, author = {Eps, E.}, title = {TE}, year = {2003}}
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\addbibresource{test.bib}
\begin{document}
\cite{S1,S2,e}
\printbiblist{shorthand}
\printbibliography
\end{document}
biber 2.22 and current dev (79a1edc) write S2, a, b, c, d, S1 into \datalist[list]{shorthand:…}; it should be a, b, S1. With first, a set key 0 would also count as "not found".
Suggested fix
--- a/lib/Biber.pm
+++ b/lib/Biber.pm
@@ -3161,10 +3161,11 @@
}
# Now add set members of sets which have not been filtered out
- my @sets = grep {$section->bibentry($_)->get_field('entrytype') eq 'set'} $flist->@*;
+ my %sets = map {$_ => 1} grep {$section->bibentry($_)->get_field('entrytype') eq 'set'} $flist->@*;
foreach my $k ($list->get_keys->@*) {
my $be = $section->bibentry($k);
- if (first {$be->get_field('entryset')} @sets) {
+ next if $be->get_field('entrytype') eq 'set'; # sets are filtered like other entries
+ if (grep {$sets{$_}} ($be->get_field('entryset') // [])->@*) {
push $flist->@*, $k;
}
}
With this change the shorthand list contains a, b, S1. All tests in t/ pass on dev (79a1edc) with this patch, applied together with the others I'm filing alongside it.
- Lingua principale
- TeX
- Stelle
- 397
- Fork
- 42
- Merge medio
- 8h 3m
- PR unite (30g)
- 1
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di plk/biber
-
`singletitle`/`uniquetitle`/`uniquework` only ignore entries whose `options` field contains the literal token `skipbib`; `skipbib=true` and `dataonly` still countForse già presa @plk l’ha presa 8 giorni fa. ApertaBug fixedindev
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
`--output-fieldcase=Upper` (any non-lowercase spelling) and an invalid `output_fieldcase` in `biber.conf` crash biberForse già presa @plk l’ha presa 10 giorni fa. ApertaBug fixedindev
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
`presort` values are used as a regex: `presort = {a(b}` crashes biber, and `|`, `+`, `?` give the wrong `sortinit`Forse già presa @plk l’ha presa 10 giorni fa. ApertaBug fixedindev
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Range length wrong when an abbreviated range end contains a 0 (`pages = {315-20}` gives `\range{pages}{11}`)Forse già presa @plk l’ha presa 16 giorni fa. ApertaBug fixedindev
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
biber hangs forever when a name list contains an empty name (e.g. `author = {Doe, Jane and ,}`)Forse già presa @plk l’ha presa 16 giorni fa. ApertaBug fixedindev
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
Issue simili
-
Websockify heartbeat for vnc_containerForse già presa @robinkar l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
swc-project/swc-ai-issues#414 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
swagger-api/swagger-client#4318 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
line/centraldogma#1397 ·
I maintainer di solito rispondono entro 2 giorni