From unknown Sat Aug 16 18:48:51 2025 X-Loop: don@donarmstrong.com Subject: bug#1027: 23.0.60; pcomplete/rpm does not complete "rpm -qip filepath" Reply-To: Jens Petersen , 1027@debbugs.gnu.org Resent-From: Jens Petersen Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 26 Sep 2008 01:05:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1027 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122239066331837 (code B ref -1); Fri, 26 Sep 2008 01:05:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.8 required=4.0 tests=BAYES_00,MURPHY_WRONG_WORD2, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 26 Sep 2008 00:57:43 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8Q0vdrC031831 for ; Thu, 25 Sep 2008 17:57:41 -0700 Received: from mx10.gnu.org ([199.232.76.166]:55158) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Kj1cK-0004cg-8C for emacs-pretest-bug@gnu.org; Thu, 25 Sep 2008 20:55:32 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Kj1eL-00071h-Rr for emacs-pretest-bug@gnu.org; Thu, 25 Sep 2008 20:57:38 -0400 Received: from mx1.redhat.com ([66.187.233.31]:53725) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kj1eL-00071Z-JU for emacs-pretest-bug@gnu.org; Thu, 25 Sep 2008 20:57:37 -0400 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m8Q0vZQg016898 for ; Thu, 25 Sep 2008 20:57:35 -0400 Received: from dhcp-0-235.bne.redhat.com (dhcp-0-235.bne.redhat.com [10.64.0.235]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m8Q0vWCL005397; Thu, 25 Sep 2008 20:57:33 -0400 Received: from dhcp-0-235.bne.redhat.com (localhost.localdomain [127.0.0.1]) by dhcp-0-235.bne.redhat.com (8.14.2/8.14.1) with ESMTP id m8Q0vV8r002314; Fri, 26 Sep 2008 10:57:31 +1000 Received: (from petersen@localhost) by dhcp-0-235.bne.redhat.com (8.14.2/8.14.2/Submit) id m8Q0vU0D002312; Fri, 26 Sep 2008 10:57:30 +1000 Date: Fri, 26 Sep 2008 10:57:30 +1000 Message-Id: <200809260057.m8Q0vU0D002312@dhcp-0-235.bne.redhat.com> From: Jens Petersen To: emacs-pretest-bug@gnu.org X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Hi, In eshell, pcomplete/rpm does not handle the -p (file) option well currently: eg "rpm -q -p filepath..." completes but not "rpm -qp filepath...". Here is an improvement which at least checks the first argument for a -p option, so that "rpm -qp", "rpm --qp --changelog", etc all file complete rather than querying the rpm database. I think this is good enough for now, though strictly all args should be checked for a -p option. Jens 2008-09-26 Jens Petersen * pcmpl-rpm.el (pcomplete/rpm): Make "rpm -qp" use file completion. Index: lisp/pcmpl-rpm.el =================================================================== RCS file: /sources/emacs/emacs/lisp/pcmpl-rpm.el,v retrieving revision 1.13 diff -u -r1.13 pcmpl-rpm.el --- lisp/pcmpl-rpm.el 6 May 2008 07:57:45 -0000 1.13 +++ lisp/pcmpl-rpm.el 26 Sep 2008 00:22:31 -0000 @@ -135,7 +135,9 @@ (pcmpl-rpm-all-query "--requires"))))) (if (pcomplete-match "^-" 0) (pcomplete-opt "af.p(pcmpl-rpm-files)ilsdcvR") - (pcomplete-here (pcmpl-rpm-packages))))) + (if (pcomplete-test "-[^-]*p" 'first 1) + (pcomplete-here (pcmpl-rpm-files)) + (pcomplete-here (pcmpl-rpm-packages)))))) ((pcomplete-test "--pipe") (pcomplete-here* (funcall pcomplete-command-completion-function))) ((pcomplete-test "--rmsource") From unknown Sat Aug 16 18:48:51 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Jens Petersen Subject: bug#1027 closed by Chong Yidong (Re: 23.0.60; pcomplete/rpm does not complete "rpm -qip filepath") Message-ID: References: <87d4hrrmj1.fsf@cyd.mit.edu> <200809260057.m8Q0vU0D002312@dhcp-0-235.bne.redhat.com> X-Emacs-PR-Message: they-closed 1027 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: patch Reply-To: 1027@debbugs.gnu.org Content-Type: multipart/mixed; boundary="----------=_1224800103-4376-1" This is a multi-part message in MIME format... ------------=_1224800103-4376-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #1027: 23.0.60; pcomplete/rpm does not complete "rpm -qip filepath" It has been closed by Chong Yidong . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Chong Yidong by replying to this email. --=20 1027: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D1027 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1224800103-4376-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From cyd@stupidchicken.com Thu Oct 23 15:09:54 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.9 required=4.0 tests=AWL,BAYES_00, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1027-done) by emacsbugs.donarmstrong.com; 23 Oct 2008 22:09:54 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9NM9pxH003140 for <1027-done@emacsbugs.donarmstrong.com>; Thu, 23 Oct 2008 15:09:52 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 89D0257E055; Thu, 23 Oct 2008 18:09:54 -0400 (EDT) From: Chong Yidong To: Jens Petersen Cc: 1027-done@debbugs.gnu.org Subject: Re: 23.0.60; pcomplete/rpm does not complete "rpm -qip filepath" Date: Thu, 23 Oct 2008 18:09:54 -0400 Message-ID: <87d4hrrmj1.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > In eshell, pcomplete/rpm does not handle the -p (file) option well > currently: > > eg "rpm -q -p filepath..." completes but not "rpm -qp filepath...". > > Here is an improvement which at least checks the first argument for a > -p option, so that "rpm -qp", "rpm --qp --changelog", etc all file > complete rather than querying the rpm database. I think this is good > enough for now, though strictly all args should be checked for a -p > option. Thanks. I've checked in the patch. ------------=_1224800103-4376-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From petersen@redhat.com Thu Sep 25 17:57:43 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.8 required=4.0 tests=BAYES_00,MURPHY_WRONG_WORD2, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 26 Sep 2008 00:57:43 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8Q0vdrC031831 for ; Thu, 25 Sep 2008 17:57:41 -0700 Received: from mx10.gnu.org ([199.232.76.166]:55158) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Kj1cK-0004cg-8C for emacs-pretest-bug@gnu.org; Thu, 25 Sep 2008 20:55:32 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Kj1eL-00071h-Rr for emacs-pretest-bug@gnu.org; Thu, 25 Sep 2008 20:57:38 -0400 Received: from mx1.redhat.com ([66.187.233.31]:53725) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kj1eL-00071Z-JU for emacs-pretest-bug@gnu.org; Thu, 25 Sep 2008 20:57:37 -0400 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m8Q0vZQg016898 for ; Thu, 25 Sep 2008 20:57:35 -0400 Received: from dhcp-0-235.bne.redhat.com (dhcp-0-235.bne.redhat.com [10.64.0.235]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m8Q0vWCL005397; Thu, 25 Sep 2008 20:57:33 -0400 Received: from dhcp-0-235.bne.redhat.com (localhost.localdomain [127.0.0.1]) by dhcp-0-235.bne.redhat.com (8.14.2/8.14.1) with ESMTP id m8Q0vV8r002314; Fri, 26 Sep 2008 10:57:31 +1000 Received: (from petersen@localhost) by dhcp-0-235.bne.redhat.com (8.14.2/8.14.2/Submit) id m8Q0vU0D002312; Fri, 26 Sep 2008 10:57:30 +1000 Date: Fri, 26 Sep 2008 10:57:30 +1000 Message-Id: <200809260057.m8Q0vU0D002312@dhcp-0-235.bne.redhat.com> From: Jens Petersen To: emacs-pretest-bug@gnu.org Subject: 23.0.60; pcomplete/rpm does not complete "rpm -qip filepath" X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Hi, In eshell, pcomplete/rpm does not handle the -p (file) option well currently: eg "rpm -q -p filepath..." completes but not "rpm -qp filepath...". Here is an improvement which at least checks the first argument for a -p option, so that "rpm -qp", "rpm --qp --changelog", etc all file complete rather than querying the rpm database. I think this is good enough for now, though strictly all args should be checked for a -p option. Jens 2008-09-26 Jens Petersen * pcmpl-rpm.el (pcomplete/rpm): Make "rpm -qp" use file completion. Index: lisp/pcmpl-rpm.el =================================================================== RCS file: /sources/emacs/emacs/lisp/pcmpl-rpm.el,v retrieving revision 1.13 diff -u -r1.13 pcmpl-rpm.el --- lisp/pcmpl-rpm.el 6 May 2008 07:57:45 -0000 1.13 +++ lisp/pcmpl-rpm.el 26 Sep 2008 00:22:31 -0000 @@ -135,7 +135,9 @@ (pcmpl-rpm-all-query "--requires"))))) (if (pcomplete-match "^-" 0) (pcomplete-opt "af.p(pcmpl-rpm-files)ilsdcvR") - (pcomplete-here (pcmpl-rpm-packages))))) + (if (pcomplete-test "-[^-]*p" 'first 1) + (pcomplete-here (pcmpl-rpm-files)) + (pcomplete-here (pcmpl-rpm-packages)))))) ((pcomplete-test "--pipe") (pcomplete-here* (funcall pcomplete-command-completion-function))) ((pcomplete-test "--rmsource") ------------=_1224800103-4376-1--