unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10457: (Broken?) programmable completion in shell buffers
@ 2012-01-08 19:40 Oleksandr Manzyuk
  2012-01-08 20:07 ` bug#10457: Oleksandr Manzyuk
  2012-01-09  1:26 ` bug#10457: (Broken?) programmable completion in shell buffers Stefan Monnier
  0 siblings, 2 replies; 14+ messages in thread
From: Oleksandr Manzyuk @ 2012-01-08 19:40 UTC (permalink / raw)
  To: 10457

Dear all,

I've decided to give Emacs 24 a try, primarily because I've read that
in Emacs 24 completion in `shell-mode' is performed using `pcomplete',
which is effectively broken in 23.2 and which I have always wanted to
try out.  I am on Ubuntu, so I've chosen to install emacs-snapshot
package from emacs-snapshot PPA (ppa:cassou/emacs).  The version I'm
running is

GNU Emacs 24.0.92.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1) of
2012-01-05 on papaya, modified by Debian

I started a shell and tried to play with completion for various shell
commands defined in pcmpl-{gnu,unix,linux}.el, and it feels...
frustrating.  Let me explain what I mean by that.  Note: everything
below refers to emacs-snapshot run with -Q flag.

First, I'm unable to complete options to commands.  Take, for example,
"ssh".  If I'm in my home directory, type "ssh -", and hit TAB, the
command line changes to "ssh .-", and when I hit TAB again, a
completions buffer pops up showing only the file and directory names
starting with a dot and containing a dash.  I assume that instead of
offering the options available for ssh, Emacs performs some sort of
"fuzzy" matching against file and directory names.  Is this the
intended behavior, and if so, how can I disable this fuzzy matching?
Note that I do get completions for host names if I type "ssh " and hit
TAB.  When I am in a directory that doesn't contain files with a dash
in the name, typing "ssh -" and hitting TAB produces only "No match"
message in the minibuffer.

Second, more disturbingly, trying to complete options to "tar" locks
Emacs.  Here is how to reproduce it:

emacs -Q
M-x shell
cd <some directory without dashes in file and directory names>
tar - TAB SPC

(the last line means type "tar -" and hit TAB followed by SPC).  On my
machine this reliably locks Emacs: it becomes completely unresponsive,
I cannot close its window and have to open a terminal and kill it.
While it is locked, the system monitor shows that Emacs is using
almost 100% CPU.  As far as I can tell, this doesn't happen with the
other commands (pressing TAB followed by SPC simply inserts a space
into the shell buffer).

Is it only me or is it a bug?  I've had high hopes for `pcomplete',
but I am put off by its weirdness.  Am I missing something?  Please
let me know if I can provide more information.  I would submit a bug
report from within Emacs if it did not hang up.

Thanks,
Sasha
-- 
Oleksandr Manzyuk
http://oleksandrmanzyuk.wordpress.com





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

end of thread, other threads:[~2012-01-24 22:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-08 19:40 bug#10457: (Broken?) programmable completion in shell buffers Oleksandr Manzyuk
2012-01-08 20:07 ` bug#10457: Oleksandr Manzyuk
2012-01-09  1:26 ` bug#10457: (Broken?) programmable completion in shell buffers Stefan Monnier
2012-01-09  5:56   ` Thierry Volpiatto
2012-01-09 11:17     ` Thierry Volpiatto
     [not found]     ` <mailman.1502.1326107965.15002.bug-gnu-emacs@gnu.org>
2012-01-10 23:27       ` manzyuk
2012-01-09 15:41   ` Oleksandr Manzyuk
2012-01-09 17:41     ` Oleksandr Manzyuk
2012-01-09 20:20       ` Oleksandr Manzyuk
2012-01-24 18:12         ` Glenn Morris
2012-01-24 18:14   ` Glenn Morris
2012-01-24 18:28     ` Oleksandr Manzyuk
2012-01-24 21:39       ` Glenn Morris
2012-01-24 22:29         ` Oleksandr Manzyuk

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).