Any suggestions on how to disable completion-at-point in Emacs shell (see below)?

I've looked in the GNU docs on the relevant hook (which is oddly named) - completion-at-point-functions - but given that the hook's value is simply a list of available functions, it's not clear to me how I can use it as a toggle.

The goal is to be able to have my TAB key back when using the Emacs shell. I'd also be okay with turning off completion-at-point-functions globally (since I'm an ido junkie) but I'm not sure how to do that for global minor modes.

As reference, this is the window I'm referring to:

Click <mouse-2> on a completion to select it.
In this buffer, type RET to select the completion near point.

Possible completions are:
  • 1
    Firstly, eshell uses pcomplete by default, completion-at-point is a fallback (call M-x find-function RET eshell-pcomplete to see it). Second, what do you mean when you say you want your “tab key back”? Do you want it to insert a tab character “\t”?
    – Malabarba
    Oct 23, 2014 at 12:08
  • Am not claiming that completion-at-point is the default in eshell... Yes, that's correct, I'd like to be able to insert a tab character "\t" using the <TAB> key.
    – iceman
    Oct 23, 2014 at 15:12

1 Answer 1

(add-hook 'comint-mode-hook (lambda () (define-key comint-mode-map "\t" 'self-insert-command)))
  • I get the following error after adding it to my init.el file: Symbol's value as variable is void: comint-mode-map. Should work conceptually though.
    – iceman
    Oct 23, 2014 at 17:10
  • 1
    You need to do that after entering comint-mode. I've updated the example to show you what I mean. This is general: when you want to do something for a particular mode, you typically want to do in on the hook for that mode. See this question.
    – Drew
    Oct 23, 2014 at 17:11
  • Works like a charm. Thanks for bearing with me, am new to emacs lisp
    – iceman
    Oct 23, 2014 at 20:42
  • No problem. We are all learning, all the time. That's what this site is for.
    – Drew
    Oct 23, 2014 at 20:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.