help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is TAB-completion in shell not working for some commands?


From: Marius Hofert
Subject: Re: Why is TAB-completion in shell not working for some commands?
Date: Wed, 9 Nov 2011 09:34:20 +0100

On 2011-11-09, at 09:29 , Andreas Röhler wrote:

> Am 09.11.2011 08:54, schrieb Marius Hofert:
>> I just figured out that if I start emacs from the Mac's terminal (via 
>> "emacs" which starts /Applications/Emacs.app/Contents/MacOS/Emacs) and open 
>> an emacs shell with M-x shell, I can tab-complete a2ps.
>> 
>> Hmmm... so the GUI version seems to act weird...
>> 
> 
> If you do after shell prompt
> 
> M-x describe-variable RET completion-at-point-functions
> 
> what are the results, differ it in your environments?


in the emacs shell (GUI emacs), I get:

### start ####################################################

completion-at-point-functions is a variable defined in `minibuffer.el'.
Its value is (comint-completion-at-point t)

Local in buffer *shell*; global value is 
(tags-completion-at-point-function)


  This variable is potentially risky when used as a file local variable.

Documentation:
Special hook to find the completion table for the thing at point.
Each function on this hook is called in turns without any argument and should
return either nil to mean that it is not applicable at point,
or a function of no argument to perform completion (discouraged),
or a list of the form (START END COLLECTION &rest PROPS) where
 START and END delimit the entity to complete and should include point,
 COLLECTION is the completion table to use to complete it, and
 PROPS is a property list for additional information.
Currently supported properties are all the properties that can appear in
`completion-extra-properties' plus:
 `:predicate'   a predicate that completion candidates need to satisfy.
 `:exclusive'   If `no', means that if the completion data does not match the
   text at point failure, then instead of reporting a completion failure,
   the completion should try the next completion function.

[back]

### end ####################################################

If I start emacs shell from the emacs started in the terminal (where 
TAB-completion works), I get:

### start ####################################################

completion-at-point-functions is a variable defined in `minibuffer.el'.
Its value is (comint-completion-at-point t)

Local in buffer *shell*; global value is 
(tags-completion-at-point-function)


  This variable is potentially risky when used as a file local variable.

Documentation:
Special hook to find the completion table for the thing at point.
Each function on this hook is called in turns without any argument and should
return either nil to mean that it is not applicable at point,
or a function of no argument to perform completion (discouraged),
or a list of the form (START END COLLECTION &rest PROPS) where
 START and END delimit the entity to complete and should include point,
 COLLECTION is the completion table to use to complete it, and
 PROPS is a property list for additional information.
Currently supported properties are all the properties that can appear in
`completion-extra-properties' plus:
 `:predicate'   a predicate that completion candidates need to satisfy.
 `:exclusive'   If `no', means that if the completion data does not match the
   text at point failure, then instead of reporting a completion failure,
   the completion should try the next completion function.

### end ####################################################

=> looks like the same output


reply via email to

[Prev in Thread] Current Thread [Next in Thread]