GNU bug report logs -
#96
lgrep/rgrep not asking to save buffers
Previous Next
Reported by: Tom Tromey <tromey <at> redhat.com>
Date: Sat, 29 Mar 2008 21:35:03 UTC
Severity: wishlist
Tags: fixed, patch
Fixed in version 26.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
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 96 in the body.
You can then email your comments to 96 AT debbugs.gnu.org in the normal way.
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#96
; Package
emacs
.
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>
.
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:
I notice that lgrep and rgrep do not offer to save buffers.
This is different from other search and compilation commands.
This means that sometimes the results are incorrect.
Ideally these would only offer to save files that might actually be
matched by the command -- i.e., filtering buffers based on file
extension and directory.
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/22.1/etc/DEBUG for instructions.
In GNU Emacs 22.1.1 (i386-redhat-linux-gnu, GTK+ Version 2.12.1)
of 2007-11-06 on xenbuilder4.fedora.phx.redhat.com
Windowing system distributor `The X.Org Foundation', version 11.0.10300000
configured using `configure '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i386-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=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-pop' '--with-sound' '--with-gtk' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i386-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -DSYSTEM_PURESIZE_EXTRA=16777216 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -m32 -march=i386 -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
locale-coding-system: utf-8
default-enable-multibyte-characters: t
Major mode: C/l
Minor modes in effect:
auto-fill-function: tjt-c++-do-auto-fill
compilation-in-progress: (grep compilation compilation compilation compilation compilation grep gid compilation grep ...)
shell-dirtrack-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-irccontrols-mode: t
erc-noncommands-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
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
abbrev-mode: t
Recent input:
5 0 <return> M-> Q y n n SPC 5 0 <return> M-> C-u C-p
C-n E S-SPC E S-SPC E SPC q n n SPC C-u E E E E E E
E E E E E E q C-l M-< n n n l s SPC z C-c b C-z o C-a
C-u C-u C-p C-u C-n C-p M-x g i d <return> <return>
C-z o <f9> <f9> M-f M-f M-x g i <M-backspace> l g r
e p <return> <return> <return> <return> C-x o C-x 1
C-z o C-x 1 <f9> <f9> <f9> <f9> <f9> <f9> <f9> <f9>
<f9> <switch-frame> <switch-frame> C-x b * g u <tab>
<return> d e t <backspace> <backspace> <backspace>
C-c C-c d e t a c h <return> q <return> C-c b <switch-frame>
C-z o C-s C-g C-SPC C-g C-s C-w C-w C-s C-r C-r C-g
C-z o C-c C-g C-z o M-f M-f M-f M-b c _ s m a M-/ SPC
<backspace> <backspace> M-/ M-/ SPC ( C-e C-b ) C-a
C-s c _ C-w C-s C-f C-f c _ s m a s M-/ SPC ( M-f )
C-s C-s C-s C-a C-s c _ a l i g n C-s C-x b <return>
C-s a l i g n o f C-s C-s C-s C-x C-f c - c o m <tab>
h <return> C-l C-a M-f M-f M-x g r e p <return> C-g
M-x l g r e p <return> <return> <return> <return> <f9>
C-h f l g r e p <return> C-h C-g <help-echo> <down-mouse-1>
<mouse-2> C-x o C-x 1 C-c C-g C-g C-c b C-x s C-g M-x
l g r e p <return> M-p <return> <return> <return> M-x
r e p o r t - e m <tab> g <backspace> b <tab> <ret
urn>
Recent messages:
Saving /home/tromey/.newsrc.eld...done
(No files need saving)
Quit
Mark set
Quit [2 times]
Mark saved where search started [4 times]
Quit
Type C-x 1 to remove help window.
Auto-saving...done
Quit
Quit
Tom
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#96
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Chong Yidong <cyd <at> stupidchicken.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #10 received at 96 <at> emacsbugs.donarmstrong.com (full text, mbox):
> I notice that lgrep and rgrep do not offer to save buffers.
> This is different from other search and compilation commands.
> This means that sometimes the results are incorrect.
>
> Ideally these would only offer to save files that might actually be
> matched by the command -- i.e., filtering buffers based on file
> extension and directory.
I don't quite understand. Could you be more specific about what
behavior you are looking for?
Tags added: moreinfo
Request was from
Chong Yidong <cyd <at> stupidchicken.com>
to
control <at> emacsbugs.donarmstrong.com
.
(Thu, 21 Aug 2008 15:15:04 GMT)
Full text and
rfc822 format available.
Tags removed: moreinfo
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Wed, 24 Sep 2008 00:55:03 GMT)
Full text and
rfc822 format available.
Severity set to `minor' from `normal'
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Wed, 24 Sep 2008 00:55:03 GMT)
Full text and
rfc822 format available.
Message #19 received at 96-quiet <at> emacsbugs.donarmstrong.com (full text, mbox):
tags 96 - moreinfo
severity 96 minor
stop
> I don't quite understand. Could you be more specific about what
> behavior you are looking for?
Presumably he wants a line adding like M-x compile's:
(save-some-buffers (not compilation-ask-about-save) nil)
before the grep process runs; preferably only asking about files that
might be accessed by the grep.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#96
; Package
emacs
.
(Sun, 25 Jan 2015 17:43:04 GMT)
Full text and
rfc822 format available.
Message #22 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi there -- I'm submitting a patch for this bug. It applies cleanly
against the HEAD of the master branch right now
(f67446455fc0ec59f5c25c90a8783e571b60dc8f).
I'm following the directions in Lars Ingebrigtsen's "Welcome New Emacs
Developers" post, and copyright assignment is on file with the FSF (RT
#966206). If you need anything else from me, please let me know.
Thanks,
Hugh
[bug-96-grep-ask-save.diff (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
--
Hugh Brown
aardvark <at> saintaardvarkthecarpeted.com
http://saintaardvarkthecarpeted.com
Because the plural of Anecdote is Myth.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#96
; Package
emacs
.
(Sun, 25 Jan 2015 17:43:05 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#96
; Package
emacs
.
(Sun, 25 Jan 2015 17:59:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 96 <at> debbugs.gnu.org (full text, mbox):
> From: Hugh Brown <aardvark <at> saintaardvarkthecarpeted.com>
> Date: Sun, 25 Jan 2015 07:54:07 -0800
> Cc: 96 <at> debbugs.gnu.org
>
> Hi there -- I'm submitting a patch for this bug. It applies cleanly
> against the HEAD of the master branch right now
> (f67446455fc0ec59f5c25c90a8783e571b60dc8f).
Thanks. Please provide a log entry for this.
> +(defcustom grep-ask-about-save t
> + "Non-nil means \\[grep], \\[lgrep] and \\[rgrep] ask which buffers to save before running.
> +Otherwise, it saves all modified buffers without asking."
> + :type 'boolean
> + :group 'grep)
Is there a way to get back the current behavior, i.e. not save any
buffers?
In any case, this is a change in user-visible behavior, so I think it
warrants a NEWS entry
Also, this defcustom lacks a :version keyword.
> +(defcustom grep-save-buffers-predicate nil
> + "The second argument (PRED) passed to `save-some-buffers' before compiling.
> +E.g., one can set this to
> + (lambda ()
> + (string-prefix-p my-grep-root (file-truename (buffer-file-name))))
> +to limit saving to files located under `my-grep-root'.
Did you consider letting grep-ask-about-save serve double duty, in
that it could also be a predicate function? I'm not saying this would
necessarily be better, I'm just asking why not.
Added tag(s) patch.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 20 Feb 2015 18:13:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#96
; Package
emacs
.
(Mon, 29 Feb 2016 05:22:01 GMT)
Full text and
rfc822 format available.
Message #33 received at 96 <at> debbugs.gnu.org (full text, mbox):
Hugh Brown <aardvark <at> saintaardvarkthecarpeted.com> writes:
> Hi there -- I'm submitting a patch for this bug. It applies cleanly
> against the HEAD of the master branch right now
> (f67446455fc0ec59f5c25c90a8783e571b60dc8f).
Thanks; I've now applied it to the Emacs trunk (with the changes
suggested by Eli). In particular, there's only one variable, and you
can set it to nil to make the grep commands not save anything.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 29 Feb 2016 05:22:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 25.2, send any further explanations to
96 <at> debbugs.gnu.org and Tom Tromey <tromey <at> redhat.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 29 Feb 2016 05:22:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 28 Mar 2016 11:24:06 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:50:02 GMT)
Full text and
rfc822 format available.
bug Marked as fixed in versions 26.1.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:50:02 GMT)
Full text and
rfc822 format available.
bug No longer marked as fixed in versions 25.2.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:50:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 01 Jan 2017 12:24:27 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 223 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.