From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 06 02:45:51 2010 Received: (at submit) by debbugs.gnu.org; 6 Aug 2010 06:45:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OhGgg-0001BS-3W for submit@debbugs.gnu.org; Fri, 06 Aug 2010 02:45:51 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OhGgc-0001BM-Po for submit@debbugs.gnu.org; Fri, 06 Aug 2010 02:45:48 -0400 Received: from lists.gnu.org ([199.232.76.165]:36265) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OhGh9-0005cJ-Qn for submit@debbugs.gnu.org; Fri, 06 Aug 2010 02:46:19 -0400 Received: from [140.186.70.92] (port=43809 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OhGh3-0006Th-VU for bug-gnu-emacs@gnu.org; Fri, 06 Aug 2010 02:46:19 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OhGh1-0003NJ-NJ for bug-gnu-emacs@gnu.org; Fri, 06 Aug 2010 02:46:13 -0400 Received: from deliver.uni-koblenz.de ([141.26.64.15]:19204) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OhGh1-0003N4-90 for bug-gnu-emacs@gnu.org; Fri, 06 Aug 2010 02:46:11 -0400 Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id E556F782E895 for ; Fri, 6 Aug 2010 08:46:09 +0200 (CEST) Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12990-04 for ; Fri, 6 Aug 2010 08:46:07 +0200 (CEST) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Received: from tsdh (tsdh.uni-koblenz.de [141.26.67.142]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 4C679782E893 for ; Fri, 6 Aug 2010 08:46:07 +0200 (CEST) From: Tassilo Horn To: bug-gnu-emacs@gnu.org Subject: 24.0.50; Incomplete match highlighting with `query-replace-regexp' Date: Fri, 06 Aug 2010 08:46:07 +0200 Message-ID: <878w4kqlw0.fsf@member.fsf.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: amavisd-new at uni-koblenz.de X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) The matches to be replaced by `query-replace-regexp' aren't highlighted completely, although the replacement is correct. Here's a recipe: 1. emacs -Q 2. Create a buffer with contents: #1 153030 120 = 423988 #2 152845 181 = 1500234 #3 155160 247 = 767821 #4 155160 310 = 11131347 #5 155160 319 = 13979167 3. M-x query-replace-regexp RET [0-9]+ = RET RET Result: - The first match "120 =" is highlighted completely. - All further matches have only the last number highlighted, e.g. "1 =", "7 =", ... - Performing the replacement replaces the correct, complete match, e.g. "120 =", "181 =", "247 =" `re-builder' doesn't have this issue. It highlights the complete matches. For further info see thread on gmane.emacs.help starting with : "Regex is not being as "hungry" as it is supposed to" In GNU Emacs 24.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1) of 2010-08-05 on thinkpad Windowing system distributor `The X.Org Foundation', version 11.0.10899905 configured using `configure '--prefix=/usr' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libdir=/usr/lib64' '--program-suffix=-emacs-24' '--infodir=/usr/share/info/emacs-24' '--with-crt-dir=/usr/lib64' '--without-compress-info' '--with-sound' '--with-x' '--without-gconf' '--without-toolkit-scroll-bars' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--with-xft' '--with-libotf' '--with-m17n-flt' '--with-x-toolkit=gtk' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-march=native -O2 -pipe' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed'' 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: Message Minor modes in effect: gnus-message-citation-mode: t diff-auto-refine-mode: t rcirc-track-minor-mode: t footnote-mode: t mml-mode: t global-auto-complete-mode: t auto-complete-mode: t yas/minor-mode: t recentf-mode: t window-number-meta-mode: t window-number-mode: t global-subword-mode: t subword-mode: t savehist-mode: t show-paren-mode: t command-frequency-autosave-mode: t command-frequency-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-2 M-x q h C-g C-g C-SPC M-w C-x b s c r C-y M-x q u e - r [ 0 - 9 ] + SPC = " y y y y y C-x b C-g C-_ C-_ C-_ C-_ C-_ F C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k D i t t o SPC w i t h h SPC t h e SPC c u r r i n t e n t SPC e m a c s SPC 2 4 SPC b z r . SPC t r u n SPC t r u k n . n k . M-x r e p o r t b Recent messages: 20100806T083715.509> End of message Quit [2 times] Mark set [3 times] Replaced 5 occurrences Quit Undo! [5 times] Mark set [2 times] Auto-saving...done byte-code: End of buffer [2 times] Making completion list... Load-path shadows: ~/repos/el/org-mode/lisp/org-xoxo hides /usr/share/emacs/24.0.50/lisp/org/org-xoxo ~/repos/el/org-mode/lisp/org-vm hides /usr/share/emacs/24.0.50/lisp/org/org-vm ~/repos/el/org-mode/lisp/org-w3m hides /usr/share/emacs/24.0.50/lisp/org/org-w3m ~/repos/el/org-mode/lisp/org-wl hides /usr/share/emacs/24.0.50/lisp/org/org-wl ~/repos/el/org-mode/lisp/org-table hides /usr/share/emacs/24.0.50/lisp/org/org-table ~/repos/el/org-mode/lisp/org-taskjuggler hides /usr/share/emacs/24.0.50/lisp/org/org-taskjuggler ~/repos/el/org-mode/lisp/org-timer hides /usr/share/emacs/24.0.50/lisp/org/org-timer ~/repos/el/org-mode/lisp/org-rmail hides /usr/share/emacs/24.0.50/lisp/org/org-rmail ~/repos/el/org-mode/lisp/org-remember hides /usr/share/emacs/24.0.50/lisp/org/org-remember ~/repos/el/org-mode/lisp/org-src hides /usr/share/emacs/24.0.50/lisp/org/org-src ~/repos/el/org-mode/lisp/org-publish hides /usr/share/emacs/24.0.50/lisp/org/org-publish ~/repos/el/org-mode/lisp/org-plot hides /usr/share/emacs/24.0.50/lisp/org/org-plot ~/repos/el/org-mode/lisp/org-protocol hides /usr/share/emacs/24.0.50/lisp/org/org-protocol ~/repos/el/org-mode/lisp/org-mouse hides /usr/share/emacs/24.0.50/lisp/org/org-mouse ~/repos/el/org-mode/lisp/org-mobile hides /usr/share/emacs/24.0.50/lisp/org/org-mobile ~/repos/el/org-mode/lisp/org-mks hides /usr/share/emacs/24.0.50/lisp/org/org-mks ~/repos/el/org-mode/lisp/org-mhe hides /usr/share/emacs/24.0.50/lisp/org/org-mhe ~/repos/el/org-mode/lisp/org-mew hides /usr/share/emacs/24.0.50/lisp/org/org-mew ~/repos/el/org-mode/lisp/org-mac-message hides /usr/share/emacs/24.0.50/lisp/org/org-mac-message ~/repos/el/org-mode/lisp/org-macs hides /usr/share/emacs/24.0.50/lisp/org/org-macs ~/repos/el/org-mode/lisp/org-latex hides /usr/share/emacs/24.0.50/lisp/org/org-latex ~/repos/el/org-mode/lisp/org-jsinfo hides /usr/share/emacs/24.0.50/lisp/org/org-jsinfo ~/repos/el/org-mode/lisp/org-list hides /usr/share/emacs/24.0.50/lisp/org/org-list ~/repos/el/org-mode/lisp/org-irc hides /usr/share/emacs/24.0.50/lisp/org/org-irc ~/repos/el/org-mode/lisp/org-inlinetask hides /usr/share/emacs/24.0.50/lisp/org/org-inlinetask ~/repos/el/org-mode/lisp/org-info hides /usr/share/emacs/24.0.50/lisp/org/org-info ~/repos/el/org-mode/lisp/org-install hides /usr/share/emacs/24.0.50/lisp/org/org-install ~/repos/el/org-mode/lisp/org-indent hides /usr/share/emacs/24.0.50/lisp/org/org-indent ~/repos/el/org-mode/lisp/org-html hides /usr/share/emacs/24.0.50/lisp/org/org-html ~/repos/el/org-mode/lisp/org-id hides /usr/share/emacs/24.0.50/lisp/org/org-id ~/repos/el/org-mode/lisp/org-icalendar hides /usr/share/emacs/24.0.50/lisp/org/org-icalendar ~/repos/el/org-mode/lisp/org-freemind hides /usr/share/emacs/24.0.50/lisp/org/org-freemind ~/repos/el/org-mode/lisp/org-gnus hides /usr/share/emacs/24.0.50/lisp/org/org-gnus ~/repos/el/org-mode/lisp/org-habit hides /usr/share/emacs/24.0.50/lisp/org/org-habit ~/repos/el/org-mode/lisp/org-feed hides /usr/share/emacs/24.0.50/lisp/org/org-feed ~/repos/el/org-mode/lisp/org hides /usr/share/emacs/24.0.50/lisp/org/org ~/repos/el/org-mode/lisp/org-footnote hides /usr/share/emacs/24.0.50/lisp/org/org-footnote ~/repos/el/org-mode/lisp/org-exp hides /usr/share/emacs/24.0.50/lisp/org/org-exp ~/repos/el/org-mode/lisp/org-faces hides /usr/share/emacs/24.0.50/lisp/org/org-faces ~/repos/el/org-mode/lisp/org-exp-blocks hides /usr/share/emacs/24.0.50/lisp/org/org-exp-blocks ~/repos/el/org-mode/lisp/org-docview hides /usr/share/emacs/24.0.50/lisp/org/org-docview ~/repos/el/org-mode/lisp/org-entities hides /usr/share/emacs/24.0.50/lisp/org/org-entities ~/repos/el/org-mode/lisp/org-datetree hides /usr/share/emacs/24.0.50/lisp/org/org-datetree ~/repos/el/org-mode/lisp/org-docbook hides /usr/share/emacs/24.0.50/lisp/org/org-docbook ~/repos/el/org-mode/lisp/org-ctags hides /usr/share/emacs/24.0.50/lisp/org/org-ctags ~/repos/el/org-mode/lisp/org-crypt hides /usr/share/emacs/24.0.50/lisp/org/org-crypt ~/repos/el/org-mode/lisp/org-colview hides /usr/share/emacs/24.0.50/lisp/org/org-colview ~/repos/el/org-mode/lisp/org-clock hides /usr/share/emacs/24.0.50/lisp/org/org-clock ~/repos/el/org-mode/lisp/org-compat hides /usr/share/emacs/24.0.50/lisp/org/org-compat ~/repos/el/org-mode/lisp/org-capture hides /usr/share/emacs/24.0.50/lisp/org/org-capture ~/repos/el/org-mode/lisp/org-bibtex hides /usr/share/emacs/24.0.50/lisp/org/org-bibtex ~/repos/el/org-mode/lisp/org-beamer hides /usr/share/emacs/24.0.50/lisp/org/org-beamer ~/repos/el/org-mode/lisp/org-bbdb hides /usr/share/emacs/24.0.50/lisp/org/org-bbdb ~/repos/el/org-mode/lisp/org-attach hides /usr/share/emacs/24.0.50/lisp/org/org-attach ~/repos/el/org-mode/lisp/org-agenda hides /usr/share/emacs/24.0.50/lisp/org/org-agenda ~/repos/el/org-mode/lisp/org-ascii hides /usr/share/emacs/24.0.50/lisp/org/org-ascii ~/repos/el/org-mode/lisp/org-archive hides /usr/share/emacs/24.0.50/lisp/org/org-archive ~/repos/el/org-mode/lisp/ob-tangle hides /usr/share/emacs/24.0.50/lisp/org/ob-tangle ~/repos/el/org-mode/lisp/ob-table hides /usr/share/emacs/24.0.50/lisp/org/ob-table ~/repos/el/org-mode/lisp/ob-sh hides /usr/share/emacs/24.0.50/lisp/org/ob-sh ~/repos/el/org-mode/lisp/ob-sqlite hides /usr/share/emacs/24.0.50/lisp/org/ob-sqlite ~/repos/el/org-mode/lisp/ob-sql hides /usr/share/emacs/24.0.50/lisp/org/ob-sql ~/repos/el/org-mode/lisp/ob-screen hides /usr/share/emacs/24.0.50/lisp/org/ob-screen ~/repos/el/org-mode/lisp/ob-ruby hides /usr/share/emacs/24.0.50/lisp/org/ob-ruby ~/repos/el/org-mode/lisp/ob-sass hides /usr/share/emacs/24.0.50/lisp/org/ob-sass ~/repos/el/org-mode/lisp/ob-R hides /usr/share/emacs/24.0.50/lisp/org/ob-R ~/repos/el/org-mode/lisp/ob-ref hides /usr/share/emacs/24.0.50/lisp/org/ob-ref ~/repos/el/org-mode/lisp/ob-python hides /usr/share/emacs/24.0.50/lisp/org/ob-python ~/repos/el/org-mode/lisp/ob-octave hides /usr/share/emacs/24.0.50/lisp/org/ob-octave ~/repos/el/org-mode/lisp/ob-perl hides /usr/share/emacs/24.0.50/lisp/org/ob-perl ~/repos/el/org-mode/lisp/ob-ocaml hides /usr/share/emacs/24.0.50/lisp/org/ob-ocaml ~/repos/el/org-mode/lisp/ob-mscgen hides /usr/share/emacs/24.0.50/lisp/org/ob-mscgen ~/repos/el/org-mode/lisp/ob-matlab hides /usr/share/emacs/24.0.50/lisp/org/ob-matlab ~/repos/el/org-mode/lisp/ob-lob hides /usr/share/emacs/24.0.50/lisp/org/ob-lob ~/repos/el/org-mode/lisp/ob-C hides /usr/share/emacs/24.0.50/lisp/org/ob-C ~/repos/el/org-mode/lisp/ob-latex hides /usr/share/emacs/24.0.50/lisp/org/ob-latex ~/repos/el/org-mode/lisp/ob-exp hides /usr/share/emacs/24.0.50/lisp/org/ob-exp ~/repos/el/org-mode/lisp/ob-keys hides /usr/share/emacs/24.0.50/lisp/org/ob-keys ~/repos/el/org-mode/lisp/ob-haskell hides /usr/share/emacs/24.0.50/lisp/org/ob-haskell ~/repos/el/org-mode/lisp/ob-gnuplot hides /usr/share/emacs/24.0.50/lisp/org/ob-gnuplot ~/repos/el/org-mode/lisp/ob-eval hides /usr/share/emacs/24.0.50/lisp/org/ob-eval ~/repos/el/org-mode/lisp/ob hides /usr/share/emacs/24.0.50/lisp/org/ob ~/repos/el/org-mode/lisp/ob-emacs-lisp hides /usr/share/emacs/24.0.50/lisp/org/ob-emacs-lisp ~/repos/el/org-mode/lisp/ob-dot hides /usr/share/emacs/24.0.50/lisp/org/ob-dot ~/repos/el/org-mode/lisp/ob-ditaa hides /usr/share/emacs/24.0.50/lisp/org/ob-ditaa ~/repos/el/org-mode/lisp/ob-comint hides /usr/share/emacs/24.0.50/lisp/org/ob-comint ~/repos/el/org-mode/lisp/ob-css hides /usr/share/emacs/24.0.50/lisp/org/ob-css ~/repos/el/org-mode/lisp/ob-clojure hides /usr/share/emacs/24.0.50/lisp/org/ob-clojure ~/repos/el/org-mode/lisp/ob-asymptote hides /usr/share/emacs/24.0.50/lisp/org/ob-asymptote Features: (shadow emacsbug flow-fill xgit-dvc xgit xgit-annotate dvc-annotate xgit-log tla smerge-mode dvc-state dvc-config dvc-diff dvc-fileinfo diff tla-gnus dvc-gnus dvc-cmenu dvc-about dvc-version dvc-revlist sort gnus-cite ansi-color gnus-bcklg gnus-async gnus-ml newcomment bzr-core tla-core tla-autoconf tla-defs dvc-log vc vc-dispatcher dvc-unified dvc-tips ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff xdarcs-core xgit-core xhg-core xmtn-minimal qp smiley rcirc-late-fix gnus-topic parse-time nnml netrc nndraft nnmh bbdb-gnus bbdb-snarf mail-extr bbdb-com nnnil gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 epg-config mm-view smime password-cache dig nntp gnus-cache gnus-sum nnoo gnus-group gnus-undo nnmail mail-source format-spec gnus-start gnus-spec gnus-int gnus-range gnus-win package greqlscript-mode greql-mode tg-mode generic th-latex paredit dvc-autoloads dvc-core dvc-lisp dvc-buffers dvc-ui dvc-register dvc-utils dvc-emacs ewoc dvc-defs dvc-site magit diff-mode log-edit pcvs-util add-log wtf cus-edit cus-start cus-load rdictcc rcirc org-beamer solar cal-dst holidays hol-loaddefs appt diary-lib diary-loaddefs vc-git hl-line org-w3m org-irc org-jsinfo org-infojs org-html org-exp ob-exp org-exp-blocks org-info org-gnus org-docview org-bibtex org-bbdb org-protocol org-attach org-id org-agenda org ob-emacs-lisp ob-keys ob-comint ob-tangle ob-ref ob-lob ob-table ob org-footnote org-src org-list org-faces org-compat org-entities org-macs time-date org-install cal-menu calendar cal-loaddefs dired-x dired-aux pcomplete em-term term disp-table ehelp electric esh-var esh-io esh-cmd esh-ext esh-proc esh-arg eldoc esh-groups eshell esh-util esh-module esh-mode highlight-symbol hi-lock th-boxquote boxquote rect footnote smtpmail ecomplete message idna sendmail rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader info edit-server server auto-complete-config auto-complete popup yasnippet dropdown-list help-mode view noutline outline browse-kill-ring derived recentf tree-widget sr-speedbar speedbar sb-image ezimage dframe assoc anything-config warnings compile comint ring semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw eieio byte-opt bytecomp byte-compile mode-local cedet imenu w3m-bookmark w3m browse-url doc-view jka-compr image-mode w3m-hist w3m-fb w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util bookmark pp easymenu rx ffap thingatpt anything window-number uniquify subword saveplace savehist paren th-private lusty-explorer dired cl cl-19 edmacro kmacro advice help-fns advice-preload th-common mm-url gnus gnus-ems nnheader mail-utils wid-edit url-http tls url url-proxy url-privacy url-expand url-methods url-history mailcap url-auth mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-cookie url-util url-parse auth-source gnus-util url-gw url-vars mm-util mail-prsvr windmove command-frequency easy-mmode site-gentoo w3m-load preview-latex bbdb-autoloads bbdb regexp-opt timezone tex-site auto-loads tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 06 09:13:25 2010 Received: (at 6808) by debbugs.gnu.org; 6 Aug 2010 13:13:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OhMjl-0005DL-7k for submit@debbugs.gnu.org; Fri, 06 Aug 2010 09:13:25 -0400 Received: from impaqm2.telefonica.net ([213.4.138.2]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OhMjj-0005DG-FR for 6808@debbugs.gnu.org; Fri, 06 Aug 2010 09:13:24 -0400 Received: from IMPmailhost5.adm.correo ([10.20.102.126]) by IMPaqm2.telefonica.net with bizsmtp id r0Qo1e01F2jdgqJ3M1DwQB; Fri, 06 Aug 2010 15:13:56 +0200 Received: from ceviche.home ([83.61.38.247]) by IMPmailhost5.adm.correo with BIZ IMP id r1Dv1e00F5KwfZf1l1Dwld; Fri, 06 Aug 2010 15:13:56 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Received: by ceviche.home (Postfix, from userid 20848) id B54AF662D6; Fri, 6 Aug 2010 15:13:55 +0200 (CEST) From: Stefan Monnier To: Tassilo Horn Subject: Re: bug#6808: 24.0.50; Incomplete match highlighting with `query-replace-regexp' Message-ID: References: <878w4kqlw0.fsf@member.fsf.org> Date: Fri, 06 Aug 2010 15:13:55 +0200 In-Reply-To: <878w4kqlw0.fsf@member.fsf.org> (Tassilo Horn's message of "Fri, 06 Aug 2010 08:46:07 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 6808 Cc: 6808@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.8 (-) > The matches to be replaced by `query-replace-regexp' aren't highlighted > completely, although the replacement is correct. > Here's a recipe: > 1. emacs -Q > 2. Create a buffer with contents: > #1 153030 120 = 423988 > #2 152845 181 = 1500234 > #3 155160 247 = 767821 > #4 155160 310 = 11131347 > #5 155160 319 = 13979167 > 3. M-x query-replace-regexp RET [0-9]+ = RET RET > Result: > - The first match "120 =" is highlighted completely. > - All further matches have only the last number highlighted, e.g. "1 =", > "7 =", ... > - Performing the replacement replaces the correct, complete match, > e.g. "120 =", "181 =", "247 =" I'd guess that those incorrect matches are search with re-search-backward rather than re-search-forward. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 06 13:43:22 2010 Received: (at 6808) by debbugs.gnu.org; 6 Aug 2010 17:43:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OhQx0-000783-8K for submit@debbugs.gnu.org; Fri, 06 Aug 2010 13:43:22 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OhQwx-00077u-H3 for 6808@debbugs.gnu.org; Fri, 06 Aug 2010 13:43:20 -0400 Received: from compute3.internal (compute3.internal [10.202.2.43]) by gateway1.messagingengine.com (Postfix) with ESMTP id 743411A28CF; Fri, 6 Aug 2010 13:43:53 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute3.internal (MEProxy); Fri, 06 Aug 2010 13:43:53 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=from:to:subject:date:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:message-id; s=smtpout; bh=mM50Xt/TP7Ym6um26RDTPOCHkeA=; b=hOt96cTjdh+xlHmvpkfsrVq2069s8N2OKDOBI9Y9m0dFB0BQ/ExOBd9aC9muY+ODah32KVwO+j63hVujEQtjf3KODlfKFFNn3fVqlXKAl6fFpkGYyywmsoY2Vos5ok7mIrsKooYwSak6MBdzkq3dvR7x7s+952J2uaVxQJbZB50= X-Sasl-enc: URdbStsufVFrmFcLpuidyVZPoD0Ans4nBAFVZo8bf9iO 1281116630 Received: from thinkpad.localnet (p54AF1B7E.dip0.t-ipconnect.de [84.175.27.126]) by mail.messagingengine.com (Postfix) with ESMTPSA id 050D74E7B15; Fri, 6 Aug 2010 13:43:50 -0400 (EDT) From: Tassilo Horn To: Stefan Monnier Subject: Re: bug#6808: 24.0.50; Incomplete match highlighting with `query-replace-regexp' Date: Fri, 6 Aug 2010 19:43:47 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.35-gentoo; KDE/4.4.5; x86_64; ; ) References: <878w4kqlw0.fsf@member.fsf.org> In-Reply-To: X-Face: `TY6r/ws=N5uqO1E`M=Sups<}n%T[E^o_?MJj X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: 6808 Cc: 6808@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.8 (---) On Friday 06 August 2010 15:13:55 Stefan Monnier wrote: > > The matches to be replaced by `query-replace-regexp' aren't highlighted > > completely, although the replacement is correct. > > > Here's a recipe: > > > 1. emacs -Q > > 2. Create a buffer with contents: > > > #1 153030 120 = 423988 > > #2 152845 181 = 1500234 > > #3 155160 247 = 767821 > > #4 155160 310 = 11131347 > > #5 155160 319 = 13979167 > > > 3. M-x query-replace-regexp RET [0-9]+ = RET RET > > > Result: > > > - The first match "120 =" is highlighted completely. > > - All further matches have only the last number highlighted, e.g. "1 =", > > "7 =", ... > > - Performing the replacement replaces the correct, complete match, > > e.g. "120 =", "181 =", "247 =" > > I'd guess that those incorrect matches are search with > re-search-backward rather than re-search-forward. To check your guess, I adviced that subr: (defadvice re-search-backward (before rsb-called activate) (message "re-search-backward was called")) Indeed, with that example above, for the 5 replacements that subr is called 25 times. I tried the same in an emacs without -Q, and although I had that incorrect highlighting at first, after typing the advice and evaling it, out of sudden it highlighted correctly... Another thing that is a bit strange (but it doesn't qualify as a bug) is that if you have point in the middle of the example, also matches before point are highlighted, although you won't reach them. Bye, Tassilo From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 06 20:01:17 2010 Received: (at 6808) by debbugs.gnu.org; 7 Aug 2010 00:01:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OhWqj-0001SN-Eo for submit@debbugs.gnu.org; Fri, 06 Aug 2010 20:01:17 -0400 Received: from smtprelay-h21.telenor.se ([195.54.99.196]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OhWqg-0001SG-Nn for 6808@debbugs.gnu.org; Fri, 06 Aug 2010 20:01:16 -0400 Received: from ipb3.telenor.se (ipb3.telenor.se [195.54.127.166]) by smtprelay-h21.telenor.se (Postfix) with ESMTP id DC246EA8BD for <6808@debbugs.gnu.org>; Sat, 7 Aug 2010 02:01:48 +0200 (CEST) X-SENDER-IP: [85.228.198.191] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ans2AM4/XExV5Ma/PGdsb2JhbACHZ5hjDAEBAQE1LcZmhToE X-IronPort-AV: E=Sophos;i="4.55,331,1278280800"; d="scan'208";a="558437004" Received: from c-bfc6e455.04-211-6c6b701.cust.bredbandsbolaget.se (HELO muon.localdomain) ([85.228.198.191]) by ipb3.telenor.se with ESMTP; 07 Aug 2010 02:01:26 +0200 Received: by muon.localdomain (Postfix, from userid 1000) id 7D1CF484494; Sat, 7 Aug 2010 02:01:25 +0200 (CEST) From: =?utf-8?Q?Johan_Bockg=C3=A5rd?= To: Stefan Monnier Subject: Re: bug#6808: 24.0.50; Incomplete match highlighting with `query-replace-regexp' References: <878w4kqlw0.fsf@member.fsf.org> Mail-Copies-To: never Date: Sat, 07 Aug 2010 02:01:24 +0200 In-Reply-To: (Stefan Monnier's message of "Fri, 06 Aug 2010 15:13:55 +0200") Message-ID: <87r5ibwasr.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 6808 Cc: Tassilo Horn , 6808@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) Stefan Monnier writes: >> The matches to be replaced by `query-replace-regexp' aren't highlighted >> completely, although the replacement is correct. [...] > I'd guess that those incorrect matches are search with > re-search-backward rather than re-search-forward. Yes. replace-highlight does not update isearch-forward, so you get this behavior if the previous isearch was a backward search (or in emacs -Q). The following patch fixes this and two other problems: * There is no lazy highlighting during replacement if the previous isearch set isearch-error (invalid regexp). * A search that is started with C-s uses forward search for highlighting and one that is started with C-r uses backward search, but the highlighting is not updated if one switches direction in the middle (C-s followed by C-r or vice versa). diff --git a/lisp/isearch.el b/lisp/isearch.el index 89d50d6..1fe604d 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -2581,6 +2581,7 @@ since they have special meaning in a regexp." (defvar isearch-lazy-highlight-case-fold-search nil) (defvar isearch-lazy-highlight-regexp nil) (defvar isearch-lazy-highlight-space-regexp nil) +(defvar isearch-lazy-highlight-forward nil) (defun lazy-highlight-cleanup (&optional force) "Stop lazy highlighting and remove extra highlighting from current buffer. @@ -2620,7 +2621,9 @@ by other Emacs features." (not (= (window-start) isearch-lazy-highlight-window-start)) (not (= (window-end) ; Window may have been split/joined. - isearch-lazy-highlight-window-end)))) + isearch-lazy-highlight-window-end)) + (not (eq isearch-forward + isearch-lazy-highlight-forward)))) ;; something important did indeed change (lazy-highlight-cleanup t) ;kill old loop & remove overlays (when (not isearch-error) @@ -2635,7 +2638,8 @@ by other Emacs features." isearch-lazy-highlight-case-fold-search isearch-case-fold-search isearch-lazy-highlight-regexp isearch-regexp isearch-lazy-highlight-wrapped nil - isearch-lazy-highlight-space-regexp search-whitespace-regexp) + isearch-lazy-highlight-space-regexp search-whitespace-regexp + isearch-lazy-highlight-forward isearch-forward) (unless (equal isearch-string "") (setq isearch-lazy-highlight-timer (run-with-idle-timer lazy-highlight-initial-delay nil @@ -2651,7 +2655,8 @@ Attempt to do the search exactly the way the pending Isearch would." (search-invisible nil) ; don't match invisible text (retry t) (success nil) - (bound (if isearch-forward + (isearch-forward isearch-lazy-highlight-forward) + (bound (if isearch-lazy-highlight-forward (min (or isearch-lazy-highlight-end-limit (point-max)) (if isearch-lazy-highlight-wrapped isearch-lazy-highlight-start @@ -2687,7 +2692,7 @@ Attempt to do the search exactly the way the pending Isearch would." (select-window isearch-lazy-highlight-window)) (save-excursion (save-match-data - (goto-char (if isearch-forward + (goto-char (if isearch-lazy-highlight-forward isearch-lazy-highlight-end isearch-lazy-highlight-start)) (while looping @@ -2700,7 +2705,7 @@ Attempt to do the search exactly the way the pending Isearch would." (let ((mb (match-beginning 0)) (me (match-end 0))) (if (= mb me) ;zero-length match - (if isearch-forward + (if isearch-lazy-highlight-forward (if (= mb (if isearch-lazy-highlight-wrapped isearch-lazy-highlight-start (window-end))) @@ -2720,7 +2725,7 @@ Attempt to do the search exactly the way the pending Isearch would." (overlay-put ov 'priority 1000) (overlay-put ov 'face lazy-highlight-face) (overlay-put ov 'window (selected-window)))) - (if isearch-forward + (if isearch-lazy-highlight-forward (setq isearch-lazy-highlight-end (point)) (setq isearch-lazy-highlight-start (point))))) @@ -2730,7 +2735,7 @@ Attempt to do the search exactly the way the pending Isearch would." (setq looping nil nomore t) (setq isearch-lazy-highlight-wrapped t) - (if isearch-forward + (if isearch-lazy-highlight-forward (progn (setq isearch-lazy-highlight-end (window-start)) (goto-char (max (or isearch-lazy-highlight-start-limit (point-min)) diff --git a/lisp/replace.el b/lisp/replace.el index d73692c..01d971f 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1979,7 +1979,9 @@ make, or the user didn't cancel the call." (let ((isearch-string string) (isearch-regexp regexp) (search-whitespace-regexp nil) - (isearch-case-fold-search case-fold)) + (isearch-case-fold-search case-fold) + (isearch-forward t) + (isearch-error nil)) ;; Set isearch-word to nil because word-replace is regexp-based, ;; so `isearch-search-fun' should not use `word-search-forward'. (if (and isearch-word isearch-regexp) (setq isearch-word nil)) From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 08 16:55:30 2010 Received: (at 6808) by debbugs.gnu.org; 8 Aug 2010 20:55:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiCu1-0004VW-QC for submit@debbugs.gnu.org; Sun, 08 Aug 2010 16:55:30 -0400 Received: from pantheon-po14.its.yale.edu ([130.132.50.23]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiCtz-0004VR-FE for 6808@debbugs.gnu.org; Sun, 08 Aug 2010 16:55:28 -0400 Received: from furry (173-9-75-145-NewEngland.hfc.comcastbusiness.net [173.9.75.145]) (authenticated bits=0) by pantheon-po14.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o78Ku62H024491 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 8 Aug 2010 16:56:07 -0400 Received: by furry (Postfix, from userid 1000) id B025EC013; Sun, 8 Aug 2010 16:56:06 -0400 (EDT) From: Chong Yidong To: Stefan Monnier Subject: Re: bug#6808: 24.0.50; Incomplete match highlighting with `query-replace-regexp' References: <878w4kqlw0.fsf@member.fsf.org> <87r5ibwasr.fsf@gnu.org> Date: Sun, 08 Aug 2010 16:56:06 -0400 In-Reply-To: <87r5ibwasr.fsf@gnu.org> ("Johan =?utf-8?Q?Bockg=C3=A5rd=22's?= message of "Sat, 07 Aug 2010 02:01:24 +0200") Message-ID: <87k4o0vn6h.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -3.1 (---) X-Debbugs-Envelope-To: 6808 Cc: Tassilo Horn , 6808@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.2 (---) Johan Bockg=C3=A5rd writes: > Yes. replace-highlight does not update isearch-forward, so you get this > behavior if the previous isearch was a backward search (or in emacs -Q). > > The following patch fixes this and two other problems: > > * There is no lazy highlighting during replacement if the previous > isearch set isearch-error (invalid regexp). > > * A search that is started with C-s uses forward search for highlighting > and one that is started with C-r uses backward search, but the > highlighting is not updated if one switches direction in the middle > (C-s followed by C-r or vice versa). Thanks. I've checked it into the branch. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 08 16:55:44 2010 Received: (at control) by debbugs.gnu.org; 8 Aug 2010 20:55:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiCuG-0004Vi-38 for submit@debbugs.gnu.org; Sun, 08 Aug 2010 16:55:44 -0400 Received: from pantheon-po14.its.yale.edu ([130.132.50.23]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiCuD-0004Vd-P6 for control@debbugs.gnu.org; Sun, 08 Aug 2010 16:55:42 -0400 Received: from furry (173-9-75-145-NewEngland.hfc.comcastbusiness.net [173.9.75.145]) (authenticated bits=0) by pantheon-po14.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o78KuLgb024517 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sun, 8 Aug 2010 16:56:21 -0400 Received: by furry (Postfix, from userid 1000) id 5D05AC013; Sun, 8 Aug 2010 16:56:21 -0400 (EDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: close 6808 Date: Sun, 08 Aug 2010 16:56:21 -0400 Message-ID: <87iq3kvn62.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) close 6808 thanks From unknown Sat Aug 16 16:12:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 06 Sep 2010 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator