GNU bug report logs -
#4341
23.1; M-x locate runs synchronously
Previous Next
To reply to this bug, email your comments to 4341 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4341
; Package
emacs
.
(Fri, 04 Sep 2009 19:20:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tom Tromey <tromey <at> redhat.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Fri, 04 Sep 2009 19:20:05 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.
Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
and to the gnu.emacs.bug news group.
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
Today I ran M-x locate.
This took a little while -- long enough to bother me that Emacs was
locked up for the entire time it was running.
I think it would be preferable to run locate in asynchronously.
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/23.1/etc/DEBUG for instructions.
In GNU Emacs 23.1.1 (i386-redhat-linux-gnu, GTK+ Version 2.16.5)
of 2009-08-24 on x86-2.fedora.phx.redhat.com
Windowing system distributor `The X.Org Foundation', version 11.0.10601901
configured using `configure '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i586-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=gtk' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i586-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i586 -mtune=generic -fasynchronous-unwind-tables''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default-enable-multibyte-characters: t
Major mode: Texinfo
Minor modes in effect:
shell-dirtrack-mode: t
diff-auto-refine-mode: t
auto-fill-function: do-auto-fill
erc-list-mode: t
erc-menu-mode: t
erc-autojoin-mode: t
erc-ring-mode: t
erc-pcomplete-mode: t
erc-track-mode: t
erc-track-minor-mode: t
erc-match-mode: t
erc-button-mode: t
erc-fill-mode: t
erc-stamp-mode: t
erc-netsplit-mode: t
erc-spelling-mode: t
erc-truncate-mode: t
flyspell-mode: t
erc-status-mode: t
erc-services-mode: t
erc-networks-mode: t
erc-irccontrols-mode: t
erc-noncommands-mode: t
erc-move-to-prompt-mode: t
erc-readonly-mode: t
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<switch-frame> <down-mouse-1> <mouse-movement> <mouse-movement>
<drag-mouse-1> <down-mouse-1> <mouse-1> C-x C-e C-a
C-x b SPC * h t <tab> <tab> <tab> < <tab> <return>
M-v M-v C-z o C-x b C-g <switch-frame> <next> <next>
<prior> C-x k <return> C-x b SPC * h t <tab> <return>
C-x k <return> <f10> M-v C-l C-u C-n C-u C-n C-l C-n
C-n C-l M-> p m <tab> y e a h , SPC e x c e p t SPC
o f t e n y o u <backspace> <backspace> SPC <backspace>
<backspace> SPC y o u SPC w a n SPC t C-t t o SPC g
o SPC d e b u g SPC <M-backspace> <M-backspace> s e
t SPC a SPC b r e a k p o i n t SPC a n d SPC d e b
u g SPC a n SPC e x p l i c i t SPC c a l l . SPC SPC
a n SPC o p t i o n SPC m i g h t SPC b e SPC n i c
e , SPC I SPC d u n n o . <backspace> <return> <f10>
<f10> <f10> <f10> <f10> <f10> <f10> M-x e m m s - p
a u s e <return> C-z o C-z o <f10> C-c b C-z o C-a
<switch-frame> <switch-frame> <switch-frame> <f10>
<f10> <f10> <f10> <f10> <switch-frame> <switch-frame>
M-x l o c a t e <return> g n u - s C-t m l . e l <return>
C-f C-z o C-z o C-z o C-h f l o c a t e <return> C-x
o C-x 1 C-c b M-x s <backspace> e m a c s - <M-backspace>
r e p r <backspace> o r t - e m <tab> b <tab> <ret
urn>
Recent messages:
Contacting host: localhost:3128
Reading [text/html]... 1k of 1k (101%)
Reading... done.
#<buffer *http localhost:3128*<2>>
Making completion list...
call-interactively: Beginning of buffer
Quit
call-interactively: End of buffer
Mark set
Type C-x 1 to delete the help window, C-M-v to scroll help.
Tom
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4341
; Package
emacs
.
(Thu, 10 Sep 2009 02:05:07 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Juri Linkov <juri <at> jurta.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Thu, 10 Sep 2009 02:05:07 GMT)
Full text and
rfc822 format available.
Message #10 received at 4341 <at> emacsbugs.donarmstrong.com (full text, mbox):
> Today I ran M-x locate.
> This took a little while -- long enough to bother me that Emacs was
> locked up for the entire time it was running.
>
> I think it would be preferable to run locate in asynchronously.
This would be possible when `locate' were more similar to `find-dired'.
I don't mean its output should be formatted as files in dired.
For that we could create a new command like `locate-dired'.
But maybe internals of `find-dired' should be generalized to
accept arbitrary commands. This would allow implementing
`locate-dired', `rgrep-dired', `lgrep-dired', i.e. any command
that searches files with their output formatted for dired
like `find-name-dired', `find-grep-dired' and `find-dired'.
--
Juri Linkov
http://www.jurta.org/emacs/
Severity set to 'wishlist' from 'normal'
Request was from
Juanma Barranquero <lekktu <at> gmail.com>
to
control <at> emacsbugs.donarmstrong.com
.
(Thu, 22 Oct 2009 09:40:20 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#4341
; Package
emacs
.
(Tue, 03 Nov 2020 17:05:02 GMT)
Full text and
rfc822 format available.
Message #15 received at 4341 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov <juri <at> jurta.org> writes:
> > I think it would be preferable to run locate in asynchronously.
>
> This would be possible when `locate' were more similar to `find-dired'.
> I don't mean its output should be formatted as files in dired.
> For that we could create a new command like `locate-dired'.
> But maybe internals of `find-dired' should be generalized to
> accept arbitrary commands. This would allow implementing
> `locate-dired', `rgrep-dired', `lgrep-dired', i.e. any command
> that searches files with their output formatted for dired
> like `find-name-dired', `find-grep-dired' and `find-dired'.
That sounds nice.
It's not trivial: find calls ls by itself. From processes Emacs can
receive anything, and it would have to decide by itself on the fly if
it's an ok file line and call "ls" to format the file line. "locate"
for example can report files that have been deleted in the meantime.
Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#4341
; Package
emacs
.
(Tue, 03 Nov 2020 19:49:01 GMT)
Full text and
rfc822 format available.
Message #18 received at 4341 <at> debbugs.gnu.org (full text, mbox):
>> > I think it would be preferable to run locate in asynchronously.
>>
>> This would be possible when `locate' were more similar to `find-dired'.
>> I don't mean its output should be formatted as files in dired.
>> For that we could create a new command like `locate-dired'.
>> But maybe internals of `find-dired' should be generalized to
>> accept arbitrary commands. This would allow implementing
>> `locate-dired', `rgrep-dired', `lgrep-dired', i.e. any command
>> that searches files with their output formatted for dired
>> like `find-name-dired', `find-grep-dired' and `find-dired'.
>
> That sounds nice.
>
> It's not trivial: find calls ls by itself. From processes Emacs can
> receive anything, and it would have to decide by itself on the fly if
> it's an ok file line and call "ls" to format the file line. "locate"
> for example can report files that have been deleted in the meantime.
Is it possible to avoid using "ls"? If ls formatting is not needed,
then the output buffer will look like a Dired buffer with enabled
'dired-hide-details-mode' that shows only file names.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#4341
; Package
emacs
.
(Wed, 04 Nov 2020 11:15:02 GMT)
Full text and
rfc822 format available.
Message #21 received at 4341 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov <juri <at> jurta.org> writes:
> Is it possible to avoid using "ls"? If ls formatting is not needed,
> then the output buffer will look like a Dired buffer with enabled
> 'dired-hide-details-mode' that shows only file names.
I guess it is possible, I have no clue. It's what we do now.
A downside is that developers would have to keep this in mind when
working on dired, otherwise things may work only partially or break.
For example, if you (in current Emacs master) mark files in a *locate*
output buffer, they get marked and you can act on them, but marked files
are not highlighted.
OTOH, if we leave the corner case of non-existing files aside for now -
when we do call ls (what would be the downsides?), we would get a fully
functional dired support out of the box.
Privately, I have adviced `locate' to insert the list of found files
into a new dired buffer (by calling `dired' with the explicit list of
files), and so far I find it better. That is actually already all I can
contribute so far.
Regards,
Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#4341
; Package
emacs
.
(Sun, 08 Nov 2020 19:49:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 4341 <at> debbugs.gnu.org (full text, mbox):
>> Is it possible to avoid using "ls"? If ls formatting is not needed,
>> then the output buffer will look like a Dired buffer with enabled
>> 'dired-hide-details-mode' that shows only file names.
>
> I guess it is possible, I have no clue. It's what we do now.
>
> A downside is that developers would have to keep this in mind when
> working on dired, otherwise things may work only partially or break.
> For example, if you (in current Emacs master) mark files in a *locate*
> output buffer, they get marked and you can act on them, but marked files
> are not highlighted.
>
> OTOH, if we leave the corner case of non-existing files aside for now -
> when we do call ls (what would be the downsides?), we would get a fully
> functional dired support out of the box.
>
> Privately, I have adviced `locate' to insert the list of found files
> into a new dired buffer (by calling `dired' with the explicit list of
> files), and so far I find it better. That is actually already all I can
> contribute so far.
Maybe this would be an improvement. But sorry, I can't help in testing:
while slow `M-x locate' used to be a problem in the past, nowadays it
finishes within 1 sec, so I simply won't notice the difference :-)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#4341
; Package
emacs
.
(Sun, 08 Nov 2020 20:25:02 GMT)
Full text and
rfc822 format available.
Message #27 received at 4341 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov <juri <at> jurta.org> writes:
> Maybe this would be an improvement. But sorry, I can't help in testing:
> while slow `M-x locate' used to be a problem in the past, nowadays it
> finishes within 1 sec, so I simply won't notice the difference :-)
FWIW, here it takes much longer than that. It would be very welcome if
someone would want to work on making it asynchronous.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#4341
; Package
emacs
.
(Sun, 15 Nov 2020 20:29:01 GMT)
Full text and
rfc822 format available.
Message #30 received at 4341 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
>> Maybe this would be an improvement. But sorry, I can't help in testing:
>> while slow `M-x locate' used to be a problem in the past, nowadays it
>> finishes within 1 sec, so I simply won't notice the difference :-)
>
> FWIW, here it takes much longer than that. It would be very welcome if
> someone would want to work on making it asynchronous.
What I can do to help is to post my current customization:
[locate.org (text/x-org, inline)]
* Highlight all matches in the =*Locate*= buffer like in the =*Occur*= buffer:
#+begin_src emacs-lisp
(add-hook 'locate-post-command-hook
(lambda ()
(save-excursion
(goto-char (point-min))
(when (or (re-search-forward "Matches for .* using filter \\(.*\\):" nil t)
(re-search-forward "Matches for \\(.*\\):" nil t))
(highlight-regexp
(match-string-no-properties 1)
'match)))))
#+end_src
* Ignore case in locate command
#+begin_src emacs-lisp
(with-eval-after-load 'locate
;; Redefine ‘locate-default-make-command-line’.
(defun locate-make-command-line-ignore-case (search-string)
(list locate-command "-i" search-string))
(setq locate-make-command-line 'locate-make-command-line-ignore-case))
#+end_src
[Message part 3 (text/plain, inline)]
With this I see no problems with adding a new option to use ls with switches
as demonstrated by this code:
#+begin_src emacs-lisp
(defun locate-make-command-line-ls (search-string)
(list shell-file-name
shell-command-switch
(format "%s %s %s | xargs ls -ls" locate-command "-i" search-string) ))
(setq locate-make-command-line 'locate-make-command-line-ls)
#+end_src
Then it's possible to enable 'dired-virtual-mode' in the output buffer
in 'locate-post-command-hook'.
Or maybe locate.el should be obsoleted, and a new option to run 'locate'
should be added to find-dired.el?
This bug report was last modified 4 years and 209 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.