From unknown Sun Jun 15 08:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25591: 25.1; M-% offers to repeat last search, but forgets that it was a "symbol" search Resent-From: Eric Hanchrow Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Jan 2017 18:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25591 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 25591@debbugs.gnu.org X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.148588582431207 (code B ref -1); Tue, 31 Jan 2017 18:04:02 +0000 Received: (at submit) by debbugs.gnu.org; 31 Jan 2017 18:03:44 +0000 Received: from localhost ([127.0.0.1]:52526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYcmO-00087H-3I for submit@debbugs.gnu.org; Tue, 31 Jan 2017 13:03:44 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYcmL-000874-N5 for submit@debbugs.gnu.org; Tue, 31 Jan 2017 13:03:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYcmE-0001QI-8B for submit@debbugs.gnu.org; Tue, 31 Jan 2017 13:03:36 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.9 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID,URI_HEX autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47900) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cYcmE-0001QC-5S for submit@debbugs.gnu.org; Tue, 31 Jan 2017 13:03:34 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYcmA-0004kV-4Y for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2017 13:03:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYcm8-0001PV-35 for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2017 13:03:30 -0500 Received: from mail-it0-x232.google.com ([2607:f8b0:4001:c0b::232]:35188) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cYcm7-0001PJ-Tg for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2017 13:03:28 -0500 Received: by mail-it0-x232.google.com with SMTP id 203so222523193ith.0 for ; Tue, 31 Jan 2017 10:03:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=1nTLB2Ey6jGb6ltvH1vGxZpImHpreVxwsB/g3fhOMbg=; b=RKRNgZB5XqMAvPfkiG9njo+OTjAFOUgzitc5i2uMsshdeiFWlfxO0LYLUtWf2qZxkh j0uz3Y6l3AKtesaRWawv+M1jSRG5XPRT9TPrNgvXKJnoDgrwgQ/49hnolb5KE9cWCVYZ PWUfsCuyylkDurrfo6k64gj2tH1SlUc0LAj79hJGwXJsFwgsnljDa7VXLRni+v6hvOup e203YwFFlLY3t1d/fOni1WhyFouND00bPtHnZtXAErNOO1QdecKQNwn11gpJmhQdHN/Q zVyCPu9nLwNOigVKm3w06LSNFPweO4aJ5PNIqoKvZSmqPvOpe2hZJJUSBfmm6IfDA5iK EH8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=1nTLB2Ey6jGb6ltvH1vGxZpImHpreVxwsB/g3fhOMbg=; b=GMqcRHC/QbeUtQfhldcj8q/RWbK3QndoOCFvtnOFNtX2BfG8ln49/284D1PDfyr1Ft JyvIn1NBoXrRt9ot9wOy06V25i7rkTj+z2DsAjR2bJBOcA5YcNXpqpX8FCEcv56g9eds d+Id43Ol71zb6fujLqA5r4VQVSK/vWzb9QuhQ9AqNECbmDzErT5xrJotbuFaS3DYnuM+ 3EdNyZQ5/tVh7u6OtS/OpWoDnG6Q80PyQN3eyBQUuJIdA0Pn5/LzORAt6J/ifIkgjrzK cpykn5QGMybY/pMHA6GtTqeFaCbZEwqaX7GHBpuGMRuo5GmXKfBR1yy3YcQOpKXxln9s lkEg== X-Gm-Message-State: AIkVDXJ0VQ4mEdXno+YbUqmrOXIhtyGQP4MAuaZKwsbMGUAUMhweSSVSV6usUyXVNeItbTrgTE172zFpYdNUNg== X-Received: by 10.36.178.16 with SMTP id u16mr20997511ite.87.1485885373112; Tue, 31 Jan 2017 09:56:13 -0800 (PST) MIME-Version: 1.0 From: Eric Hanchrow Date: Tue, 31 Jan 2017 17:56:01 +0000 Message-ID: Content-Type: multipart/alternative; boundary=f403045d8fb8d76967054767a5d5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) --f403045d8fb8d76967054767a5d5 Content-Type: text/plain; charset=UTF-8 I don't know if this is a bug, but it's disappointing and inconvenient. Start emacs with -Q, and type into the *scratch* buffer these 10 characters: I ate this Now do C-a to move point to the beginning of the line. Now replace the symbol "i" with "u": M-s _ i M-% u RET ! So far, so good: we are looking at U at this which is correct. Now try to repeat the replacement: C-a M-% RET ! This changes the "i" in "this" to a u, even though that "i" isn't an independent symbol. I was hoping that it would do nothing. In GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu) of 2017-01-12 built on dev-dsk-erichan-2b-i-833ca944.us-west-2.amazon.com Repository revision: f0eb70d8935be90f7c03e187c12d9b60e7214cc6 Configured using: 'configure --with-x-toolkit=no --without-x' Configured features: JPEG SOUND GPM NOTIFY LIBSELINUX LIBXML2 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Dired by name Minor modes in effect: magit-auto-revert-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t projectile-mode: t global-hl-line-mode: t savehist-mode: t shell-dirtrack-mode: t global-auto-revert-mode: t recentf-mode: t ido-everywhere: t diff-auto-refine-mode: t which-function-mode: t erc-list-mode: t erc-menu-mode: t erc-autojoin-mode: t erc-ring-mode: t erc-networks-mode: t erc-pcomplete-mode: t erc-track-mode: t erc-match-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-netsplit-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t override-global-mode: t tooltip-mode: t global-eldoc-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 buffer-read-only: t line-number-mode: t transient-mark-mode: t Recent messages: Saving file /local/home/erichan/git-repositories/work/EMSEscalationService/src/EMSEscalationService/ems_escalation_service/ticket_status_synchronizer.py... Wrote /local/home/erichan/git-repositories/work/EMSEscalationService/src/EMSEscalationService/ems_escalation_service/ticket_status_synchronizer.py Discard hunk? (y or n) y [2 times] Mark set [2 times] Replaced 6 occurrences Saving file /local/home/erichan/git-repositories/work/EMSEscalationService/src/EMSEscalationService/ems_escalation_service/ticket_status_synchronizer.py... Wrote /local/home/erichan/git-repositories/work/EMSEscalationService/src/EMSEscalationService/ems_escalation_service/ticket_status_synchronizer.py Quit compilation-arguments is ((git log -1 --oneline ; export ENVROOT=$(brazil-bootstrap --environmentType test-runtime); export BRAZIL_CONFIG="--root $ENVROOT"; $ENVROOT/bin/python -m pytest --cov-report term-missing -rsx --showlocals ) compilation-mode nil nil) compilation-arguments looks like a brazil thang; turning off font-lock-mode Load-path shadows: None found. Features: (shadow mail-extr emacsbug sendmail ruby-mode conf-mode magit-extras sh-script smie executable network-stream nsm starttls url-http url-gw url-cache url-auth disp-table url-handlers tabify man sort ispell nxml-uchnm rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs git-rebase magit-ediff compare-w find-dired twb-find-dired log-view vc vc-dispatcher tramp-cache etags xref project esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util image jka-compr ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff dired-aux wdired dabbrev yasnippet magit-obsolete magit-blame magit-stash magit-bisect magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-branch magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode magit-core magit-autorevert magit-process magit-margin magit-mode magit-git crm magit-section magit-popup git-commit magit-utils log-edit message rfc822 mml mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader pcvs-util add-log with-editor async-bytecomp async server dash ffap projectile misearch multi-isearch hl-line term/xterm xterm amz-bmds amz-shell amz-brazil-cache savehist bookmark flymake python tramp-sh tramp tramp-compat tramp-loaddefs trampver shell json map edit-list browse-kill-ring advice eww mm-url gnus gnus-ems nnheader mail-utils url-queue url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse url-vars mailcap shr dom subr-x browse-url ws-butler wat derived autorevert filenotify recentf tree-widget ido vc-git diff-mode ibuf-ext ibuffer ibuf-macs dired-x dired grep compile find-func edmacro kmacro rotate face-remap which-func imenu s ucs-normalize amz-common amz-p4 amz-auto tls gnutls erc-list erc-menu erc-join erc-ring erc-networks erc-pcomplete pcomplete comint regexp-opt ansi-color ring erc-track erc-match erc-button wid-edit erc-fill erc-stamp erc-netsplit erc-goodies erc erc-backend erc-compat format-spec auth-source cl-seq eieio eieio-core gnus-util time-date mm-util help-fns mail-prsvr password-cache thingatpt pp use-package diminish cl-macs cl bind-key easy-mmode finder-inf info tool-bar package epg-config seq byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib rx mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote inotify multi-tty make-network-process emacs) Memory information: ((conses 16 593724 53943) (symbols 48 51673 0) (miscs 40 7554 4507) (strings 32 123285 13115) (string-bytes 1 3844947) (vectors 16 64681) (vector-slots 8 999591 77052) (floats 8 703 3997) (intervals 56 28388 4733) (buffers 976 125) (heap 1024 38541 3559)) --f403045d8fb8d76967054767a5d5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I don't know if this is a bug, but it's disap= pointing and inconvenient.

