From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Manzyuk Newsgroups: gmane.emacs.bugs Subject: bug#10457: (Broken?) programmable completion in shell buffers Date: Mon, 9 Jan 2012 20:20:55 +0000 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=bcaec554d908c1115804b61e2260 X-Trace: dough.gmane.org 1326140523 31954 80.91.229.12 (9 Jan 2012 20:22:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 Jan 2012 20:22:03 +0000 (UTC) Cc: 10457@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 09 21:21:55 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RkLj7-0003Xk-ER for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jan 2012 21:21:53 +0100 Original-Received: from localhost ([::1]:43065 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkLj6-0004FC-Hr for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jan 2012 15:21:52 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:46522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkLj3-0004Ej-3h for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2012 15:21:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RkLj1-0002vz-9E for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2012 15:21:48 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56653) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkLj1-0002vs-2M for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2012 15:21:47 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RkLjG-0000SX-2o for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2012 15:22:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Oleksandr Manzyuk Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Jan 2012 20:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10457 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10457-submit@debbugs.gnu.org id=B10457.13261404791715 (code B ref 10457); Mon, 09 Jan 2012 20:22:02 +0000 Original-Received: (at 10457) by debbugs.gnu.org; 9 Jan 2012 20:21:19 +0000 Original-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 Original-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 Original-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= Original-Received: by 10.112.27.65 with SMTP id r1mr3803134lbg.33.1326140455194; Mon, 09 Jan 2012 12:20:55 -0800 (PST) Original-Received: by 10.152.123.98 with HTTP; Mon, 9 Jan 2012 12:20:55 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:55587 Archived-At: --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--