all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Status of shell-pcomplete integration?
@ 2002-12-01 14:22 Romain FRANCOISE
  2002-12-01 15:47 ` Kai Großjohann
  2002-12-03 14:59 ` Richard Stallman
  0 siblings, 2 replies; 18+ messages in thread
From: Romain FRANCOISE @ 2002-12-01 14:22 UTC (permalink / raw)


Hi,

is someone currently working on integrating pcomplete in Shell-mode?
From the list archives, I see that support for pcomplete has been added
in Feb. 2002 then removed in March, because it wasn't ready and didn't
work right.

If no progress has been made towards this goal since then (and a quick
look through shell.el didn't seem to indicate there has), I think the
entry in etc/NEWS that says that Shell-mode now supports programmable
completion should be removed; it is misleading.

        Romain.

-- 
Romain FRANCOISE <romain@orebokech.com> | Every sky is blue, but not
it's a miracle -- http://orebokech.com/ | for me and you.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Status of shell-pcomplete integration?
  2002-12-01 14:22 Status of shell-pcomplete integration? Romain FRANCOISE
@ 2002-12-01 15:47 ` Kai Großjohann
  2002-12-01 22:48   ` John Wiegley
  2002-12-02 11:20   ` Mario Lang
  2002-12-03 14:59 ` Richard Stallman
  1 sibling, 2 replies; 18+ messages in thread
From: Kai Großjohann @ 2002-12-01 15:47 UTC (permalink / raw)


Romain FRANCOISE <romain@orebokech.com> writes:

> is someone currently working on integrating pcomplete in Shell-mode?
> From the list archives, I see that support for pcomplete has been added
> in Feb. 2002 then removed in March, because it wasn't ready and didn't
> work right.
>
> If no progress has been made towards this goal since then (and a quick
> look through shell.el didn't seem to indicate there has), I think the
> entry in etc/NEWS that says that Shell-mode now supports programmable
> completion should be removed; it is misleading.

I would like to see pcomplete completion in shell mode.  IIRC, the
complaints were ones that could have been solved by frobbing the
pcomplete options appropriately.

It would be a pity to omit this feature because of such easily solved
problems.

Caveat: I don't _know_ what exactly were the problems.  I only
_believe_ it would have been easy to solve them.
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Status of shell-pcomplete integration?
  2002-12-01 15:47 ` Kai Großjohann
@ 2002-12-01 22:48   ` John Wiegley
  2002-12-02 16:40     ` Kai Großjohann
  2002-12-03  7:42     ` Kai Großjohann
  2002-12-02 11:20   ` Mario Lang
  1 sibling, 2 replies; 18+ messages in thread
From: John Wiegley @ 2002-12-01 22:48 UTC (permalink / raw)


>>>>> On Sun Dec  1, Kai writes:

> It would be a pity to omit this feature because of such easily
> solved problems.

I agree.  Let's make a list, and then tackle them.

John

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Status of shell-pcomplete integration?
  2002-12-01 15:47 ` Kai Großjohann
  2002-12-01 22:48   ` John Wiegley
@ 2002-12-02 11:20   ` Mario Lang
  1 sibling, 0 replies; 18+ messages in thread
From: Mario Lang @ 2002-12-02 11:20 UTC (permalink / raw)
  Cc: emacs-devel

kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes:

> Romain FRANCOISE <romain@orebokech.com> writes:
>
>> is someone currently working on integrating pcomplete in Shell-mode?
>> From the list archives, I see that support for pcomplete has been added
>> in Feb. 2002 then removed in March, because it wasn't ready and didn't
>> work right.
>>
>> If no progress has been made towards this goal since then (and a quick
>> look through shell.el didn't seem to indicate there has), I think the
>> entry in etc/NEWS that says that Shell-mode now supports programmable
>> completion should be removed; it is misleading.
>
> I would like to see pcomplete completion in shell mode.

Same here.

I'd also like pcompete completion in M-! and M-| and alike.

-- 
CYa,
  Mario

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Status of shell-pcomplete integration?
  2002-12-01 22:48   ` John Wiegley
@ 2002-12-02 16:40     ` Kai Großjohann
  2002-12-03  7:42     ` Kai Großjohann
  1 sibling, 0 replies; 18+ messages in thread
From: Kai Großjohann @ 2002-12-02 16:40 UTC (permalink / raw)


John Wiegley <johnw@gnu.org> writes:

>>>>>> On Sun Dec  1, Kai writes:
>
>> It would be a pity to omit this feature because of such easily
>> solved problems.
>
> I agree.  Let's make a list, and then tackle them.

Okay.  There was a thread on this some months ago...  I wonder if
more items will crop up.
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Status of shell-pcomplete integration?
  2002-12-01 22:48   ` John Wiegley
  2002-12-02 16:40     ` Kai Großjohann
@ 2002-12-03  7:42     ` Kai Großjohann
  2002-12-03 10:37       ` Romain FRANCOISE
  1 sibling, 1 reply; 18+ messages in thread
From: Kai Großjohann @ 2002-12-03  7:42 UTC (permalink / raw)


John Wiegley <johnw@gnu.org> writes:

> I agree.  Let's make a list, and then tackle them.

Is just binding TAB to pcomplete the right way to integrate it into
shell-mode?  I tried the following:

emacs -q -no-site-file
(require 'shell) C-j
(define-key shell-mode-map (kbd "TAB") 'pcomplete) C-j
M-x shell RET
ls /us<TAB>             this completes /usr correctly
ls /us<TAB>             BAM!  no completion anymore

Reported by Felix Klee on gnu.emacs.help.

But maybe it's my fault for suggesting the wrong pcomplete integration.

-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Status of shell-pcomplete integration?
  2002-12-03  7:42     ` Kai Großjohann
@ 2002-12-03 10:37       ` Romain FRANCOISE
  2002-12-03 15:53         ` Kai Großjohann
  0 siblings, 1 reply; 18+ messages in thread
From: Romain FRANCOISE @ 2002-12-03 10:37 UTC (permalink / raw)


Kai Großjohann writes:

> Is just binding TAB to pcomplete the right way to integrate it into
> shell-mode?  I tried the following:

[...]

FWIW, the previous integration (the one that was removed from the
repository in March) did something more: apparently the buffer had to
be "setup" for pcomplete.  You can get a more or less usable diff using

cvs diff -r1.109 -r1.108 shell.el

        Romain.

-- 
Romain FRANCOISE <romain@orebokech.com> | They're nothing but cold
it's a miracle -- http://orebokech.com/ | little demons.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Status of shell-pcomplete integration?
  2002-12-01 14:22 Status of shell-pcomplete integration? Romain FRANCOISE
  2002-12-01 15:47 ` Kai Großjohann
@ 2002-12-03 14:59 ` Richard Stallman
  1 sibling, 0 replies; 18+ messages in thread
From: Richard Stallman @ 2002-12-03 14:59 UTC (permalink / raw)
  Cc: emacs-devel

I will delete that NEWS item.  If someone gets this working
we can add it back.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Status of shell-pcomplete integration?
  2002-12-03 10:37       ` Romain FRANCOISE
@ 2002-12-03 15:53         ` Kai Großjohann
  2002-12-03 16:14           ` John Wiegley
  2002-12-03 16:23           ` Romain FRANCOISE
  0 siblings, 2 replies; 18+ messages in thread
From: Kai Großjohann @ 2002-12-03 15:53 UTC (permalink / raw)


Romain FRANCOISE <romain@orebokech.com> writes:

> FWIW, the previous integration (the one that was removed from the
> repository in March) did something more: apparently the buffer had to
> be "setup" for pcomplete.  You can get a more or less usable diff using
>
> cvs diff -r1.109 -r1.108 shell.el

Good.  So let's change pcomplete-cycle-completions to nil at the same
time, to see whether people complain.

I think that would solve Noah's complaint, voiced in
http://mail.gnu.org/pipermail/emacs-devel/2002-March/006508.html , at
least.

Hmmm...

What's the problem with the following?

(require 'shell)
(define-key shell-mode-map (kbd "TAB") 'pcomplete)
(add-hook 'shell-mode-hook 'pcomplete-shell-setup)

It seems to work.  It does not defer loading of pcomplete until
completion is actually used, but oh, well.

Maybe pcomplete-shell-setup should set pcomplete-cycle-completions to
nil?  But that would make it difficult to override.  Hm.

John, how about setting pcomplete-cycle-completions to nil globally?
That would make it more consistent.
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Status of shell-pcomplete integration?
  2002-12-03 15:53         ` Kai Großjohann
@ 2002-12-03 16:14           ` John Wiegley
  2002-12-03 16:28             ` Romain FRANCOISE
  2002-12-03 16:28             ` Stefan Monnier
  2002-12-03 16:23           ` Romain FRANCOISE
  1 sibling, 2 replies; 18+ messages in thread
From: John Wiegley @ 2002-12-03 16:14 UTC (permalink / raw)


>>>>> On Tue Dec  3, Kai writes:

> Good.  So let's change pcomplete-cycle-completions to nil at the
> same time, to see whether people complain.

I thought it was suggested that rather than disabling completion
cycling altogether, we should prompt in the minibuffer while cycling
is being done, notifying of how many alternatives are left to
display...?

John

> John, how about setting pcomplete-cycle-completions to nil
> globally?  That would make it more consistent.

But cycling is a GOOD thing, and if you turn it off globally, 90% of
Emacs users won't know that it's there to turn on.

John

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Status of shell-pcomplete integration?
  2002-12-03 15:53         ` Kai Großjohann
  2002-12-03 16:14           ` John Wiegley
@ 2002-12-03 16:23           ` Romain FRANCOISE
  2002-12-03 17:05             ` John Wiegley
  1 sibling, 1 reply; 18+ messages in thread
From: Romain FRANCOISE @ 2002-12-03 16:23 UTC (permalink / raw)


Kai Großjohann writes:

> What's the problem with the following?

> (require 'shell)
> (define-key shell-mode-map (kbd "TAB") 'pcomplete)
> (add-hook 'shell-mode-hook 'pcomplete-shell-setup)

> It seems to work.  It does not defer loading of pcomplete until
> completion is actually used, but oh, well.

Provided you set pcomplete-cycle-completions to nil, it indeed seems to
work fine, with a few quirks:

- it doesn't complete filenames or directories containing spaces, even
  if you escape them with backslashes.  (With the completion cycling
  turned on, it works)

- it doesn't complete environment variables, e.g. 
  
        $ cd $HOME/foo<TAB>

  will not complete to

        $ cd $HOME/foobar

  but I think this is supposed to work with pcomplete, maybe John will
  know how to fix it.


        Romain.

-- 
Romain FRANCOISE <romain@orebokech.com> | They're nothing but scared
it's a miracle -- http://orebokech.com/ | little mice.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Status of shell-pcomplete integration?
  2002-12-03 16:14           ` John Wiegley
@ 2002-12-03 16:28             ` Romain FRANCOISE
  2002-12-03 16:28             ` Stefan Monnier
  1 sibling, 0 replies; 18+ messages in thread
From: Romain FRANCOISE @ 2002-12-03 16:28 UTC (permalink / raw)


John Wiegley writes:

> But cycling is a GOOD thing, and if you turn it off globally, 90% of
> Emacs users won't know that it's there to turn on.

It's a nice feature, but it's not consistent with the rest of Emacs, and
it's not the default completion type of Bash, so I think it will confuse
people.  IMHO, in Shell-mode you should have the same interface as in a
regular terminal.

And there are tons of features in Emacs that you discover by reading
the docs, not because they are activated by default.

        Romain.

-- 
Romain FRANCOISE <romain@orebokech.com> | Every sky is blue, but not
it's a miracle -- http://orebokech.com/ | for me and you.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Status of shell-pcomplete integration?
  2002-12-03 16:14           ` John Wiegley
  2002-12-03 16:28             ` Romain FRANCOISE
@ 2002-12-03 16:28             ` Stefan Monnier
  2002-12-03 17:04               ` John Wiegley
  2002-12-03 17:52               ` Kai Großjohann
  1 sibling, 2 replies; 18+ messages in thread
From: Stefan Monnier @ 2002-12-03 16:28 UTC (permalink / raw)
  Cc: emacs-devel

> > Good.  So let's change pcomplete-cycle-completions to nil at the
> > same time, to see whether people complain.
> 
> I thought it was suggested that rather than disabling completion
> cycling altogether, we should prompt in the minibuffer while cycling
> is being done, notifying of how many alternatives are left to
> display...?

I think the priority is to switch over to pcomplete.
To maximize the chances of such a switch being accepted, we should
strive to preserve the current behavior as much as possible.
The behavior can later on be changed, but at first we should just
concentrate on getting pcomplete to behave "like the current code".


	Stefan

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Status of shell-pcomplete integration?
  2002-12-03 16:28             ` Stefan Monnier
@ 2002-12-03 17:04               ` John Wiegley
  2002-12-04  1:31                 ` Miles Bader
  2002-12-03 17:52               ` Kai Großjohann
  1 sibling, 1 reply; 18+ messages in thread
From: John Wiegley @ 2002-12-03 17:04 UTC (permalink / raw)


>>>>> On Tue Dec  3, Stefan writes:

> I think the priority is to switch over to pcomplete.  To maximize
> the chances of such a switch being accepted, we should strive to
> preserve the current behavior as much as possible.  The behavior
> can later on be changed, but at first we should just concentrate on
> getting pcomplete to behave "like the current code".

As long as it gets changed before 21.3 goes out?  I tell you, no one
will know its there, and nobody will get the benefit of using it.

John

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Status of shell-pcomplete integration?
  2002-12-03 16:23           ` Romain FRANCOISE
@ 2002-12-03 17:05             ` John Wiegley
  2002-12-05 10:39               ` Kai Großjohann
  0 siblings, 1 reply; 18+ messages in thread
From: John Wiegley @ 2002-12-03 17:05 UTC (permalink / raw)


>>>>> On Tue Dec  3, Romain writes:

> - it doesn't complete environment variables, e.g.

>         $ cd $HOME/foo<TAB>

>   will not complete to

>         $ cd $HOME/foobar

Huh?  This should work just fine.

John

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Status of shell-pcomplete integration?
  2002-12-03 16:28             ` Stefan Monnier
  2002-12-03 17:04               ` John Wiegley
@ 2002-12-03 17:52               ` Kai Großjohann
  1 sibling, 0 replies; 18+ messages in thread
From: Kai Großjohann @ 2002-12-03 17:52 UTC (permalink / raw)


"Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes:

> I think the priority is to switch over to pcomplete.
> To maximize the chances of such a switch being accepted, we should
> strive to preserve the current behavior as much as possible.

Yes.  It's not really that the functionality is gone, people can
activate it with a single user option.  Later on, we can discuss to
change the default for that option.

But getting people to accept pcomplete everywhere is the difficult
part.  It promises tremendous benefit.

(The echo area message about remaining number of completions would be
cool nonetheless.  It might make me turn completion cycling back on :-)

-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Status of shell-pcomplete integration?
  2002-12-03 17:04               ` John Wiegley
@ 2002-12-04  1:31                 ` Miles Bader
  0 siblings, 0 replies; 18+ messages in thread
From: Miles Bader @ 2002-12-04  1:31 UTC (permalink / raw)
  Cc: emacs-devel

John Wiegley <johnw@gnu.org> writes:
> > The behavior can later on be changed, but at first we should just
> > concentrate on getting pcomplete to behave "like the current code".
> 
> As long as it gets changed before 21.3 goes out?  I tell you, no one
> will know its there, and nobody will get the benefit of using it.

Maybe so, but you can argue that later.  It's a minor issue.

[BTW, I tried pcomplete-cycle-completions for a while, and hated it.
 It makes much less sense in emacs, which can show a list of
 completions and then restore the screen, than it does in a shell,
 which can't.]

-Miles
-- 
I'm beginning to think that life is just one long Yoko Ono album; no rhyme
or reason, just a lot of incoherent shrieks and then it's over.  --Ian Wolff

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Status of shell-pcomplete integration?
  2002-12-03 17:05             ` John Wiegley
@ 2002-12-05 10:39               ` Kai Großjohann
  0 siblings, 0 replies; 18+ messages in thread
From: Kai Großjohann @ 2002-12-05 10:39 UTC (permalink / raw)


John Wiegley <johnw@gnu.org> writes:

>>>>>> On Tue Dec  3, Romain writes:
>
>> - it doesn't complete environment variables, e.g.
>
>>         $ cd $HOME/foo<TAB>
>
>>   will not complete to
>
>>         $ cd $HOME/foobar
>
> Huh?  This should work just fine.

I can't reproduce that bug, either.

-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2002-12-05 10:39 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-01 14:22 Status of shell-pcomplete integration? Romain FRANCOISE
2002-12-01 15:47 ` Kai Großjohann
2002-12-01 22:48   ` John Wiegley
2002-12-02 16:40     ` Kai Großjohann
2002-12-03  7:42     ` Kai Großjohann
2002-12-03 10:37       ` Romain FRANCOISE
2002-12-03 15:53         ` Kai Großjohann
2002-12-03 16:14           ` John Wiegley
2002-12-03 16:28             ` Romain FRANCOISE
2002-12-03 16:28             ` Stefan Monnier
2002-12-03 17:04               ` John Wiegley
2002-12-04  1:31                 ` Miles Bader
2002-12-03 17:52               ` Kai Großjohann
2002-12-03 16:23           ` Romain FRANCOISE
2002-12-03 17:05             ` John Wiegley
2002-12-05 10:39               ` Kai Großjohann
2002-12-02 11:20   ` Mario Lang
2002-12-03 14:59 ` Richard Stallman

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.