Start emacs with -Q= , and type into the *scratch* buffer these 10 characters:

=C2=A0 =C2=A0 I ate this

Now do C-a to mov= e point to the beginning of the line.

Now replace = the symbol "i" with "u":

=C2= =A0 =C2=A0M-s _ i M-% u RET !

So far, so good: we = are looking at=C2=A0

=C2=A0 =C2=A0U at this
<= div>
which is correct.

Now try to re= peat the replacement:

=C2=A0 =C2=A0C-a M-% RET !

This changes the "i" in "this" = to a u, even though that "i" isn't an
independent s= ymbol.=C2=A0 I was hoping that it would do nothing.



In GNU Emacs 25.1.1 (x86_64-unknown-linux-g= nu)
Repository revision: f0eb70d8935be90f7c03e187c1= 2d9b60e7214cc6
Configured using:
=C2=A0'configure -= -with-x-toolkit=3Dno --without-x'

Configured f= eatures:
JPEG SOUND GPM NOTIFY LIBSELINUX LIBXML2 ZLIB
=
Important settings:
=C2=A0 value of $LANG: en_US.U= TF-8
=C2=A0 locale-coding-system: utf-8-unix

=
Major mode: Dired by name

Minor modes in effe= ct:
=C2=A0 magit-auto-revert-mode: t
=C2=A0 global-git-= commit-mode: t
=C2=A0 async-bytecomp-package-mode: t
= =C2=A0 projectile-mode: t
=C2=A0 global-hl-line-mode: t
=C2=A0 savehist-mode: t
=C2=A0 shell-dirtrack-mode: t
= =C2=A0 global-auto-revert-mode: t
=C2=A0 recentf-mode: t
=C2=A0 ido-everywhere: t
=C2=A0 diff-auto-refine-mode: t
<= div>=C2=A0 which-function-mode: t
=C2=A0 erc-list-mode: t
=C2=A0 erc-menu-mode: t
=C2=A0 erc-autojoin-mode: t
= =C2=A0 erc-ring-mode: t
=C2=A0 erc-networks-mode: t
=C2= =A0 erc-pcomplete-mode: t
=C2=A0 erc-track-mode: t
=C2= =A0 erc-match-mode: t
=C2=A0 erc-button-mode: t
=C2=A0 = erc-fill-mode: t
=C2=A0 erc-stamp-mode: t
=C2=A0 erc-ne= tsplit-mode: t
=C2=A0 erc-irccontrols-mode: t
=C2=A0 er= c-noncommands-mode: t
=C2=A0 erc-move-to-prompt-mode: t
=C2=A0 erc-readonly-mode: t
=C2=A0 override-global-mode: t
=
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t<= /div>
=C2=A0 font-lock-mode: t
=C2=A0 auto-composition-mode: = t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compressio= n-mode: t
=C2=A0 buffer-read-only: t
=C2=A0 line-number= -mode: t
=C2=A0 transient-mark-mode: t

