unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ed Avis <eda@waniasset.com>
To: 14708@debbugs.gnu.org
Subject: bug#14708: 24.2; query-replace-regexp when match and replacement are the same
Date: Mon, 24 Jun 2013 11:44:40 +0000	[thread overview]
Message-ID: <7E039918541B4C4183BFDB8F015C74300E8E80@WCL-EXCH02.wcl.local> (raw)

This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org.  Please check that
the From: line contains a valid email address.  After a delay of up
to one day, you should receive an acknowledgement at that address.

Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.  If you can, give a recipe
starting from `emacs -Q':

Enter some text in a buffer with some space characters and some
double  or   triple   spaced  like  this.

Do M-x query-replace-regexp and enter ' +' as the regexp and ' '
as the replacement text.  Emacs matches each sequence of one or
more space characters, as specified in the regexp, and asks whether
to replace it.

However, for many of the cases the replacement text will be the same
as the match, so it makes no difference whether you replace or not.
Since the aim of query-replace-regexp is primarily to do a search
and replace, not to find all places in the buffer where a regexp
matches, it should instead skip over those cases and only ask about
places where replacing will make a difference.

So in this example, only the double and triple spaces would be
asked about for replacement.

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'.
For information about debugging Emacs, please read the file
/usr/share/emacs/24.2/etc/DEBUG.


In GNU Emacs 24.2.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.6.4)
 of 2013-04-12 on buildvm-05.phx2.fedoraproject.org
Configured using:
 `configure '--build=x86_64-redhat-linux-gnu'
 '--host=x86_64-redhat-linux-gnu' '--program-prefix='
 '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr'
 '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
 '--datadir=/usr/share' '--includedir=/usr/include'
 '--libdir=/usr/lib64' '--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=gtk3' '--with-gpm=no'
 '--with-wide-int' 'build_alias=x86_64-redhat-linux-gnu'
 'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
 --param=ssp-buffer-size=4 -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro ''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: C
  value of $LC_CTYPE: en_GB.UTF-8
  value of $LC_MESSAGES: en_GB.UTF-8
  value of $LC_MONETARY: en_GB.UTF-8
  value of $LC_NUMERIC: en_GB.UTF-8
  value of $LC_TIME: en_GB.UTF-8
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: HTML

Minor modes in effect:
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
a t SPC w a c s l = " C-x o ESC O C ESC O C ESC O C
ESC O C ESC O C ESC O C ESC O C ESC O C ESC O C ESC
O C ESC O C ESC O C ESC O C ESC O C ESC O C ESC O C
ESC O C ESC O C ESC O C ESC O C ESC O C ESC O C ESC
O C ESC O C ESC O C ESC O C C-@ ESC O B ESC O B ESC
O B ESC O B ESC O D ESC O B ESC O D ESC w C-x o C-y
ESC O A ESC O A ESC O A ESC O A ESC O A C-e C-d C-e
C-d C-e C-d C-e C-d C-e C-d C-e " SPC f o r m a t =
" 0 . 0 DEL # " SPC r e p o r t - c h a n g e s = "
1 " SPC / > < / T D > C-a ESC d C-_ ESC f ESC f ESC
x r e DEL DEL q u e r SPC r e SPC - r e g e SPC RET
SPC c C-h + C-g ESC x ESC O A RET SPC + RET SPC RET
y y y y y y y y y y y y y y y C-a ESC x r e p o r t
SPC e m SPC b SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC
SPC SPC SPC SPC SPC SPC SPC SPC SPC DEL DEL DEL DEL
DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL
DEL DEL DEL RET

Recent messages:
Keyboard macro defined
(Type e to repeat macro) [17 times]
Making completion list...
Mark set
Mark saved where search started [2 times]
Auto-saving...done
Mark set [2 times]
Undo!
Quit [2 times]
Mark set

Load-path shadows:


______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________





             reply	other threads:[~2013-06-24 11:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-24 11:44 Ed Avis [this message]
2013-06-24 16:19 ` bug#14708: 24.2; query-replace-regexp when match and replacement are the same Josh
2013-06-24 16:30   ` Ed Avis
2013-06-24 17:01     ` Andreas Schwab
2013-06-25  1:49 ` Stefan Monnier
2013-06-25  4:17   ` Josh Feinstein
2013-06-25  6:56     ` Ed Avis
2013-06-25 14:10       ` Drew Adams
2013-06-25 15:03         ` Josh
2013-06-25 13:39     ` Stefan Monnier
2013-06-25 14:59       ` Josh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7E039918541B4C4183BFDB8F015C74300E8E80@WCL-EXCH02.wcl.local \
    --to=eda@waniasset.com \
    --cc=14708@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).