Stefan Monnier writes: >> (completion-pcm--merge-completions '("ab" "ab") '(prefix "b")) >> -> ("b") > > Right this is a bug. > > (completion-pcm--merge-completions '("ab" "sab") '(prefix "b")) > > returns (correctly) > > ("b" "a" prefix) > > so > > (completion-pcm--merge-completions '("ab" "ab") '(prefix "b")) > > should return either ("b" "a") or ("b" "a" prefix). > > Could you accompany your patch of a regression test using > `completion-pcm--merge-completions` as above? Patch with test: