Hi, I have found out that substring and flex completion ignore the implicit trailing ‘any’ introduced by ‘completion-pcm--optimize-pattern’. This is evident from the examples shown next. My Emacs version is 28.0.50, built on 2020-07-01 from commit e98ddd6fc1. Example 1 ========= (completion-substring-all-completions "f" (list "f") nil 1) and (completion-flex-all-completions "f" (list "f") nil 1) both result in (#("f" 0 1 (face completions-common-part completion-score 0.0)) . 0) whereas I would expect a completion score of 1. Example 2 ========= (completion-substring-all-completions "fo" (list "fo") nil 1) results in (#("fo" 0 1 (face completions-common-part completion-score 0.5) 1 2 (face (completions-first-difference completions-common-part))) . 0) whereas I would again expect a completion score of 1. Proposed Solution ================= I propose that we make the implicit trailing ‘any’ explicit in ‘completion-substring--all-completions’.