R= ecent messages:
Saving file /local/home/erichan/git-repositories/= work/EMSEscalationService/src/EMSEscalationService/ems_escalation_service/t= icket_status_synchronizer.py...
Wrote /local/home/erichan/git-rep= ositories/work/EMSEscalationService/src/EMSEscalationService/ems_escalation= _service/ticket_status_synchronizer.py
Discard hunk? (y or n) y [= 2 times]
Mark set [2 times]
Replaced 6 occurrences
Saving file /local/home/erichan/git-repositories/work/EMSEscalationSe= rvice/src/EMSEscalationService/ems_escalation_service/ticket_status_synchro= nizer.py...
Wrote /local/home/erichan/git-repositories/work/EMSEs= calationService/src/EMSEscalationService/ems_escalation_service/ticket_stat= us_synchronizer.py
Quit
compilation-arguments is ((git = =C2=A0log -1 --oneline ; export ENVROOT=3D$(brazil-bootstrap --environmentT= ype test-runtime); export BRAZIL_CONFIG=3D"--root $ENVROOT"; $ENV= ROOT/bin/python -m pytest --cov-report term-missing -rsx --showlocals ) =C2= =A0compilation-mode nil nil)
compilation-arguments looks like a b= razil thang; turning off font-lock-mode

Load-path = shadows:
None found.

