GNU bug report logs - #1027
23.0.60; pcomplete/rpm does not complete "rpm -qip filepath"

Previous Next

Package: emacs;

Reported by: Jens Petersen <petersen <at> redhat.com>

Date: Fri, 26 Sep 2008 01:05:05 UTC

Severity: normal

Tags: patch

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1027 in the body.
You can then email your comments to 1027 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1027; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Jens Petersen <petersen <at> redhat.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Jens Petersen <petersen <at> redhat.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; pcomplete/rpm does not complete "rpm -qip filepath"
Date: Fri, 26 Sep 2008 10:57:30 +1000
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  <petersen <at> redhat.com>

	* 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")




Tags added: patch Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Fri, 26 Sep 2008 04:10:03 GMT) Full text and rfc822 format available.

Reply sent to Chong Yidong <cyd <at> stupidchicken.com>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Jens Petersen <petersen <at> redhat.com>:
bug acknowledged by developer. Full text and rfc822 format available.

Message #12 received at 1027-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Jens Petersen <petersen <at> redhat.com>
Cc: 1027-done <at> 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
> 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.




bug archived. Request was from Debbugs Internal Request <don <at> donarmstrong.com> to internal_control <at> emacsbugs.donarmstrong.com. (Fri, 21 Nov 2008 15:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 213 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.