Hongyi Zhao wrote (Sun, Nov 02, 2025 at 10:21:11PM +0800): > I am writing to seek your guidance on what is considered the best > practice for achieving reliable file path completion within the > arguments of LaTeX commands.
I faced the same problem, more or less, and ended up using hippie-expand (bound to M-/ for me) exclusively for file names, and company (which has company-capf as the first backend) for most other things. I've removed company-files altogether from company-backends, and have set hippie-expand-try-functions-list to '(try-complete-file-name-partially try-complete-file-name try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill) so that hippie-expand suggests file name completions first. This works for me, but of course, I have no idea whether there are other more elegant ways to achieve this effect.
