unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* something really wrong with rpm -qf tab completion (24.0.95.1)
@ 2012-04-06 13:50 Neal Becker
  2012-04-06 17:30 ` Glenn Morris
  0 siblings, 1 reply; 7+ messages in thread
From: Neal Becker @ 2012-04-06 13:50 UTC (permalink / raw)
  To: emacs-devel

emacs:  "24.0.95.1"
fedora linux 16 x86_64

In shell mode:
rpm -qf /usr/lib64/pyth
then hit tab.  cpu goes to 100%, emacs is unresponsive for a LONG time.
This problem seems to be new.

Seems to be triggered by rpm.  Replacing with e.g., 'ls' doesn't seem to produce 
the same symptoms.

 




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: something really wrong with rpm -qf tab completion (24.0.95.1)
  2012-04-06 13:50 something really wrong with rpm -qf tab completion (24.0.95.1) Neal Becker
@ 2012-04-06 17:30 ` Glenn Morris
  2012-04-06 18:05   ` Glenn Morris
  2012-04-06 22:14   ` Glenn Morris
  0 siblings, 2 replies; 7+ messages in thread
From: Glenn Morris @ 2012-04-06 17:30 UTC (permalink / raw)
  To: Neal Becker; +Cc: emacs-devel

Neal Becker wrote:

> emacs:  "24.0.95.1"
> fedora linux 16 x86_64
>
> In shell mode:
> rpm -qf /usr/lib64/pyth
> then hit tab.  cpu goes to 100%, emacs is unresponsive for a LONG time.

Thanks for the report. This should really have gone to bug list though.

Anyway, it's doing `rpm -q -a', which can be slow, depending on your
system. It's dumb, in that:

it should probably give an explanatory message before running that command

it doesn't try to cache the result of this slow command in any way (cf
eg woman)

it should not actually be running this command when the "-f" argument is
used (compare with rpm -q -f TAB), it should be doing filename
completion

if you use `rpm -q -f', it does better, doing filename completion, but the
results it presents are all files, rather than just *.rpm files.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: something really wrong with rpm -qf tab completion (24.0.95.1)
  2012-04-06 17:30 ` Glenn Morris
@ 2012-04-06 18:05   ` Glenn Morris
  2012-04-06 22:14   ` Glenn Morris
  1 sibling, 0 replies; 7+ messages in thread
From: Glenn Morris @ 2012-04-06 18:05 UTC (permalink / raw)
  To: Neal Becker; +Cc: emacs-devel


Also,

rpm -qa --nodigest --nosignature

would be much faster (0.25s for me versus 2s for rpm -qa).
But then you have to jump through the hoop of testing that those options
are supported. Maybe they are old enough to be taken for granted.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: something really wrong with rpm -qf tab completion (24.0.95.1)
  2012-04-06 17:30 ` Glenn Morris
  2012-04-06 18:05   ` Glenn Morris
@ 2012-04-06 22:14   ` Glenn Morris
  2012-04-06 22:20     ` Glenn Morris
  1 sibling, 1 reply; 7+ messages in thread
From: Glenn Morris @ 2012-04-06 22:14 UTC (permalink / raw)
  To: Neal Becker; +Cc: emacs-devel

Glenn Morris wrote:

> if you use `rpm -q -f', it does better, doing filename completion, but the
> results it presents are all files, rather than just *.rpm files.

That was me being dumb, mixing up rpm -qf and rpm -qp.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: something really wrong with rpm -qf tab completion (24.0.95.1)
  2012-04-06 22:14   ` Glenn Morris
@ 2012-04-06 22:20     ` Glenn Morris
  2012-04-07 19:38       ` Glenn Morris
  0 siblings, 1 reply; 7+ messages in thread
From: Glenn Morris @ 2012-04-06 22:20 UTC (permalink / raw)
  To: Neal Becker, Emacs developers


Maybe all that is needed for now is:

*** lisp/pcmpl-rpm.el	2012-01-19 07:21:25 +0000
--- lisp/pcmpl-rpm.el	2012-04-06 22:18:38 +0000
***************
*** 129,135 ****
  	      (pcomplete-opt "af.p(pcmpl-rpm-files)ilsdcvR")
  	    (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")
--- 129,137 ----
  	      (pcomplete-opt "af.p(pcmpl-rpm-files)ilsdcvR")
  	    (if (pcomplete-test "-[^-]*p" 'first 1)
  		(pcomplete-here (pcmpl-rpm-files))
!               (if (pcomplete-test "-[^-]*f" 'first 1)
!                   (pcomplete-here* (pcomplete-entries))
!                 (pcomplete-here (pcmpl-rpm-packages)))))))
         ((pcomplete-test "--pipe")
  	(pcomplete-here* (funcall pcomplete-command-completion-function)))
         ((pcomplete-test "--rmsource")




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: something really wrong with rpm -qf tab completion (24.0.95.1)
  2012-04-06 22:20     ` Glenn Morris
@ 2012-04-07 19:38       ` Glenn Morris
  2012-04-07 20:52         ` Neal Becker
  0 siblings, 1 reply; 7+ messages in thread
From: Glenn Morris @ 2012-04-07 19:38 UTC (permalink / raw)
  To: Neal Becker; +Cc: Emacs developers


Hopefully fixed in emacs-24 branch.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: something really wrong with rpm -qf tab completion (24.0.95.1)
  2012-04-07 19:38       ` Glenn Morris
@ 2012-04-07 20:52         ` Neal Becker
  0 siblings, 0 replies; 7+ messages in thread
From: Neal Becker @ 2012-04-07 20:52 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Emacs developers

[-- Attachment #1: Type: text/plain, Size: 110 bytes --]

Thanks
On Apr 7, 2012 3:38 PM, "Glenn Morris" <rgm@gnu.org> wrote:

>
> Hopefully fixed in emacs-24 branch.
>

[-- Attachment #2: Type: text/html, Size: 344 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-04-07 20:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-06 13:50 something really wrong with rpm -qf tab completion (24.0.95.1) Neal Becker
2012-04-06 17:30 ` Glenn Morris
2012-04-06 18:05   ` Glenn Morris
2012-04-06 22:14   ` Glenn Morris
2012-04-06 22:20     ` Glenn Morris
2012-04-07 19:38       ` Glenn Morris
2012-04-07 20:52         ` Neal Becker

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).