unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Felix E. Klee" <felix.klee@inka.de>
Subject: Re: shell-mode autocompletion uglinesses
Date: Mon, 02 Dec 2002 21:40:50 +0100	[thread overview]
Message-ID: <asggfs$298$1@sapa.inka.de> (raw)
In-Reply-To: 84y978cgvh.fsf@lucy.cs.uni-dortmund.de

Kai Großjohann wrote:
>> 1. When I enter
>>      ls /usr/
>>    and press tab nothing happens. What I expect, however, is that I get a
>>    list of choices containing all files and directories in "/usr/".
> 
> What happens if you press TAB again?

Nothing.
 
>>    Then I press "n tab" and the shell command expands into
>>      ls /usr/include
>>    as intended. Now, however, the *Completions* buffer is still there
>>    although it is not needed anymore. How do I make it go away once I
>>    have finished my completion?
> 
> I think pcomplete has a mechanism for making the completions buffer
> disappear.  At least I know that eshell does this.

Yes, it works even in shell-mode. After a short delay the *Completions* 
buffer disappears.

>> If I cannot change the above behavior I'd rather use tab autocompletion
>> as implemented in my shell (BASH). Is this possible?
> 
> Once upon a time, there was a file which purported to use the tcsh
> tab completion in shell mode.  It was years ago.  Maybe it also works
> for bash.  I have no idea how to find the file.  It had `tcsh' in its
> name and possibly also `complet'.

Thanks, I'll try to find it if pcomplete is still insufficient.

> Another alternative would be to set up shell mode to use pcomplete
> now.  Hm.  Ah!  Maybe it's sufficient to
> 
>     (require 'shell)
>     (define-key shell-mode-map (kbd "TAB") 'pcomplete)
> 
> How about you try this?

Thanks! Now the examples above work. However there's a new problem:
1. I create a new shell.
2. I enter "ls pro", hit tab and get "ls projects".
3. After hitting enter and seeing the contents I type "ls pro" again.
4. Now, autocompletion doesn't work anymore, nothing happens.
So, somehow pcomplete seems to become corrupted. After its first 
autocompletion it can't autocomplete directories in the home directory any 
more. In addition pcomple sometimes hangs or is slow and I have to hit 
"C-g" to cancel it. 

I'm using 
  GNU Emacs 21.2.1 (i586-suse-linux, X toolkit, Xaw3d scroll bars) of
  2002-09-11 on amdsimb

Felix

  reply	other threads:[~2002-12-02 20:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-02 19:45 shell-mode autocompletion uglinesses Felix E. Klee
2002-12-02 20:20 ` Kai Großjohann
2002-12-02 20:40   ` Felix E. Klee [this message]
2002-12-02 23:52     ` Steffen Mazanek
2002-12-03  7:38     ` Kai Großjohann
2002-12-03  8:38       ` Kai Großjohann
2002-12-03 12:58         ` Felix E. Klee
2002-12-03 17:45           ` Kai Großjohann
2002-12-03 22:59             ` Romain FRANCOISE
2002-12-03 23:31               ` Felix E. Klee
2002-12-04  6:59                 ` Romain FRANCOISE
2002-12-08 11:33   ` Felix E. Klee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='asggfs$298$1@sapa.inka.de' \
    --to=felix.klee@inka.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).