From: Eric Hanchrow <eric.hanchrow@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: 25591@debbugs.gnu.org
Subject: bug#25591: 25.1; M-% offers to repeat last search, but forgets that it was a "symbol" search
Date: Tue, 14 Feb 2017 00:32:22 +0000 [thread overview]
Message-ID: <CAHZoxq-V97M8FbQZeWqL-khEu=iY5oHrV2UTDwqAtPnvsso3SQ@mail.gmail.com> (raw)
In-Reply-To: <87bmu5d4la.fsf@localhost>
[-- Attachment #1: Type: text/plain, Size: 1267 bytes --]
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 <juri@linkov.net> 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?
[-- Attachment #2: Type: text/html, Size: 2731 bytes --]
next prev parent reply other threads:[~2017-02-14 0:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 17:56 bug#25591: 25.1; M-% offers to repeat last search, but forgets that it was a "symbol" search Eric Hanchrow
2017-02-01 0:23 ` Juri Linkov
2017-02-14 0:00 ` Juri Linkov
2017-02-14 0:32 ` Eric Hanchrow [this message]
2017-02-14 23:11 ` Juri Linkov
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='CAHZoxq-V97M8FbQZeWqL-khEu=iY5oHrV2UTDwqAtPnvsso3SQ@mail.gmail.com' \
--to=eric.hanchrow@gmail.com \
--cc=25591@debbugs.gnu.org \
--cc=juri@linkov.net \
/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).