From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 08 14:41:11 2012 Received: (at submit) by debbugs.gnu.org; 8 Jan 2012 19:41:11 +0000 Received: from localhost ([127.0.0.1]:50332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjycB-0007Lk-BO for submit@debbugs.gnu.org; Sun, 08 Jan 2012 14:41:11 -0500 Received: from eggs.gnu.org ([140.186.70.92]:51326) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rjyc8-0007LW-Pc for submit@debbugs.gnu.org; Sun, 08 Jan 2012 14:41:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rjybt-00037r-4v for submit@debbugs.gnu.org; Sun, 08 Jan 2012 14:40:54 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:55762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rjybs-00037n-Vr for submit@debbugs.gnu.org; Sun, 08 Jan 2012 14:40:53 -0500 Received: from eggs.gnu.org ([140.186.70.92]:48617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rjybr-0001w1-WF for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2012 14:40:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rjybq-00037Z-NJ for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2012 14:40:51 -0500 Received: from mail-lpp01m010-f41.google.com ([209.85.215.41]:62689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rjybq-00037T-Gf for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2012 14:40:50 -0500 Received: by lagv3 with SMTP id v3so1315116lag.0 for ; Sun, 08 Jan 2012 11:40:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=Nhrt/pVG2w5b908I51gQ9Kygg7+mPRalW6yGoErkqtg=; b=ipJXTMMMiM0qFXX2vDXtBtJynW+Szz5O53klLN3Dtv87PkTJiUn4EbX5JA1MjmVTFH vgjCC2ekqfCipimYG1cvaGoj/0w58nD30atdLoAvKok125B4py5WG2Oic7J7yuNZSPFy VwHCbkXBybscK0Hd+U7i0w5Sufz+pmPckDIRs= MIME-Version: 1.0 Received: by 10.112.27.65 with SMTP id r1mr2908147lbg.33.1326051648262; Sun, 08 Jan 2012 11:40:48 -0800 (PST) Received: by 10.152.123.98 with HTTP; Sun, 8 Jan 2012 11:40:48 -0800 (PST) Date: Sun, 8 Jan 2012 19:40:48 +0000 Message-ID: Subject: (Broken?) programmable completion in shell buffers From: Oleksandr Manzyuk To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) 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 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 From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 08 15:07:27 2012 Received: (at 10457) by debbugs.gnu.org; 8 Jan 2012 20:07:27 +0000 Received: from localhost ([127.0.0.1]:50344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rjz1a-00081G-Sr for submit@debbugs.gnu.org; Sun, 08 Jan 2012 15:07:27 -0500 Received: from mail-lpp01m010-f44.google.com ([209.85.215.44]:63857) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rjz1Y-00080z-S5 for 10457@debbugs.gnu.org; Sun, 08 Jan 2012 15:07:25 -0500 Received: by laah2 with SMTP id h2so1040489laa.3 for <10457@debbugs.gnu.org>; Sun, 08 Jan 2012 12:07:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=pXzMg9qZ8lscl+ouW7+SINhnMjecLuqDmwUo14sQWw8=; b=wtIeE2oK9I2GqyoBmipIWRDtSUMVZsuzS/hefkDcEdvQd4263Dvdx4Ohp4cmQsm/6E gsZnvMS2gzqjpV4o5tk6UBkNHaxzE50gWsNDyxvBvFlWlXG6INBPsn9JMRZi7Z/DwJ1s New2wr2ocaSghNaaxVmLF783n0GWLY6YKL4Oc= MIME-Version: 1.0 Received: by 10.152.131.202 with SMTP id oo10mr5643256lab.40.1326053228427; Sun, 08 Jan 2012 12:07:08 -0800 (PST) Received: by 10.152.123.98 with HTTP; Sun, 8 Jan 2012 12:07:08 -0800 (PST) Date: Sun, 8 Jan 2012 20:07:08 +0000 Message-ID: Subject: From: Oleksandr Manzyuk To: 10457@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 10457 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.4 (/) I have just checked: the issues I've described happen only in shell, not in eshell (in eshell everything seems to work as expected). Sasha -- Oleksandr Manzyuk http://oleksandrmanzyuk.wordpress.com From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 08 20:26:57 2012 Received: (at 10457) by debbugs.gnu.org; 9 Jan 2012 01:26:57 +0000 Received: from localhost ([127.0.0.1]:50488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rk40m-0006wS-Cq for submit@debbugs.gnu.org; Sun, 08 Jan 2012 20:26:57 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:45826) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rk40j-0006wK-CA for 10457@debbugs.gnu.org; Sun, 08 Jan 2012 20:26:55 -0500 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q091Qf2e005034; Sun, 8 Jan 2012 20:26:41 -0500 Received: by pastel.home (Postfix, from userid 20848) id 8F46958F7E; Sun, 8 Jan 2012 20:26:40 -0500 (EST) From: Stefan Monnier To: Oleksandr Manzyuk Subject: Re: bug#10457: (Broken?) programmable completion in shell buffers Message-ID: References: Date: Sun, 08 Jan 2012 20:26:40 -0500 In-Reply-To: (Oleksandr Manzyuk's message of "Sun, 8 Jan 2012 19:40:48 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4095=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4095> : streams <718001> : uri <1043274> X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 10457 Cc: 10457@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) > 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. It's partial-completion at work: "a-b" matches "a*-b*" and "-" just matches "*-*". Apparently all your file names that contained "-" started with ".", hence the ".-". > Is this the intended behavior, and if so, how can I disable this > fuzzy matching? You can remove partial-completion from completion-styles. > 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. Indeed, pcomplete doesn't seem to provide any completion for ssh's "-" options, currently, even though the code does do something for it: (defun pcomplete/ssh () "Completion rules for the `ssh' command." (pcomplete-opt "1246AaCfgKkMNnqsTtVvXxYbcDeFiLlmOopRSw") (pcomplete-here (pcmpl-ssh-hosts))) I don't think completion of "-" is very useful for ssh since there's no long options, and most ascii letters are valid options, but still it seems we have a bug that prevents pcomplete-opt from doing its job. > Second, more disturbingly, trying to complete options to "tar" locks Emacs. > Here is how to reproduce it: > emacs -Q > M-x shell > cd > tar - TAB SPC I believe I've fixed this bug "recently". If you can try the code in the trunk to confirm that it's fixed, it would be wonderful. > I've had high hopes for `pcomplete', but I am put off by its > weirdness. There's a lot more to it than "turning it on", so yes, it's been a source of many bug reports. Thank you for trying it out to help track down the various problems. > I have just checked: the issues I've described happen only in shell, > not in eshell (in eshell everything seems to work as expected). For ssh, eshell actually overwrites pcomplete/ssh with an alias for pcomplete/rsh so it doesn't use the same code (I suspect that using eshell and then doing M-x shell will similarly "work as expected"). Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 00:57:14 2012 Received: (at submit) by debbugs.gnu.org; 9 Jan 2012 05:57:14 +0000 Received: from localhost ([127.0.0.1]:50557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rk8EM-0004a8-44 for submit@debbugs.gnu.org; Mon, 09 Jan 2012 00:57:14 -0500 Received: from eggs.gnu.org ([140.186.70.92]:46888) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rk8EI-0004Zu-Gf for submit@debbugs.gnu.org; Mon, 09 Jan 2012 00:57:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rk8E0-0000Wa-3B for submit@debbugs.gnu.org; Mon, 09 Jan 2012 00:56:53 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:43548) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rk8E0-0000WW-1k for submit@debbugs.gnu.org; Mon, 09 Jan 2012 00:56:52 -0500 Received: from eggs.gnu.org ([140.186.70.92]:46996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rk8Dz-0008T8-1M for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2012 00:56:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rk8Dx-0000WH-Sw for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2012 00:56:51 -0500 Received: from lo.gmane.org ([80.91.229.12]:58782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rk8Dx-0000Vo-Nt for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2012 00:56:49 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Rk8Du-0004G4-Gr for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2012 06:56:46 +0100 Received: from 40.211.85.79.rev.sfr.net ([79.85.211.40]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 09 Jan 2012 06:56:46 +0100 Received: from thierry.volpiatto by 40.211.85.79.rev.sfr.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 09 Jan 2012 06:56:46 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Thierry Volpiatto Subject: Re: bug#10457: (Broken?) programmable completion in shell buffers Date: Mon, 09 Jan 2012 06:56:33 +0100 Lines: 18 Message-ID: <87lipho1v2.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 40.211.85.79.rev.sfr.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) Cancel-Lock: sha1:mNxf17A1hm/lCm4iY3v2WAZflbk= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Stefan Monnier writes: >> Second, more disturbingly, trying to complete options to "tar" locks Emacs. >> Here is how to reproduce it: > >> emacs -Q >> M-x shell >> cd >> tar - TAB SPC > > I believe I've fixed this bug "recently". It seem this is not fixed, i can reproduce the bug here. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 06:18:23 2012 Received: (at submit) by debbugs.gnu.org; 9 Jan 2012 11:18:23 +0000 Received: from localhost ([127.0.0.1]:50723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkDF5-0003ky-EY for submit@debbugs.gnu.org; Mon, 09 Jan 2012 06:18:23 -0500 Received: from eggs.gnu.org ([140.186.70.92]:54738) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkDEz-0003ki-PM for submit@debbugs.gnu.org; Mon, 09 Jan 2012 06:18:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RkDEb-0005Cd-5F for submit@debbugs.gnu.org; Mon, 09 Jan 2012 06:17:55 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:36917) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkDEb-0005CZ-1Q for submit@debbugs.gnu.org; Mon, 09 Jan 2012 06:17:49 -0500 Received: from eggs.gnu.org ([140.186.70.92]:51602) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkDEX-0006Nd-3e for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2012 06:17:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RkDEP-0005C3-Hy for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2012 06:17:45 -0500 Received: from lo.gmane.org ([80.91.229.12]:33055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkDEO-0005Bx-Ea for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2012 06:17:37 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RkDEL-0004JS-G8 for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2012 12:17:33 +0100 Received: from 40.211.85.79.rev.sfr.net ([79.85.211.40]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 09 Jan 2012 12:17:33 +0100 Received: from thierry.volpiatto by 40.211.85.79.rev.sfr.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 09 Jan 2012 12:17:33 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Thierry Volpiatto Subject: Re: bug#10457: (Broken?) programmable completion in shell buffers Date: Mon, 09 Jan 2012 12:17:20 +0100 Lines: 305 Message-ID: <87liphnn0f.fsf@gmail.com> References: <87lipho1v2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 40.211.85.79.rev.sfr.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) Cancel-Lock: sha1:W0ROkLR/8RWNcTasFikgPdVDOQ0= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) --=-=-= Content-Type: text/plain Thierry Volpiatto writes: > Stefan Monnier writes: > >>> Second, more disturbingly, trying to complete options to "tar" locks Emacs. >>> Here is how to reproduce it: >> >>> emacs -Q >>> M-x shell >>> cd >>> tar - TAB SPC >> >> I believe I've fixed this bug "recently". > > It seem this is not fixed, i can reproduce the bug here. This seem to work as expected, not hanging at least, and completing against long and short opts and then filenames. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=patch-r118190.patch Content-Description: Fix eshell/tar hanging forever # HG changeset patch # User Thierry Volpiatto # Date 1326107014 -3600 # Node ID 10a15a1251fd3e4ba77eb3e2b35a5bf4c4c50ed2 # Parent 2175cc538ceea5e0b7395e8be10c884b02386d1d "New patch" diff --git a/lisp/pcmpl-gnu.el b/lisp/pcmpl-gnu.el --- a/lisp/pcmpl-gnu.el +++ b/lisp/pcmpl-gnu.el @@ -152,6 +152,20 @@ (when (and (not ,exist) (buffer-live-p ,buf)) (kill-buffer ,buf)))))) + +(defun eshell-collect-tar-long-opts () + (with-temp-buffer + (call-process "tar" nil (current-buffer) nil "--help") + (goto-char (point-min)) + (loop with lo while + (re-search-forward "^\\( *-[a-zA-Z0-9], --[a-zA-Z0-9-]*=?\\)\ +\\|\\( *--[a-zA-Z0-9-]*=?\\)" nil t) + for opts = (split-string (match-string 0) ",") + append (loop for i in (if (> (length opts) 1) (cdr opts) opts) + for op = (replace-regexp-in-string " " "" i) + unless (member op lo) + do (push op lo) and collect op)))) + ;;;###autoload (defun pcomplete/tar () "Completion for the GNU tar utility." @@ -160,89 +174,10 @@ (let ((pcomplete-suffix-list (cons ?= pcomplete-suffix-list))) (while (pcomplete-match "^-" 0) (setq saw-option t) - (if (pcomplete-match "^--" 0) - (if (pcomplete-match "^--\\([^= \t\n\f]*\\)\\'" 0) - ;; FIXME: Extract this list from "tar --help". - (pcomplete-here* - '("--absolute-names" - "--after-date=" - "--append" - "--atime-preserve" - "--backup" - "--block-number" - "--blocking-factor=" - "--catenate" - "--checkpoint" - "--compare" - "--compress" - "--concatenate" - "--confirmation" - "--create" - "--delete" - "--dereference" - "--diff" - "--directory=" - "--exclude=" - "--exclude-from=" - "--extract" - "--file=" - "--files-from=" - "--force-local" - "--get" - "--group=" - "--gzip" - "--help" - "--ignore-failed-read" - "--ignore-zeros" - "--incremental" - "--info-script=" - "--interactive" - "--keep-old-files" - "--label=" - "--list" - "--listed-incremental" - "--mode=" - "--modification-time" - "--multi-volume" - "--new-volume-script=" - "--newer=" - "--newer-mtime" - "--no-recursion" - "--null" - "--numeric-owner" - "--old-archive" - "--one-file-system" - "--owner=" - "--portability" - "--posix" - "--preserve" - "--preserve-order" - "--preserve-permissions" - "--read-full-records" - "--record-size=" - "--recursive-unlink" - "--remove-files" - "--rsh-command=" - "--same-order" - "--same-owner" - "--same-permissions" - "--sparse" - "--starting-file=" - "--suffix=" - "--tape-length=" - "--to-stdout" - "--totals" - "--uncompress" - "--ungzip" - "--unlink-first" - "--update" - "--use-compress-program=" - "--verbose" - "--verify" - "--version" - "--volno-file="))) - (pcomplete-opt "01234567ABCFGKLMNOPRSTUVWXZbcdfghiklmoprstuvwxz")) (cond + ((and (pcomplete-match "^--" 0) + (pcomplete-match "^--\\([^= \t\n\f]*\\)\\'" 0)) + (pcomplete-here* (eshell-collect-tar-long-opts))) ((pcomplete-match "\\`--after-date=" 0) (pcomplete-here*)) ((pcomplete-match "\\`--backup=" 0) @@ -300,14 +235,16 @@ (pcomplete-match-string 1 0))) ((pcomplete-match "\\`--volno-file=\\(.*\\)" 0) (pcomplete-here* (pcomplete-entries) - (pcomplete-match-string 1 0)))))) + (pcomplete-match-string 1 0))) + ((pcomplete-match "^-\\([^= \t\n\f]*\\)\\'" 0) + (pcomplete-opt "01234567ABCFGKLMNOPRSTUVWXZbcdfghiklmoprstuvwxz"))))) (unless saw-option (pcomplete-here (mapcar 'char-to-string (string-to-list "01234567ABCFGIKLMNOPRSTUVWXZbcdfghiklmoprstuvwxz"))) - (if (pcomplete-match "[xt]" 'first 1) - (setq complete-within t))) + (when (pcomplete-match "[xt]" 'first 1) + (setq complete-within t))) (pcomplete-here (pcomplete-dirs-or-entries pcmpl-gnu-tarfile-regexp)) (while (pcomplete-here (if (and complete-within @@ -320,10 +257,11 @@ (completion-table-dynamic (lambda (_string) (pcmpl-gnu-with-file-buffer file - (mapcar #'tar-header-name tar-parse-info))))) - (pcomplete-entries)) + (mapcar #'tar-header-name tar-parse-info))))) + (pcomplete-entries)) nil 'identity)))) + ;;;###autoload (defalias 'pcomplete/gdb 'pcomplete/xargs) diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el @@ -981,54 +981,56 @@ the argument appear after a ganged set of options. This is how tar behaves, for example. Arguments NO-GANGING and ARGS-FOLLOW are currently ignored." - (if (and (= pcomplete-index pcomplete-last) - (string= (pcomplete-arg) "-")) - (let ((len (length options)) - (index 0) - char choices) - (while (< index len) - (setq char (aref options index)) - (if (eq char ?\() - (let ((result (read-from-string options index))) - (setq index (cdr result))) - (unless (memq char '(?/ ?* ?? ?.)) - (push (char-to-string char) choices)) - (setq index (1+ index)))) - (throw 'pcomplete-completions - (mapcar - (function - (lambda (opt) - (concat "-" opt))) - (pcomplete-uniqify-list choices)))) - (let ((arg (pcomplete-arg))) - (when (and (> (length arg) 1) - (stringp arg) - (eq (aref arg 0) (or prefix ?-))) - (pcomplete-next-arg) - (let ((char (aref arg 1)) - (len (length options)) - (index 0) - opt-char arg-char result) - (while (< (1+ index) len) - (setq opt-char (aref options index) - arg-char (aref options (1+ index))) - (if (eq arg-char ?\() - (setq result - (read-from-string options (1+ index)) - index (cdr result) - result (car result)) - (setq result nil)) - (when (and (eq char opt-char) - (memq arg-char '(?\( ?/ ?* ?? ?.))) - (if (< pcomplete-index pcomplete-last) - (pcomplete-next-arg) - (throw 'pcomplete-completions - (cond ((eq arg-char ?/) (pcomplete-dirs)) - ((eq arg-char ?*) (pcomplete-executables)) - ((eq arg-char ??) nil) - ((eq arg-char ?.) (pcomplete-entries)) - ((eq arg-char ?\() (eval result)))))) - (setq index (1+ index)))))))) + (or + (if (and (= pcomplete-index pcomplete-last) + (string= (pcomplete-arg) "-")) + (let ((len (length options)) + (index 0) + char choices) + (while (< index len) + (setq char (aref options index)) + (if (eq char ?\() + (let ((result (read-from-string options index))) + (setq index (cdr result))) + (unless (memq char '(?/ ?* ?? ?.)) + (push (char-to-string char) choices)) + (setq index (1+ index)))) + (throw 'pcomplete-completions + (mapcar + (function + (lambda (opt) + (concat "-" opt))) + (pcomplete-uniqify-list choices)))) + (let ((arg (pcomplete-arg))) + (when (and (> (length arg) 1) + (stringp arg) + (eq (aref arg 0) (or prefix ?-))) + (pcomplete-next-arg) + (let ((char (aref arg 1)) + (len (length options)) + (index 0) + opt-char arg-char result) + (while (< (1+ index) len) + (setq opt-char (aref options index) + arg-char (aref options (1+ index))) + (if (eq arg-char ?\() + (setq result + (read-from-string options (1+ index)) + index (cdr result) + result (car result)) + (setq result nil)) + (when (and (eq char opt-char) + (memq arg-char '(?\( ?/ ?* ?? ?.))) + (if (< pcomplete-index pcomplete-last) + (pcomplete-next-arg) + (throw 'pcomplete-completions + (cond ((eq arg-char ?/) (pcomplete-dirs)) + ((eq arg-char ?*) (pcomplete-executables)) + ((eq arg-char ??) nil) + ((eq arg-char ?.) (pcomplete-entries)) + ((eq arg-char ?\() (eval result)))))) + (setq index (1+ index))))))) + (throw 'pcomplete-completions nil))) (defun pcomplete--here (&optional form stub paring form-only) "Complete against the current argument, if at the end. --=-=-= Content-Type: text/plain -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 10:42:20 2012 Received: (at 10457) by debbugs.gnu.org; 9 Jan 2012 15:42:20 +0000 Received: from localhost ([127.0.0.1]:51166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkHMV-0002GG-Hd for submit@debbugs.gnu.org; Mon, 09 Jan 2012 10:42:20 -0500 Received: from mail-lpp01m010-f44.google.com ([209.85.215.44]:34249) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkHMO-0002Ft-5q for 10457@debbugs.gnu.org; Mon, 09 Jan 2012 10:42:13 -0500 Received: by laah2 with SMTP id h2so1353789laa.3 for <10457@debbugs.gnu.org>; Mon, 09 Jan 2012 07:41:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=L6pczb6SOfjVPxv+5JXrPmM2NHVfYutHum9fua9VDgE=; b=gGWW66PWL16e8dHTMcgD7Q3yDLGNAAEhjCeWIhV3PqyBk3bkBYmrqjlCC+MtDCzxp8 4wJqfzlynEK+iIl6OUk2fUjKW7pMESEGd/n0aBci7mQXu3YYsQFDczGwhaDGynp1gIzK HOgjC2hBTN9lkrsfpV6Qcs9y1zGUQVg7qXbvM= MIME-Version: 1.0 Received: by 10.152.145.71 with SMTP id ss7mr6899066lab.28.1326123707449; Mon, 09 Jan 2012 07:41:47 -0800 (PST) Received: by 10.152.123.98 with HTTP; Mon, 9 Jan 2012 07:41:47 -0800 (PST) In-Reply-To: References: Date: Mon, 9 Jan 2012 15:41:47 +0000 Message-ID: Subject: Re: bug#10457: (Broken?) programmable completion in shell buffers From: Oleksandr Manzyuk To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10457 Cc: 10457@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Mon, Jan 9, 2012 at 1:26 AM, Stefan Monnier w= rote: >> First, I'm unable to complete options to commands. =C2=A0Take, for examp= le, >> "ssh". =C2=A0If 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. =C2=A0I assume that instead o= f >> offering the options available for ssh, Emacs performs some sort of >> "fuzzy" matching against file and directory names. > > It's partial-completion at work: "a-b" matches "a*-b*" and "-" just > matches "*-*". =C2=A0Apparently all your file names that contained "-" > started with ".", hence the ".-". > >> Is this the intended behavior, and if so, how can I disable this >> fuzzy matching? > > You can remove partial-completion from completion-styles. Thanks for the explanation. I'll keep it for a while, maybe I like it. >> TAB. =C2=A0When I am in a directory that doesn't contain files with a da= sh >> in the name, typing "ssh -" and hitting TAB produces only "No match" >> message in the minibuffer. > > Indeed, pcomplete doesn't seem to provide any completion for ssh's "-" > options, currently, even though the code does do something for it: > > (defun pcomplete/ssh () > =C2=A0"Completion rules for the `ssh' command." > =C2=A0(pcomplete-opt "1246AaCfgKkMNnqsTtVvXxYbcDeFiLlmOopRSw") > =C2=A0(pcomplete-here (pcmpl-ssh-hosts))) > > I don't think completion of "-" is very useful for ssh since there's no > long options, and most ascii letters are valid options, but still it > seems we have a bug that prevents pcomplete-opt from doing its job. I have just finished building Emacs from the savannah repo, and this problem seems to be gone. Now when I type "ssh -" and hit TAB, a completions buffer showing a list of one-letter options pops up. BTW, even though I have file names containing dashes, I no longer observe the behavior I described in my previous email: it seems that completion of options correctly takes preference over `partial-completion'. Ssh was only an example -- I couldn't get completions for any command with options. In particular, tar admits long options, which I was unable to access via completion. Now it works fine with tar too: typing "tar -" and hitting TAB shows a completions buffer with one-letter options, typing "tar --" and hitting TAB pops up a completions buffer with long options. HOWEVER, curiously, the issue with Emacs being locked as a result of typing "tar -" and hitting TAB followed by SPC in a shell buffer is still present. Typing "tar --" and hitting TAB pops up a completions buffer, and hitting SPC flushes it, as it should. I am mystified. Can anybody else confirm this issue? Sasha --=20 Oleksandr Manzyuk http://oleksandrmanzyuk.wordpress.com From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 12:42:11 2012 Received: (at 10457) by debbugs.gnu.org; 9 Jan 2012 17:42:11 +0000 Received: from localhost ([127.0.0.1]:51237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkJEU-00053O-Dm for submit@debbugs.gnu.org; Mon, 09 Jan 2012 12:42:11 -0500 Received: from mail-lpp01m010-f44.google.com ([209.85.215.44]:36353) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkJEN-00052i-4v for 10457@debbugs.gnu.org; Mon, 09 Jan 2012 12:42:03 -0500 Received: by laah2 with SMTP id h2so1413063laa.3 for <10457@debbugs.gnu.org>; Mon, 09 Jan 2012 09:41:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=x6yMQdtmGKO42PWRESRPUIYXQ1UuRgg7KEQNcwOCeH0=; b=qIFL9dUfCjSzLyFK46ZkSERb2HHBMyN32ukn/QuDA1UNECXyfVHXsct0/i5KyEw8Cd 5pTY/Xj/DY3CTLmJqhg2h0gVOIxSoZi1mAxAPc59Uqndf6GQVmSkRZn1P6lll3IAvJPt AarmkK/NNf7PnnluBDJlCCuCsYAgLWfG9jRdY= MIME-Version: 1.0 Received: by 10.112.100.164 with SMTP id ez4mr3721467lbb.46.1326130898170; Mon, 09 Jan 2012 09:41:38 -0800 (PST) Received: by 10.152.123.98 with HTTP; Mon, 9 Jan 2012 09:41:38 -0800 (PST) In-Reply-To: References: Date: Mon, 9 Jan 2012 17:41:38 +0000 Message-ID: Subject: Re: bug#10457: (Broken?) programmable completion in shell buffers From: Oleksandr Manzyuk To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10457 Cc: 10457@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) In `pcomplete/tar', the call to `pcomplete-opt' happens inside a (while (pcomplete-match "^-" 0) ...) loop. Here is a minimal example that has the same problem as `pcomplete/tar': (defun pcomplete/shell-mode/foo () (while (pcomplete-match "^-" 0) (pcomplete-opt "hv"))) Start emacs with -Q flag, evaluate the above code in the *scratch* buffer, start a shell, type "foo -", hit TAB. A completions buffer showing two completions "-h" and "-v" should pop up. Press SPC -- voila, Emacs is locked. Sasha -- Oleksandr Manzyuk http://oleksandrmanzyuk.wordpress.com From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 15:21:19 2012 Received: (at 10457) by debbugs.gnu.org; 9 Jan 2012 20:21:19 +0000 Received: from localhost ([127.0.0.1]:51326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkLiY-0000Rc-UW for submit@debbugs.gnu.org; Mon, 09 Jan 2012 15:21:19 -0500 Received: from mail-lpp01m010-f44.google.com ([209.85.215.44]:40574) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkLiW-0000RK-V0 for 10457@debbugs.gnu.org; Mon, 09 Jan 2012 15:21:17 -0500 Received: by laah2 with SMTP id h2so1489536laa.3 for <10457@debbugs.gnu.org>; Mon, 09 Jan 2012 12:20:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=qBov2TqYELHhFJeeop4g8GKfgMqI4Hr0OTb9iRV3+XM=; b=e8AhuCZ1Jy4SOideu2gGF8OLEzI1AqcSSuSd4S9BvSfVQJfJcCtsqYuTNiGWM3b3xl AkURIe/iOLQjvREcmDhhXJmoTeSVyFhAPrB7nJeu5Cegap5okTNrEjD2gdqyf42OXzLj Kn+le2odZHDUsICcI6LsbU9W08FE7mOJR4H7M= MIME-Version: 1.0 Received: by 10.112.27.65 with SMTP id r1mr3803134lbg.33.1326140455194; Mon, 09 Jan 2012 12:20:55 -0800 (PST) Received: by 10.152.123.98 with HTTP; Mon, 9 Jan 2012 12:20:55 -0800 (PST) In-Reply-To: References: Date: Mon, 9 Jan 2012 20:20:55 +0000 Message-ID: Subject: Re: bug#10457: (Broken?) programmable completion in shell buffers From: Oleksandr Manzyuk To: Stefan Monnier Content-Type: multipart/mixed; boundary=bcaec554d908c1115804b61e2260 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10457 Cc: 10457@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --bcaec554d908c1115804b61e2260 Content-Type: text/plain; charset=UTF-8 I don't yet fully understand what is going on here, but I think I have a fix (arguably, not very attractive) for the lockup problem: if I replace the line (pcomplete-opt "01234567ABCFGKLMNOPRSTUVWXZbcdfghiklmoprstuvwxz") in the code for `pcomplete/tar' in pcmpl-gnu.el with (pcomplete-here* (mapcar (lambda (char) (concat "-" (char-to-string char))) (string-to-list "01234567ABCFGKLMNOPRSTUVWXZbcdfghiklmoprstuvwxz"))) then I finally get the behavior I am after: typing "tar -" and pressing TAB pops up a completions buffer with short options, and if I press SPC now, the completions buffer is popped down (ditto for "tar --"). The two versions seem to be equivalent modulo bookkeeping, except that `pcomplete-here*' runs `pcomplete-try-first-hook'. Why are they operationally different? Sasha -- Oleksandr Manzyuk http://oleksandrmanzyuk.wordpress.com --bcaec554d908c1115804b61e2260 Content-Type: text/x-patch; charset=US-ASCII; name="10457.patch" Content-Disposition: attachment; filename="10457.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gx7xk96q0 ZGlmZiAtLWdpdCBhL2xpc3AvcGNtcGwtZ251LmVsIGIvbGlzcC9wY21wbC1nbnUuZWwKaW5kZXgg NmNlNTFkMS4uOGFjODZhYyAxMDA2NDQKLS0tIGEvbGlzcC9wY21wbC1nbnUuZWwKKysrIGIvbGlz cC9wY21wbC1nbnUuZWwKQEAgLTI0MSw3ICsyNDEsMTIgQEAKICAgICAgICAgICAgICAgICAgICAi LS12ZXJpZnkiCiAgICAgICAgICAgICAgICAgICAgIi0tdmVyc2lvbiIKICAgICAgICAgICAgICAg ICAgICAiLS12b2xuby1maWxlPSIpKSkKLSAgICAgICAgICAocGNvbXBsZXRlLW9wdCAiMDEyMzQ1 NjdBQkNGR0tMTU5PUFJTVFVWV1haYmNkZmdoaWtsbW9wcnN0dXZ3eHoiKSkKKyAgICAgICAgICAo cGNvbXBsZXRlLWhlcmUqCisgICAgICAgICAgIChtYXBjYXIKKyAgICAgICAgICAgIChsYW1iZGEg KGNoYXIpCisgICAgICAgICAgICAgIChjb25jYXQgIi0iIChjaGFyLXRvLXN0cmluZyBjaGFyKSkp CisgICAgICAgICAgICAoc3RyaW5nLXRvLWxpc3QKKyAgICAgICAgICAgICAiMDEyMzQ1NjdBQkNG R0tMTU5PUFJTVFVWV1haYmNkZmdoaWtsbW9wcnN0dXZ3eHoiKSkpKQogICAgICAgICAoY29uZAog ICAgICAgICAgKChwY29tcGxldGUtbWF0Y2ggIlxcYC0tYWZ0ZXItZGF0ZT0iIDApCiAgICAgICAg ICAgKHBjb21wbGV0ZS1oZXJlKikpCg== --bcaec554d908c1115804b61e2260-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 14 02:13:24 2012 Received: (at control) by debbugs.gnu.org; 14 Jan 2012 07:13:24 +0000 Received: from localhost ([127.0.0.1]:57034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rlxno-0001kd-2D for submit@debbugs.gnu.org; Sat, 14 Jan 2012 02:13:24 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:54809) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rlxnm-0001kW-An for control@debbugs.gnu.org; Sat, 14 Jan 2012 02:13:22 -0500 Received: from [155.69.16.204] (port=36222 helo=furball) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Rlxn6-0005Aq-Da for control@debbugs.gnu.org; Sat, 14 Jan 2012 02:12:41 -0500 From: Chong Yidong To: control@debbugs.gnu.org Subject: severity 10457 important Date: Sat, 14 Jan 2012 15:12:34 +0800 Message-ID: <871ur2pxjx.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) severity 10457 important thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 16 23:06:32 2012 Received: (at control) by debbugs.gnu.org; 17 Jan 2012 04:06:32 +0000 Received: from localhost ([127.0.0.1]:60949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rn0Jc-00032p-6v for submit@debbugs.gnu.org; Mon, 16 Jan 2012 23:06:32 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:60175) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rn0Jb-00032j-1T for control@debbugs.gnu.org; Mon, 16 Jan 2012 23:06:31 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id C87A239E8006 for ; Mon, 16 Jan 2012 20:05:32 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uuvAgXf30-dC for ; Mon, 16 Jan 2012 20:05:32 -0800 (PST) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 42E1F39E800A for ; Mon, 16 Jan 2012 20:05:32 -0800 (PST) Message-ID: <4F14F39E.6030003@cs.ucla.edu> Date: Mon, 16 Jan 2012 20:05:50 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111124 Thunderbird/8.0 MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: Bug#10457 has a patch Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) tags 10457 patch From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 24 13:13:25 2012 Received: (at 10457) by debbugs.gnu.org; 24 Jan 2012 18:13:25 +0000 Received: from localhost ([127.0.0.1]:42057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rpks1-0006mz-6t for submit@debbugs.gnu.org; Tue, 24 Jan 2012 13:13:25 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:44411 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rpkry-0006mq-AZ for 10457@debbugs.gnu.org; Tue, 24 Jan 2012 13:13:23 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Rpkrb-0005r7-MN; Tue, 24 Jan 2012 13:12:59 -0500 From: Glenn Morris To: Oleksandr Manzyuk Subject: Re: bug#10457: (Broken?) programmable completion in shell buffers References: X-Spook: Yukon pipeline kilderkin spies emc PLO brigand Khaddafi X-Ran: Hl7Z,G7GW5S86,`]J.(|b>%|T X-Hue: yellow X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 24 Jan 2012 13:12:59 -0500 In-Reply-To: (Oleksandr Manzyuk's message of "Mon, 9 Jan 2012 20:20:55 +0000") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10457 Cc: Stefan Monnier , 10457@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) I installed a simple-minded solution that works for me. Anyone should feel free to replace it with something better. *** lisp/pcmpl-gnu.el 2012-01-19 07:21:25 +0000 --- lisp/pcmpl-gnu.el 2012-01-24 18:06:37 +0000 *************** *** 243,248 **** --- 243,250 ---- "--volno-file="))) (pcomplete-opt "01234567ABCFGKLMNOPRSTUVWXZbcdfghiklmoprstuvwxz")) (cond + ((pcomplete-match "\\`-\\'" 0) + (pcomplete-here*)) ((pcomplete-match "\\`--after-date=" 0) (pcomplete-here*)) ((pcomplete-match "\\`--backup=" 0) From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 24 13:14:48 2012 Received: (at 10457) by debbugs.gnu.org; 24 Jan 2012 18:14:48 +0000 Received: from localhost ([127.0.0.1]:42073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RpktM-0006pN-Cn for submit@debbugs.gnu.org; Tue, 24 Jan 2012 13:14:48 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:44455 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RpktK-0006pG-9C for 10457@debbugs.gnu.org; Tue, 24 Jan 2012 13:14:46 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Rpksy-0005y7-8F; Tue, 24 Jan 2012 13:14:24 -0500 From: Glenn Morris To: Stefan Monnier Subject: Re: bug#10457: (Broken?) programmable completion in shell buffers References: X-Spook: MILSATCOM Uzi Zachawi explosion weapons of mass X-Ran: jUQ,c'"S5,SbJIPsHqp~(Mx"M[gg^ARK_t<&xMT![#yUzh-IQ=31u~-M\-;1Xc/QKM1i>S X-Hue: white X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 24 Jan 2012 13:14:24 -0500 In-Reply-To: (Stefan Monnier's message of "Sun, 08 Jan 2012 20:26:40 -0500") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10457 Cc: Oleksandr Manzyuk , 10457@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) >> 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. I can't reproduce this. I get the expected completions buffer. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 24 13:16:28 2012 Received: (at control) by debbugs.gnu.org; 24 Jan 2012 18:16:28 +0000 Received: from localhost ([127.0.0.1]:42077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rpkuw-0006sQ-M7 for submit@debbugs.gnu.org; Tue, 24 Jan 2012 13:16:27 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:44500 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rpkuu-0006sG-5f for control@debbugs.gnu.org; Tue, 24 Jan 2012 13:16:24 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RpkuY-00069R-ES for control@debbugs.gnu.org; Tue, 24 Jan 2012 13:16:02 -0500 Date: Tue, 24 Jan 2012 13:16:02 -0500 Message-Id: Subject: control message for bug 10457 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) severity 10457 normal tag 10457 = From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 24 13:28:44 2012 Received: (at 10457) by debbugs.gnu.org; 24 Jan 2012 18:28:44 +0000 Received: from localhost ([127.0.0.1]:42089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rpl6q-0007AL-69 for submit@debbugs.gnu.org; Tue, 24 Jan 2012 13:28:44 -0500 Received: from mail-lpp01m010-f44.google.com ([209.85.215.44]:57146) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rpl6o-0007A8-9W for 10457@debbugs.gnu.org; Tue, 24 Jan 2012 13:28:43 -0500 Received: by lahl5 with SMTP id l5so497076lah.3 for <10457@debbugs.gnu.org>; Tue, 24 Jan 2012 10:28:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=wRwmauRdkwD9Cm53W+5QHp3+Bfx8MOG1KRwGBhGz9RI=; b=sngt+/w83g9efozKCiTxpb9DI+uHcQdlZDHXaaCOC0elCxA+RpWEYSq8mdSHIwGKeJ k3of6c39JFfq8VoQBfrctupy6cS75Z2AFWM0ByG/Orv0vuVbl5WbniFwSTugBBneFtTB Cee2wYQNrsN65JE/47gs37QMT1C1jTjnWOEw8= MIME-Version: 1.0 Received: by 10.152.147.38 with SMTP id th6mr428275lab.47.1327429694752; Tue, 24 Jan 2012 10:28:14 -0800 (PST) Received: by 10.152.11.228 with HTTP; Tue, 24 Jan 2012 10:28:14 -0800 (PST) In-Reply-To: References: Date: Tue, 24 Jan 2012 18:28:14 +0000 Message-ID: Subject: Re: bug#10457: (Broken?) programmable completion in shell buffers From: Oleksandr Manzyuk To: Glenn Morris Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10457 Cc: Stefan Monnier , 10457@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Tue, Jan 24, 2012 at 6:14 PM, Glenn Morris wrote: > >>> 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. > > I can't reproduce this. I get the expected completions buffer. Meanwhile I purged the emacs-snapshot Ubuntu package and built Emacs 24.0.92 from sources, and I can confirm that this problem is gone. The lockup issue is still there, but I have temporarily fixed it as follows, following Thierry's idea: (defadvice pcomplete-opt (around ensure-completions-pcomplete-opt) "Temporary fix of bug#10457." (or ad-do-it (throw 'pcomplete-completions nil))) (ad-activate 'pcomplete-opt) -- Oleksandr Manzyuk http://oleksandrmanzyuk.wordpress.com From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 24 16:40:18 2012 Received: (at 10457) by debbugs.gnu.org; 24 Jan 2012 21:40:18 +0000 Received: from localhost ([127.0.0.1]:42220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rpo6D-0004tf-Oo for submit@debbugs.gnu.org; Tue, 24 Jan 2012 16:40:17 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:47940 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rpo6B-0004tH-8t for 10457@debbugs.gnu.org; Tue, 24 Jan 2012 16:40:15 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Rpo5k-0005MI-LN; Tue, 24 Jan 2012 16:39:48 -0500 From: Glenn Morris To: Oleksandr Manzyuk Subject: Re: bug#10457: (Broken?) programmable completion in shell buffers References: X-Spook: Honduras global rail gun military nitrate enforcers X-Ran: '\n0YT>oNp-t6G;iP5vvjhp,8esr_pq<"buJ&jj7rHYpV4>k":(Yu%:d9tI,JIo)bh'wf^ X-Hue: red X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 24 Jan 2012 16:39:48 -0500 In-Reply-To: (Oleksandr Manzyuk's message of "Tue, 24 Jan 2012 18:28:14 +0000") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10457 Cc: Stefan Monnier , 10457@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Oleksandr Manzyuk wrote: > The lockup issue is still there With today's version? Because I cannot reproduce that either, now. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 24 17:35:55 2012 Received: (at 10457-done) by debbugs.gnu.org; 24 Jan 2012 22:35:55 +0000 Received: from localhost ([127.0.0.1]:42304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rpoy2-0006BA-Oy for submit@debbugs.gnu.org; Tue, 24 Jan 2012 17:35:54 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:48963 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rpoy0-0006B3-PI for 10457-done@debbugs.gnu.org; Tue, 24 Jan 2012 17:35:53 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Rpoxe-0003jp-6J for 10457-done@debbugs.gnu.org; Tue, 24 Jan 2012 17:35:30 -0500 Resent-Message-ID: <20255.12850.147590.685662@fencepost.gnu.org> Resent-Date: Tue, 24 Jan 2012 17:35:30 -0500 Resent-From: Glenn Morris Resent-To: 10457-done@debbugs.gnu.org Bcc: rgm@gnu.org X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=5/blA9DvXZYoV9pZAetObEW4vKoGm7LNnXsJOW/LpdU=; b=k6U6xemXQuMDmNqGrr6/fRQIaI1AMHQFBLBRJhuyrFM7VdetTIsmbXeel5rdaCGlES O2zce3vDchy76v0GdOqlPr5G2quKq3A22DNd7+VMBglS4J7rGthsFVQJAQPVwONEto9d DteUO607Wkb/W1d4RCJdjh0JTpgFGZ8+Pn/i4= MIME-Version: 1.0 In-Reply-To: References: Message-ID: Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.215.41 Date: Tue, 24 Jan 2012 22:29:38 +0000 From: Oleksandr Manzyuk To: Glenn Morris Subject: Re: bug#10457: (Broken?) programmable completion in shell buffers X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10457-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) On Tue, Jan 24, 2012 at 9:39 PM, Glenn Morris wrote: > Oleksandr Manzyuk wrote: > >> The lockup issue is still there > > With today's version? Because I cannot reproduce that either, now. No, I've been running the version tagged as EMACS_PRETEST_24_0_92. I've tried the version from git, and the issue seems to be resolved now. Thank you very much! Best, Sasha -- Oleksandr Manzyuk http://oleksandrmanzyuk.wordpress.com From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 24 17:36:59 2012 Received: (at control) by debbugs.gnu.org; 24 Jan 2012 22:36:59 +0000 Received: from localhost ([127.0.0.1]:42311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rpoz5-0006D1-2z for submit@debbugs.gnu.org; Tue, 24 Jan 2012 17:36:59 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:48982 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rpoz3-0006Cv-Ue for control@debbugs.gnu.org; Tue, 24 Jan 2012 17:36:58 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Rpoyh-0003nA-6c for control@debbugs.gnu.org; Tue, 24 Jan 2012 17:36:35 -0500 Date: Tue, 24 Jan 2012 17:36:35 -0500 Message-Id: Subject: control message for bug 10457 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) fixed 10457 24.0.93 From unknown Sat Aug 09 01:09:37 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 22 Feb 2012 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator