From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark Oteiza Newsgroups: gmane.emacs.bugs Subject: bug#24580: 25.2.50; query-replace history doesn't work Date: Sun, 2 Oct 2016 12:51:28 -0400 Message-ID: <20161002165128.GA1032@holos.localdomain> References: <87fuogh8mo.fsf@mbork.pl> <83y428lawc.fsf@gnu.org> <20161002041715.GA5612@holos.localdomain> <8337kfkzcd.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1475427181 24924 195.159.176.226 (2 Oct 2016 16:53:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 2 Oct 2016 16:53:01 +0000 (UTC) User-Agent: Mutt/1.7+23 (87911ba95dae) (2016-08-17) Cc: mbork@mbork.pl, 24580@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 02 18:52:57 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqk0I-0004Kr-8M for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Oct 2016 18:52:42 +0200 Original-Received: from localhost ([::1]:60218 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqk0G-00060L-Ri for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Oct 2016 12:52:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqjzi-0005hv-8x for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2016 12:52:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqjzf-0001Xf-3P for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2016 12:52:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqjze-0001XV-W2 for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2016 12:52:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bqjze-0003mS-RG for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2016 12:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mark Oteiza Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Oct 2016 16:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24580 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24580-submit@debbugs.gnu.org id=B24580.147542709714466 (code B ref 24580); Sun, 02 Oct 2016 16:52:02 +0000 Original-Received: (at 24580) by debbugs.gnu.org; 2 Oct 2016 16:51:37 +0000 Original-Received: from localhost ([127.0.0.1]:42159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqjzF-0003lF-50 for submit@debbugs.gnu.org; Sun, 02 Oct 2016 12:51:37 -0400 Original-Received: from mail-qt0-f175.google.com ([209.85.216.175]:35882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqjzD-0003kt-F8 for 24580@debbugs.gnu.org; Sun, 02 Oct 2016 12:51:35 -0400 Original-Received: by mail-qt0-f175.google.com with SMTP id m5so15177639qtb.3 for <24580@debbugs.gnu.org>; Sun, 02 Oct 2016 09:51:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=cBJFCNlOF8TmI/9Oht1f3k+CZEGQ+e/0BCgq690NTRw=; b=Vv+bF8qK5P4ZDqSsWJmYms/FxN1aec0X37LSxcSC3EGC/RSfZRtTGE2RDFaRD9r9n6 CAg2Luvj6gw/6sxvVVSEY/skxQ2DOSykfIxc8DPvSr9btI+AaXJWClOWTgc8iBQjgAXZ wCawfgn2bVdnEXC7le5zxiHETS39G2CY3lKuwkSaQ+KMltsYlBRYucZmYT2XOEqCEd5U MYOKVoljyBhWtJRjLABfsrmgpAOnGtxCXNLzlJUUDJkKSAfzGsb8Zp6GxuKORZBltwfC xGn2QhrNcOp6ssR/SJa6Zr7LefYWbYVNC6NQNAi4iNEp9gJu8K8+a633NOYwuCvQXLto rixw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=cBJFCNlOF8TmI/9Oht1f3k+CZEGQ+e/0BCgq690NTRw=; b=k8FJRfmIpqohBQ9HggQcQ3qTt6mj0xT/QsoEcNagp2aB01e5sbU8rr7kHA++2dq4fs Yu/uxI15fE7u1hzokWbX+mPJdW0aeJSP//32z2Ba9Ssbudbv9lnVHfhqxGKomEDbtwec A0Np+KqwHoJpZUi32+yzDdPc+H4txDLyfOmRNGj1qXwY9cZkczEEAeBHgj/cduDWKwBG b/8XTjvIB34/FRM4hmkuziMKxh7JtlhrWv1Y6/JUjiY/tEUXRsEcOVO0RnRqMD1a4ZDT +LxrdZE1vEpHvgIDf8DiOKn/MCnPY9dvxY/t6gCjBHdnFHsnbWQP5asUCMYiPg6VlyvT 4xxg== X-Gm-Message-State: AA6/9Rkg4U5J08VNmhCT51Th0WTJLItWnnyTV97JFV/7ODzs3j4FoBdKjzgQkNk+BqGmdDwr X-Received: by 10.237.50.65 with SMTP id y59mr16974327qtd.147.1475427089853; Sun, 02 Oct 2016 09:51:29 -0700 (PDT) Original-Received: from holos.localdomain ([69.250.222.218]) by smtp.gmail.com with ESMTPSA id x21sm15534844qkb.19.2016.10.02.09.51.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Oct 2016 09:51:28 -0700 (PDT) Original-Received: by holos.localdomain (Postfix, from userid 1000) id 27E4F60D6C; Sun, 2 Oct 2016 12:51:28 -0400 (EDT) Content-Disposition: inline In-Reply-To: <8337kfkzcd.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:123906 Archived-At: On 02/10/16 at 10:02am, Eli Zaretskii wrote: > > Date: Sun, 2 Oct 2016 00:17:15 -0400 > > From: Mark Oteiza > > Cc: Marcin Borkowski , 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.