From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Per =?UTF-8?Q?Starb=C3=A4ck?= Newsgroups: gmane.emacs.bugs Subject: bug#9643: 24.0.90; pcomplete/tar and complete-within Date: Sat, 1 Oct 2011 02:05:05 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1317429303 15223 80.91.229.12 (1 Oct 2011 00:35:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 1 Oct 2011 00:35:03 +0000 (UTC) To: 9643@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 01 02:34:59 2011 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 1R9nXe-0006Mo-Qm for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Oct 2011 02:34:59 +0200 Original-Received: from localhost ([::1]:48723 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9nXe-0001u4-15 for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Sep 2011 20:34:58 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9nXb-0001tv-KL for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2011 20:34:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9nXa-0001Xs-BA for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2011 20:34:55 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9nXa-0001Xl-9d for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2011 20:34:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R9nYg-0004xA-JY for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2011 20:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Per =?UTF-8?Q?Starb=C3=A4ck?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Oct 2011 00:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9643 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.131742933518999 (code B ref -1); Sat, 01 Oct 2011 00:36:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Oct 2011 00:35:35 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R9nYD-0004wN-WE for submit@debbugs.gnu.org; Fri, 30 Sep 2011 20:35:34 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R9n5w-0004HG-57 for submit@debbugs.gnu.org; Fri, 30 Sep 2011 20:06:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9n4o-0007nl-32 for submit@debbugs.gnu.org; Fri, 30 Sep 2011 20:05:11 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:39229) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9n4o-0007nh-1O for submit@debbugs.gnu.org; Fri, 30 Sep 2011 20:05:10 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:59010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9n4m-00080V-Us for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2011 20:05:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9n4l-0007n5-M2 for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2011 20:05:08 -0400 Original-Received: from mail-bw0-f41.google.com ([209.85.214.41]:65265) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9n4l-0007lY-9y for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2011 20:05:07 -0400 Original-Received: by bkbzs2 with SMTP id zs2so2663792bkb.0 for ; Fri, 30 Sep 2011 17:05:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=pT9PuVhRuT8g0ItKVzQK/0rL28t/6tSNTUVpiZJWo6o=; b=btE7k1nItCgRcaWlxn+sCR/F7alcKE/sq3NZTKeAh58oV5C9Qg9FXB3q3sFS3zMY0x CT+WEgX8ObG1ORbV1u7EP+TkLN1uYqrA27pKq63FH08Xrx5jwtKUD3SRZE2OHW0C4evZ uKOu7j9snlpryr9ObesfhkY0DLE0WPKrt/6ac= Original-Received: by 10.204.143.24 with SMTP id s24mr1036273bku.309.1317427505490; Fri, 30 Sep 2011 17:05:05 -0700 (PDT) Original-Received: by 10.204.37.66 with HTTP; Fri, 30 Sep 2011 17:05:05 -0700 (PDT) X-Google-Sender-Auth: m7irUm4O9r75wtRsOT-TBn7OtBU 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-Mailman-Approved-At: Fri, 30 Sep 2011 20:35:32 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 30 Sep 2011 20:36:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) 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:52013 Archived-At: $ touch foo bar $ tar cf test.tar foo bar $ emacs -Q -f shell tar xf test. TAB yields Error in post-command-hook (completion-in-region--postch): (wrong-type-argument listp [tar-header # foo 436 324 324 0 (20102 20143) 5077 nil ustar starback starback 0 0 nil]) I expected getting a completion of ".tar " to my command. Reason: pcomplete/tar in pcmpl-gnu.el has an erroneous notion of how tar-parse-info entries look like. With this fix the example above will work, and it can complete "foo" and "bar" inside the tar file as arguments after "test.tar": ---------------------------------------------------------------------- $ diff -u pcmpl-gnu.el~ pcmpl-gnu.el --- pcmpl-gnu.el~ 2011-01-26 17:16:33.000000000 +0100 +++ pcmpl-gnu.el 2011-10-01 01:24:45.000000000 +0200 @@ -298,7 +298,7 @@ (mapcar (function (lambda (entry) - (tar-header-name (cdr entry)))) + (tar-header-name entry))) tar-parse-info)) (pcomplete-entries)) nil 'identity)))) ---------------------------------------------------------------------- I don't totally like this anyway. I get an extra buffer for "test.tar" even though I never explicitly opened the file. Next problem, also in "*shell*", when I have a large tar file, in this case emacs-24.0.90.tar.gz: tar xf emacs-24.0.90.t TAB yields (with the patch above) completion and a question File emacs-24.0.90.tar.gz is large (48MB), really open? (y or n) This was what I first encountered, and not knowing about pcomplete beforehand I was really surprised, as I had no intention of opening that file in Emacs. Even if I had known about it I wouldn't have liked this. I was only trying to complete the tar filename! * In both my examples I'm trying to complete the tar filename, and it looked inside it to prepare for doing completion of arguments after this. If it only opened the tar file if I actually tried to complete more arguments *after* the tar filename it would be a lot better.