When I'm using emacs-shell
, I often try to run files for which a backup (with ~
ending) exists.
I use Helm, and if I try to auto-complete the name of a file called, say, seed-rand.rb
, with an existing backup, I get a result like the image below:
completion-at-point
really isn't helping me here—is there any way of telling it to ignore files ending with ~
? (That's what it does when helm-mode
is turned off.)
And if that's not possible, is there any way of just turning this helm feature off without toggling helm-mode
every time I want to do so?
1 Answer
@xuchunyang solved this (see the comments section):
"When the global minor mode helm-mode
is off (it is by default), the behavior of completion-at-point
will not be changed by helm at all. If you want to turn on helm-mode
and don't want it to change completion-at-point
, customize user option helm-completing-read-handlers-alist
."
I had success when performing this solution via M-x customize
.
-
1Why the downvote? I only answered myself so that the question registered as answered on the site, and I credited the person that provided the solution. I'm happy for @xuchunyang to answer instead, and if they do I'll accept their answer instead of mine.– achalkCommented Jan 17, 2017 at 2:18
helm-mode
disabled. Also, note that the function used to compute the completion candidates istags-completion-at-point-function
in both cases, so we shouldn't expect any difference either.C-h c
to ask Emacs which function is running when I hit<tab>
, it returnscompletion-at-point
? Is that the wrong way to figure out the function that runs?helm-mode
should only affect how the completion candidates are displayed --- not what they are. This is the behavior I observe when trying to reproduce your problem.helm-mode
is off (it is by default), the behavior ofcompletion-at-point
will not be changed by helm at all. If you want to turn onhelm-mode
and don't want it to changecompletion-at-point
, customize user optionhelm-completing-read-handlers-alist
.