Filtered lists (e.g. the shorthand list) get every set and set member re-added once any set passes the filter
@plk is already working on this.
Since Nov 2, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 60/100
Research direction
The bug is in the set-member re-adding block of process_lists in lib/Biber.pm, around lines 3161-3170, where the first block ignores $_. Reproduce it with the shorthand-list .bib and .tex example from the issue and inspect \datalist[list]{shorthand:...} in the generated output. Done means the shorthand list contains only a, b, S1, and the existing tests under t/ still pass.
Written by the indexing model from the issue text.
Description
🤖 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.
- Dominant language
- TeX
- Stars
- 396
- Forks
- 40
- Avg merge
- 8h 3m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from plk/biber
-
`singletitle`/`uniquetitle`/`uniquework` only ignore entries whose `options` field contains the literal token `skipbib`; `skipbib=true` and `dataonly` still countPossibly taken @plk claimed this 4 days ago. OpenBug fixedindev
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
`--output-fieldcase=Upper` (any non-lowercase spelling) and an invalid `output_fieldcase` in `biber.conf` crash biberPossibly taken @plk claimed this 5 days ago. OpenBug fixedindev
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
`presort` values are used as a regex: `presort = {a(b}` crashes biber, and `|`, `+`, `?` give the wrong `sortinit`Possibly taken @plk claimed this 5 days ago. OpenBug fixedindev
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Range length wrong when an abbreviated range end contains a 0 (`pages = {315-20}` gives `\range{pages}{11}`)Possibly taken @plk claimed this 12 days ago. OpenBug fixedindev
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
biber hangs forever when a name list contains an empty name (e.g. `author = {Doe, Jane and ,}`)Possibly taken @plk claimed this 12 days ago. OpenBug fixedindev
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
guybedford/es-module-lexer#266 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Fei2411/DeepSeek-Bot#1033 ·
-
flang flang:runtime
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
llvm/llvm-project#239867 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
jellyfin/jellyfin-roku#1137 ·
Maintainers usually reply within 14 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
strawberry-graphql/strawberry#4794 ·
Maintainers usually reply within 1 day