[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24580: 25.2.50; query-replace history doesn't work
From: |
Mark Oteiza |
Subject: |
bug#24580: 25.2.50; query-replace history doesn't work |
Date: |
Sun, 2 Oct 2016 12:51:28 -0400 |
User-agent: |
Mutt/1.7+23 (87911ba95dae) (2016-08-17) |
On 02/10/16 at 10:02am, Eli Zaretskii wrote:
> > Date: Sun, 2 Oct 2016 00:17:15 -0400
> > From: Mark Oteiza <mvoteiza@udel.edu>
> > Cc: Marcin Borkowski <mbork@mbork.pl>, 24580@debbugs.gnu.org
> >
> > > > - start emacs -Q
> > > > - press `a' `C-b', `M-%', `a', `RET', `b', `RET', `!'
> > > > - press `M-%', `M-p'
> > > >
> > > > Emacs says "Beginning of history; no preceding item".
> > >
> > > Mark, this regression was caused by the lexical-binding change in
> > > replace.el. Could you please take a look?
> >
> > The problem lies (at least) in query-replace-read-from, where
> > query-replace-from-to is let bound, and later read-from-minibuffer
> > refers to the symbol 'query-replace-from-to. At first sight, it looks
> > like it could be fixed by putting some of the setup done by these
> > bindings into the minibuffer setup hook.
>
> Isn't there a less intrusive change to fix this? A significant change
> like the one you propose is more risky, but if there's no safer one, I
> guess we should take it.
Perhaps just adding a (defvar query-replace-from-to-history …) will be
sufficient. That read-from-minibuffer and friends' HIST argument can
only be a symbol is a bit frustrating.
> > As for the other problem Marcin mentioned, that seems to be due to the
> > custom-reevaluate-setting call in the same function.
>
> I'm not sure I understand: what's wrong with
> custom-reevaluate-setting in this case?
>From -Q:
1. (setq-default query-replace-from-to-separator " => ")
2. Do an M-% (Like Marcin's in original recipe) once to get some default in the
prompt
3. M-%
I would expect to see (default a => b) in the prompt, but
custom-reevaluate-setting apparently ignores settings done outside of
customize. The first step instead needs to be
(custom-set-variables '(query-replace-from-to-separator " => "))
or something with the default for query-replace-from-to-separator should
be changed.
- bug#24580: 25.2.50; query-replace history doesn't work, Marcin Borkowski, 2016/10/01
- bug#24580: 25.2.50; query-replace history doesn't work, Eli Zaretskii, 2016/10/01
- bug#24580: 25.2.50; query-replace history doesn't work, Mark Oteiza, 2016/10/02
- bug#24580: 25.2.50; query-replace history doesn't work, Eli Zaretskii, 2016/10/02
- bug#24580: 25.2.50; query-replace history doesn't work,
Mark Oteiza <=
- bug#24580: 25.2.50; query-replace history doesn't work, Mark Oteiza, 2016/10/02
- bug#24580: 25.2.50; query-replace history doesn't work, Eli Zaretskii, 2016/10/03
- bug#24580: 25.2.50; query-replace history doesn't work, Mark Oteiza, 2016/10/03
- bug#24580: 25.2.50; query-replace history doesn't work, Eli Zaretskii, 2016/10/04
- bug#24580: 25.2.50; query-replace history doesn't work, Mark Oteiza, 2016/10/05
- bug#24580: 25.2.50; query-replace history doesn't work, Eli Zaretskii, 2016/10/03
- bug#24580: 25.2.50; query-replace history doesn't work, Mark Oteiza, 2016/10/03
- bug#24580: 25.2.50; query-replace history doesn't work, Eli Zaretskii, 2016/10/03