Features:
(shadow mail-extr emacsbug sendmail ruby-mode conf-mode magit-extras
=
sh-script smie executable network-stream nsm starttls url-http url-gw<= /div>
url-cache url-auth disp-table url-handlers tabify man sort ispell=
nxml-uchnm rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-l= oc
rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-ptt= rn nxml-ns
nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxm= l-enc xmltok
vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs git-rebas= e magit-ediff
compare-w find-dired twb-find-dired log-view vc vc-= dispatcher
tramp-cache etags xref project esh-var esh-io esh-cmd = esh-opt esh-ext
esh-proc esh-arg esh-groups eshell esh-module esh= -mode esh-util image
jka-compr ediff-merg ediff-wind ediff-diff e= diff-mult ediff-help
ediff-init ediff-util ediff dired-aux wdired= dabbrev yasnippet
magit-obsolete magit-blame magit-stash magit-b= isect magit-remote
magit-commit magit-sequence magit-notes magit-= worktree magit-branch
magit-files magit-refs magit-status magit m= agit-repos magit-apply
magit-wip magit-log magit-diff smerge-mode= magit-core magit-autorevert
magit-process magit-margin magit-mod= e magit-git crm magit-section
magit-popup git-commit magit-utils = log-edit message rfc822 mml mml-sec
epg mm-decode mm-bodies mm-en= code mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev gmm= -utils mailheader pcvs-util add-log with-editor
async-bytecomp as= ync server dash ffap projectile misearch multi-isearch
hl-line te= rm/xterm xterm amz-bmds amz-shell amz-brazil-cache savehist
bookm= ark flymake python tramp-sh tramp tramp-compat tramp-loaddefs
tra= mpver shell json map edit-list browse-kill-ring advice eww mm-url
gnus gnus-ems nnheader mail-utils url-queue url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
url-parse url-vars mailcap shr dom subr-x browse-url ws-butler wat
derived autorevert filenotify recentf tree-widget ido vc-git diff-= mode
ibuf-ext ibuffer ibuf-macs dired-x dired grep compile find-f= unc edmacro
kmacro rotate face-remap which-func imenu s ucs-norma= lize amz-common
amz-p4 amz-auto tls gnutls erc-list erc-menu erc-= join erc-ring
erc-networks erc-pcomplete pcomplete comint regexp-= opt ansi-color ring
erc-track erc-match erc-button wid-edit erc-f= ill erc-stamp erc-netsplit
erc-goodies erc erc-backend erc-compat= format-spec auth-source cl-seq
eieio eieio-core gnus-util time-d= ate mm-util help-fns mail-prsvr
password-cache thingatpt pp use-p= ackage diminish cl-macs cl bind-key
easy-mmode finder-inf info to= ol-bar package epg-config seq byte-opt gv
bytecomp byte-compile c= l-extra help-mode easymenu cconv cl-loaddefs
pcase cl-lib rx mule= -util tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-fl= oat-type tabulated-list newcomment elisp-mode lisp-mode
prog-mode= register page menu-bar rfn-eshadow timer select mouse jit-lock
f= ont-lock syntax facemenu font-core frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
=
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
=
loaddefs button faces cus-face macroexp files text-properties overlay<= /div>
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote inotify multi-tty
make-netwo= rk-process emacs)

