* shell-mode autocompletion uglinesses
@ 2002-12-02 19:45 Felix E. Klee
2002-12-02 20:20 ` Kai Großjohann
0 siblings, 1 reply; 12+ messages in thread
From: Felix E. Klee @ 2002-12-02 19:45 UTC (permalink / raw)
Hi,
there are two things that bother me enormously when using autocompletion in
shell-mode.
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/".
2. Suppose my EMACS window is split horizontally with a shell in one buffer
and a README giving me instructions in another buffer. When I enter
ls /usr/in
I see the following list in the *Completions* buffer:
include/ info/
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?
If I cannot change the above behavior I'd rather use tab autocompletion as
implemented in my shell (BASH). Is this possible?
Felix
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: shell-mode autocompletion uglinesses
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
2002-12-08 11:33 ` Felix E. Klee
0 siblings, 2 replies; 12+ messages in thread
From: Kai Großjohann @ 2002-12-02 20:20 UTC (permalink / raw)
"Felix E. Klee" <felix.klee@inka.de> writes:
> there are two things that bother me enormously when using autocompletion in
> shell-mode.
> 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?
> 2. Suppose my EMACS window is split horizontally with a shell in one buffer
> and a README giving me instructions in another buffer. When I enter
> ls /usr/in
> I see the following list in the *Completions* buffer:
> include/ info/
> 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.
Maybe Emacs will use pcomplete completion by default in the future.
> 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'.
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?
pcomplete completion is programmable. It groks `make' (completes on
targets from Makefile) by default.
--
~/.signature is: umop ap!sdn (Frank Nobis)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: shell-mode autocompletion uglinesses
2002-12-02 20:20 ` Kai Großjohann
@ 2002-12-02 20:40 ` Felix E. Klee
2002-12-02 23:52 ` Steffen Mazanek
2002-12-03 7:38 ` Kai Großjohann
2002-12-08 11:33 ` Felix E. Klee
1 sibling, 2 replies; 12+ messages in thread
From: Felix E. Klee @ 2002-12-02 20:40 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: shell-mode autocompletion uglinesses
2002-12-02 20:40 ` Felix E. Klee
@ 2002-12-02 23:52 ` Steffen Mazanek
2002-12-03 7:38 ` Kai Großjohann
1 sibling, 0 replies; 12+ messages in thread
From: Steffen Mazanek @ 2002-12-02 23:52 UTC (permalink / raw)
"Felix E. Klee" <felix.klee@inka.de> writes:
I have this problem, too. Try "man something". Thats really funny.
--
Steffen Mazanek
Werner Heisenberg Weg 102 App. 232
85579 Neubiberg
GPG key fingerprint: A165 227D B288 5E10 701D BF5F E91C 6B88 24C8 397D
http://blackhole.pca.dfn.de:11371/pks/lookup?op=get&search=0x24C8397D
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: shell-mode autocompletion uglinesses
2002-12-02 20:40 ` Felix E. Klee
2002-12-02 23:52 ` Steffen Mazanek
@ 2002-12-03 7:38 ` Kai Großjohann
2002-12-03 8:38 ` Kai Großjohann
1 sibling, 1 reply; 12+ messages in thread
From: Kai Großjohann @ 2002-12-03 7:38 UTC (permalink / raw)
"Felix E. Klee" <felix.klee@inka.de> writes:
> 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
Whee! This problem exists in the head, too.
I'm not sure if I did it the wrong way.
--
~/.signature is: umop ap!sdn (Frank Nobis)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: shell-mode autocompletion uglinesses
2002-12-03 7:38 ` Kai Großjohann
@ 2002-12-03 8:38 ` Kai Großjohann
2002-12-03 12:58 ` Felix E. Klee
0 siblings, 1 reply; 12+ messages in thread
From: Kai Großjohann @ 2002-12-03 8:38 UTC (permalink / raw)
kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes:
> Whee! This problem exists in the head, too.
I've now sent a message to the thread on emacs-devel discussing the
integration.
--
~/.signature is: umop ap!sdn (Frank Nobis)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: shell-mode autocompletion uglinesses
2002-12-03 8:38 ` Kai Großjohann
@ 2002-12-03 12:58 ` Felix E. Klee
2002-12-03 17:45 ` Kai Großjohann
0 siblings, 1 reply; 12+ messages in thread
From: Felix E. Klee @ 2002-12-03 12:58 UTC (permalink / raw)
Kai Großjohann wrote:
> I've now sent a message to the thread on emacs-devel discussing the
> integration.
Thanks!
Felix
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: shell-mode autocompletion uglinesses
2002-12-03 12:58 ` Felix E. Klee
@ 2002-12-03 17:45 ` Kai Großjohann
2002-12-03 22:59 ` Romain FRANCOISE
0 siblings, 1 reply; 12+ messages in thread
From: Kai Großjohann @ 2002-12-03 17:45 UTC (permalink / raw)
"Felix E. Klee" <felix.klee@inka.de> writes:
> Kai Großjohann wrote:
>> I've now sent a message to the thread on emacs-devel discussing the
>> integration.
>
> Thanks!
The following appears to integrate pcomplete into shell mode:
(require 'shell)
(define-key shell-mode-map (kbd "TAB") 'pcomplete)
(add-hook 'shell-mode-hook 'pcomplete-shell-setup)
--
~/.signature is: umop ap!sdn (Frank Nobis)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: shell-mode autocompletion uglinesses
2002-12-03 17:45 ` Kai Großjohann
@ 2002-12-03 22:59 ` Romain FRANCOISE
2002-12-03 23:31 ` Felix E. Klee
0 siblings, 1 reply; 12+ messages in thread
From: Romain FRANCOISE @ 2002-12-03 22:59 UTC (permalink / raw)
Kai Großjohann writes:
> The following appears to integrate pcomplete into shell mode:
> (require 'shell)
> (define-key shell-mode-map (kbd "TAB") 'pcomplete)
> (add-hook 'shell-mode-hook 'pcomplete-shell-setup)
You might also want to add the following, if you want to have a
completion that behaves like the default completion:
(setq pcomplete-cycle-completions nil)
Otherwise you'll get the default cycling completion of pcomplete, which
is not very intuitive if you're used to Emacs in general, or to the
default Bash completion mechanism.
And beware, completion of things (filenames, directories) containing
spaces won't work.
Romain.
--
Romain FRANCOISE <romain@orebokech.com> | I'm flooded out with energy,
it's a miracle -- http://orebokech.com/ | energy and deceit.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: shell-mode autocompletion uglinesses
2002-12-03 22:59 ` Romain FRANCOISE
@ 2002-12-03 23:31 ` Felix E. Klee
2002-12-04 6:59 ` Romain FRANCOISE
0 siblings, 1 reply; 12+ messages in thread
From: Felix E. Klee @ 2002-12-03 23:31 UTC (permalink / raw)
Romain FRANCOISE wrote:
> And beware, completion of things (filenames, directories) containing
> spaces won't work.
This is not good. I guess I'll have to search for a minor mode for
shell-mode that lets me use the completion mechanism in the current shell
(eg. BASH) or application (eg. ncftp) running therein.
Felix
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: shell-mode autocompletion uglinesses
2002-12-03 23:31 ` Felix E. Klee
@ 2002-12-04 6:59 ` Romain FRANCOISE
0 siblings, 0 replies; 12+ messages in thread
From: Romain FRANCOISE @ 2002-12-04 6:59 UTC (permalink / raw)
Felix E Klee writes:
>> And beware, completion of things (filenames, directories) containing
>> spaces won't work.
> This is not good.
It is being worked on.
> I guess I'll have to search for a minor mode for shell-mode that lets
> me use the completion mechanism in the current shell (eg. BASH) or
> application (eg. ncftp) running therein.
If an application has specific completion facilities, I use term-mode
to take advantage of them. But you lose the added benefits of the
common interface that comint provides.
But if you find such a mode, please tell me. :)
Romain.
--
Romain FRANCOISE <romain@orebokech.com> | All of the planet's dead, so
it's a miracle -- http://orebokech.com/ | let me out of here.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: shell-mode autocompletion uglinesses
2002-12-02 20:20 ` Kai Großjohann
2002-12-02 20:40 ` Felix E. Klee
@ 2002-12-08 11:33 ` Felix E. Klee
1 sibling, 0 replies; 12+ messages in thread
From: Felix E. Klee @ 2002-12-08 11:33 UTC (permalink / raw)
Kai Großjohann wrote:
> 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'.
I found it:
http://groups.google.com/groups?q=%22tcsh+completion+(partial+solution)%22&hl=en&lr=&ie=UTF-8&oe=utf-8&selm=62h9l9%24hm4%40basement.replay.com&rnum=1
I haven't tried it yet, though.
Felix
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2002-12-08 11:33 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.