emacs-helm/helm

helm-locate: file names with special characters can't be acted on

michael-heerdegen opened this issue · 3 comments

What happened?

I e.g. do helm-locate archimagicum RET and that gives me matches that look like

'/home/micha/Treasure/today/youtube, music/Sorabji/Piano Sonata no.5 '$''''Opus archimagicum'$'''
'/home/micha/Treasure/today/youtube, music/Sorabji/Piano Sonata no.5 '$''''Opus archimagicum'$''''/I - Pars Prima [Arcana Minora]: Fiero, ardito (virtual performance).mp4'
'/home/micha/Treasure/today/youtube, music/Sorabji/Piano Sonata no.5 '$''''Opus archimagicum'$''''/V - Pars Altera [Arcana Majora] (virtual performance).mp4'

Note that the quotes around the file names are not part of the file name. If you try to open such a file you get an error.

The background is that these Gnu utils now by default quote file names with special characters in the output. AFAICT it is this change in behavior that causes this new problem. But: This can easily be supressed by providing the -N switch to locate. So, when I add -N to the gnu/linux line in helm-locate-set-command the problem is gone. I don't know whether the locate option is new or what it did in older or other locate versions (maybe only the default behavior changed and the option existed before?). But on newer Linux distributions it is definitely necessary (something similar happened to "ls" btw).

How to reproduce?

See above. With emacs-helm.sh. Use a search term that matches file names with special characters in it (like a quote), and a recent Gnu "locate" version.

Helm Version

Melpa or NonGnuElpa

Emacs Version

Emacs-30+

OS

GNU/Linux

Relevant backtrace (if possible)

No response

Minimal configuration

  • I agree using a minimal configuration

Forgot to say thanks in advance, so: TIA.

Thanks for the quick fix, works for me.

Closing this one.