Memory information:
((= conses 16 593724 53943)
=C2=A0(symbols 48 51673 0)
=C2= =A0(miscs 40 7554 4507)
=C2=A0(strings 32 123285 13115)
=C2=A0(string-bytes 1 3844947)
=C2=A0(vectors 16 64681)
=C2=A0(vector-slots 8 999591 77052)
=C2=A0(floats 8 703 3997)
=C2=A0(intervals 56 28388 4733)
=C2=A0(buffers 976 125)<= /div>
=C2=A0(heap 1024 38541 3559))

--f403045d8fb8d76967054767a5d5-- From unknown Sun Jun 15 08:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25591: 25.1; M-% offers to repeat last search, but forgets that it was a "symbol" search Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Feb 2017 00:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25591 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eric Hanchrow Cc: 25591@debbugs.gnu.org Received: via spool by 25591-submit@debbugs.gnu.org id=B25591.14859101098727 (code B ref 25591); Wed, 01 Feb 2017 00:49:02 +0000 Received: (at 25591) by debbugs.gnu.org; 1 Feb 2017 00:48:29 +0000 Received: from localhost ([127.0.0.1]:52669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYj64-0002Gh-Nd for submit@debbugs.gnu.org; Tue, 31 Jan 2017 19:48:28 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:40687 helo=homiemail-a76.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYj62-0002GY-Sd for 25591@debbugs.gnu.org; Tue, 31 Jan 2017 19:48:27 -0500 Received: from homiemail-a76.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a76.g.dreamhost.com (Postfix) with ESMTP id C37E945807C; Tue, 31 Jan 2017 16:48:25 -0800 (PST) Received: from localhost.linkov.net (m213-102-76-140.cust.tele2.ee [213.102.76.140]) (Authenticated sender: jurta@jurta.org) by homiemail-a76.g.dreamhost.com (Postfix) with ESMTPA id EBBA245807B; Tue, 31 Jan 2017 16:48:24 -0800 (PST) From: Juri Linkov Organization: LINKOV.NET References: Date: Wed, 01 Feb 2017 02:23:27 +0200 In-Reply-To: (Eric Hanchrow's message of "Tue, 31 Jan 2017 17:56:01 +0000") Message-ID: <87fujyzsiu.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.8 (/) > I don't know if this is a bug, but it's disappointing and inconvenient. > > Start emacs with -Q, and type into the *scratch* buffer these 10 charac= ters: > > I ate this > > Now do C-a to move point to the beginning of the line. > > Now replace the symbol "i" with "u": > > M-s _ i M-% u RET ! > > So far, so good: we are looking at > > U at this > > which is correct. > > Now try to repeat the replacement: > > C-a M-% RET ! > > This changes the "i" in "this" to a u, even though that "i" isn't an > independent symbol. I was hoping that it would do nothing. Thanks for the feature request, or you might call it a bug since it doesn't do what you expect. We discussed this for isearch a while ago, where the proposal was for =E2=80=98C-s C-s=E2=80=99 to reuse the search type from a previous se= arch. You rightfully want the same for =E2=80=98M-% RET=E2=80=99 to reuse a pre= vious replacement type. The main problem in https://debbugs.gnu.org/22479 was to find a suitable data structure complementary to the existing history lists to keep search/replacement meta-data as well. From unknown Sun Jun 15 08:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25591: 25.1; M-% offers to repeat last search, but forgets that it was a "symbol" search Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Feb 2017 00:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25591 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eric Hanchrow Cc: 25591@debbugs.gnu.org Received: via spool by 25591-submit@debbugs.gnu.org id=B25591.148703097024180 (code B ref 25591); Tue, 14 Feb 2017 00:10:02 +0000 Received: (at 25591) by debbugs.gnu.org; 14 Feb 2017 00:09:30 +0000 Received: from localhost ([127.0.0.1]:39026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdQgT-0006Hw-Os for submit@debbugs.gnu.org; Mon, 13 Feb 2017 19:09:29 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:39398 helo=homiemail-a39.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdQgT-0006Ho-41 for 25591@debbugs.gnu.org; Mon, 13 Feb 2017 19:09:29 -0500 Received: from homiemail-a39.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a39.g.dreamhost.com (Postfix) with ESMTP id E37C915006D; Mon, 13 Feb 2017 16:09:27 -0800 (PST) Received: from localhost.linkov.net (m83-191-240-183.cust.tele2.ee [83.191.240.183]) (Authenticated sender: jurta@jurta.org) by homiemail-a39.g.dreamhost.com (Postfix) with ESMTPA id 1FAF4150069; Mon, 13 Feb 2017 16:09:26 -0800 (PST) From: Juri Linkov Organization: LINKOV.NET References: Date: Tue, 14 Feb 2017 02:00:01 +0200 In-Reply-To: (Eric Hanchrow's message of "Tue, 31 Jan 2017 17:56:01 +0000") Message-ID: <87bmu5d4la.fsf@localhost> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > I don't know if this is a bug, but it's disappointing and inconvenient. > > Start emacs with -Q, and type into the *scratch* buffer these 10 characters: > > I ate this > > Now do C-a to move point to the beginning of the line. > > Now replace the symbol "i" with "u": > > M-s _ i M-% u RET ! > > So far, so good: we are looking at > > U at this > > which is correct. > > Now try to repeat the replacement: > > C-a M-% RET ! > > This changes the "i" in "this" to a u, even though that "i" isn't an > independent symbol. I was hoping that it would do nothing. But what if you mistakenly invoked the replacement in wrong mode, and want to repeat the same replacement in the right one? E.g. first entered replacement strings in regexp replacement mode: C-M-% i RET u RET and then realized you want apply the same replacement strings in word mode: C-u M-% RET Should it perform word replacement as explicitly stated by the prefix arg C-u, or use a previous replacement type (in this case, regexp replacement) remembered in the replacement history? From unknown Sun Jun 15 08:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25591: 25.1; M-% offers to repeat last search, but forgets that it was a "symbol" search Resent-From: Eric Hanchrow Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Feb 2017 00:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25591 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 25591@debbugs.gnu.org Received: via spool by 25591-submit@debbugs.gnu.org id=B25591.148703236226277 (code B ref 25591); Tue, 14 Feb 2017 00:33:01 +0000 Received: (at 25591) by debbugs.gnu.org; 14 Feb 2017 00:32:42 +0000 Received: from localhost ([127.0.0.1]:39045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdR2v-0006pl-Kg for submit@debbugs.gnu.org; Mon, 13 Feb 2017 19:32:41 -0500 Received: from mail-it0-f42.google.com ([209.85.214.42]:36513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdR2t-0006pY-6T for 25591@debbugs.gnu.org; Mon, 13 Feb 2017 19:32:39 -0500 Received: by mail-it0-f42.google.com with SMTP id c7so10886289itd.1 for <25591@debbugs.gnu.org>; Mon, 13 Feb 2017 16:32:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Q/CiqG9h4cALw/vLytEsV3SfKCYvMhsrhvQTCsFpRJI=; b=ZDgqGjK43YcWAgcujBRJFJ3ZmNRDDCTZKIAjskEqs5qOQ6ADqgSg9uYPWDodlwQS+G nszjwDVMv4R/dlZAifgR7cK4WHdM5G2enXn4HT9O5nOXGCvLGMweIxsRjtNh/nl6W/Ua i1auwRX5/P1d2e5AX++wsoWh8rjI38wIekmlJVa+wkbQLyhfAsMBQYIMufziOvXeVUbB nACu3kPlY5cG4o44gV60Shp9V9EOpW0wrA3inqYIB1bChCAGFMOtnZ9UsgDsU859Zpp/ CZn1J3UiAYvITX/4my1/K52FI9r6XiM1GNnmm+tfOOqIyKJPCx1bEgok9ipBujCryC6Q KBag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Q/CiqG9h4cALw/vLytEsV3SfKCYvMhsrhvQTCsFpRJI=; b=GXjzsKPyPybqM2fRk4uYDr76avOFjy8GqZ7RCCFDlfcyX+nW00j6+Gl1mjZfxU2KHp gc2T8z0h6dP/RyOXcOsjPZQqTRuyu85UhSBeFonPmIrelGgtV9+rc3+8Kn3Q+QUjbUjA phmevtrLNddD7RUHPtacH+X6fcxyUa4NXyoLNYtrLqK6GpqUZBnd/kUY0Lr/LoYoG8Bm Gj9L2nvJbzmBVU4OD4qpVKNGTH/LJOa2m+SYP5R5p/zkQmvPgtzEgj77q4n2PvKIS9mh V7VnCq8zvQMLPooTY4n/sTAzVogWCR4YhQyPkIue9OlIX4iEaoC99eAv6IOPC4i5Kxg2 bs4g== X-Gm-Message-State: AMke39nIYBj8uzqc9IG+Ctc17EA7eG3vn8LBt1CcnSgFyA5EQDCb7ok2vJJ+sClN1VaKaZlBgFWP6e4ABTZfig== X-Received: by 10.107.135.147 with SMTP id r19mr23865425ioi.36.1487032353328; Mon, 13 Feb 2017 16:32:33 -0800 (PST) MIME-Version: 1.0 References: <87bmu5d4la.fsf@localhost> In-Reply-To: <87bmu5d4la.fsf@localhost> From: Eric Hanchrow Date: Tue, 14 Feb 2017 00:32:22 +0000 Message-ID: Content-Type: multipart/alternative; boundary=001a113ec75a309317054872b3e5 X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --001a113ec75a309317054872b3e5 Content-Type: text/plain; charset=UTF-8 Hm, I wasn't aware that M-% interprets the prefix arg to mean "word replace". My instinct says it should honor the explicit C-u. On Tue, Feb 14, 2017 at 12:09 AM Juri Linkov wrote: > I don't know if this is a bug, but it's disappointing and inconvenient. > > Start emacs with -Q, and type into the *scratch* buffer these 10 characters: > > I ate this > > Now do C-a to move point to the beginning of the line. > > Now replace the symbol "i" with "u": > > M-s _ i M-% u RET ! > > So far, so good: we are looking at > > U at this > > which is correct. > > Now try to repeat the replacement: > > C-a M-% RET ! > > This changes the "i" in "this" to a u, even though that "i" isn't an > independent symbol. I was hoping that it would do nothing. But what if you mistakenly invoked the replacement in wrong mode, and want to repeat the same replacement in the right one? E.g. first entered replacement strings in regexp replacement mode: C-M-% i RET u RET and then realized you want apply the same replacement strings in word mode: C-u M-% RET Should it perform word replacement as explicitly stated by the prefix arg C-u, or use a previous replacement type (in this case, regexp replacement) remembered in the replacement history? --001a113ec75a309317054872b3e5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hm, I wasn't awar= e that M-% interprets the prefix arg to mean "word replace".=C2= =A0 My instinct says it should honor the explicit C-u.

On Tue, Feb 14, 2017 at 12:09 AM Juri Linkov <juri@linkov.net&= gt; wrote:
> I don't know if this is a bug, but it's disappointing an= d inconvenient.
>
> Start emacs with -Q, and type into the *scratch* buffer these 10 chara= cters:
>
>=C2=A0 =C2=A0 =C2=A0I ate this
>
> Now do C-a to move point to the beginning of the line.
>
> Now replace the symbol "i" with "u":
>
>=C2=A0 =C2=A0 M-s _ i M-% u RET !
>
> So far, so good: we are looking at
>
>=C2=A0 =C2=A0 U at this
>
> which is correct.
>
> Now try to repeat the replacement:
>
>=C2=A0 =C2=A0 C-a M-% RET !
>
> This changes the "i" in "this" to a u, even though= that "i" isn't an
> independent symbol.=C2=A0 I was hoping that it would do nothing.

But what if you mistakenly invoked the replacement in wrong mode,
and want to repeat the same replacement in the right one?=C2=A0 E.g.
first entered replacement strings in regexp replacement mode:

C-M-% i RET u RET

and then realized you want apply the same replacement strings
in word mode:

C-u M-% RET

Should it perform word replacement as explicitly stated
by the prefix arg C-u, or use a previous replacement type
(in this case, regexp replacement) remembered in the
replacement history?
--001a113ec75a309317054872b3e5-- From unknown Sun Jun 15 08:47:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25591: 25.1; M-% offers to repeat last search, but forgets that it was a "symbol" search Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Feb 2017 23:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25591 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eric Hanchrow Cc: 25591@debbugs.gnu.org Received: via spool by 25591-submit@debbugs.gnu.org id=B25591.148711499919984 (code B ref 25591); Tue, 14 Feb 2017 23:30:04 +0000 Received: (at 25591) by debbugs.gnu.org; 14 Feb 2017 23:29:59 +0000 Received: from localhost ([127.0.0.1]:40308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdmXm-0005CG-Uh for submit@debbugs.gnu.org; Tue, 14 Feb 2017 18:29:59 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:48255 helo=homiemail-a39.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdmXk-0005C1-LR for 25591@debbugs.gnu.org; Tue, 14 Feb 2017 18:29:57 -0500 Received: from homiemail-a39.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a39.g.dreamhost.com (Postfix) with ESMTP id 876A015006D; Tue, 14 Feb 2017 15:29:55 -0800 (PST) Received: from localhost.linkov.net (m83-191-240-183.cust.tele2.ee [83.191.240.183]) (Authenticated sender: jurta@jurta.org) by homiemail-a39.g.dreamhost.com (Postfix) with ESMTPA id B7D93150069; Tue, 14 Feb 2017 15:29:54 -0800 (PST) From: Juri Linkov Organization: LINKOV.NET References: <87bmu5d4la.fsf@localhost> Date: Wed, 15 Feb 2017 01:11:32 +0200 In-Reply-To: (Eric Hanchrow's message of "Tue, 14 Feb 2017 00:32:22 +0000") Message-ID: <87fujgqsez.fsf@localhost> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > Hm, I wasn't aware that M-% interprets the prefix arg to mean "word > replace". My instinct says it should honor the explicit C-u. Even in your example, wouldn't it be confusing if after typing C-a M-% RET ! and seeing this non-symbol prompt Query replace (default i =E2=86=92 u): replacement will still be symbol-based (because the previous replacement was symbol-based)? To be not confusing the prompt should show explicitly the replacement type, e.g. in case of symbol replacement: Query replace symbol (default i =E2=86=92 u): When we'll store the replacement type in the history, then maybe display previous replacements in the minibuffer like Query replace (default symbol i =E2=86=92 u): then typing M-p will pull a previous replacement into the minibuffer, e.g. word-based: Query replace (default symbol i =E2=86=92 u): word foo =E2=86=92 bar where =E2=80=9Cword=E2=80=9D is intangible part of the prompt. >>> I don't know if this is a bug, but it's disappointing and inconvenien= t. >>> >>> Start emacs with -Q, and type into the *scratch* buffer these 10 char= acters: >>> >>> I ate this >>> >>> Now do C-a to move point to the beginning of the line. >>> >>> Now replace the symbol "i" with "u": >>> >>> M-s _ i M-% u RET ! >>> >>> So far, so good: we are looking at >>> >>> U at this >>> >>> which is correct. >>> >>> Now try to repeat the replacement: >>> >>> C-a M-% RET ! >>> >>> This changes the "i" in "this" to a u, even though that "i" isn't an >>> independent symbol. I was hoping that it would do nothing. >> >> But what if you mistakenly invoked the replacement in wrong mode, >> and want to repeat the same replacement in the right one? E.g. >> first entered replacement strings in regexp replacement mode: >> >> C-M-% i RET u RET >> >> and then realized you want apply the same replacement strings >> in word mode: >> >> C-u M-% RET >> >> Should it perform word replacement as explicitly stated >> by the prefix arg C-u, or use a previous replacement type >> (in this case, regexp replacement) remembered in the >> replacement history?