From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.bugs Subject: bug#13687: /srv/bzr/emacs/trunk r111878: * lisp/replace.el(read-regexp): Let-bind `default' to the first Date: Sat, 09 Mar 2013 22:55:18 +0530 Message-ID: <87fw04scxt.fsf@gmail.com> References: <877glsyecw.fsf@gmail.com> <87621cfhff.fsf@mail.jurta.org> <87zjykygjk.fsf@mail.jurta.org> <87vc92gi37.fsf@gmail.com> <1751CEB23B214A3AADCCFD9F007425DE@us.oracle.com> <87li9xer9u.fsf@mail.jurta.org> <8738w5n3rg.fsf@gmail.com> <87d2v9rmcl.fsf@gmail.com> <87sj44o87c.fsf@gmail.com> <365EC1D3D8334B83827CDD1691FDEBC7@us.oracle.com> <87vc90se5a.fsf@gmail.com> <778E2A4E7CBA425C994F7678C2E690CE@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1362849990 16946 80.91.229.3 (9 Mar 2013 17:26:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Mar 2013 17:26:30 +0000 (UTC) Cc: 13687@debbugs.gnu.org To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 09 18:26:55 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UENXp-00026k-AI for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Mar 2013 18:26:53 +0100 Original-Received: from localhost ([::1]:38331 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UENXS-0000lM-Pr for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Mar 2013 12:26:30 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UENXL-0000lC-Jf for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2013 12:26:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UENXG-0004BK-ME for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2013 12:26:23 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UENXG-0004BE-Ht for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2013 12:26:18 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UENXy-0007iA-1m for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2013 12:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jambunathan K Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Mar 2013 17:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13687-submit@debbugs.gnu.org id=B13687.136284997229579 (code B ref 13687); Sat, 09 Mar 2013 17:27:02 +0000 Original-Received: (at 13687) by debbugs.gnu.org; 9 Mar 2013 17:26:12 +0000 Original-Received: from localhost ([127.0.0.1]:42094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UENX9-0007h2-GR for submit@debbugs.gnu.org; Sat, 09 Mar 2013 12:26:11 -0500 Original-Received: from mail-pb0-f42.google.com ([209.85.160.42]:57647) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UENX6-0007go-NK for 13687@debbugs.gnu.org; Sat, 09 Mar 2013 12:26:09 -0500 Original-Received: by mail-pb0-f42.google.com with SMTP id xb4so2301714pbc.1 for <13687@debbugs.gnu.org>; Sat, 09 Mar 2013 09:25:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=ta3e1XOZ5LEwjsMV+qcafcx2gaj/YAa9837Kqohtd+w=; b=WybP5OfeYGD1/IiZbEcxRRSHkHIZEpdkzrB62f6gZAfggMLFrCOxYM3LTWNEtzc9nm DyrvUVJiBbnncmn04vNXXrz1ltcnu1cYfCqGYQy5S2oyJk3U1e26Y5VI7rq4VyLqUxWy KokZtDwyUJzjXAbgRFEDKLNCNDrDguGfFTTcvXgLYJrAlQFavzxLnpfbZIh3IIDIH56O KOFF4YaZy8oNztwBR1CSaBc90a//2VQHmFkDrhOkp07TYxX2HehyQBo9pw2a/0ZmdKpY WbQSR9Qwghe4yjyiiLLc6DOVYWTmTlJn/Q+rOh0otyeeYf9KT1ERmwtHbUQui4puDL0Q ioow== X-Received: by 10.68.239.3 with SMTP id vo3mr6464939pbc.184.1362849919010; Sat, 09 Mar 2013 09:25:19 -0800 (PST) Original-Received: from debian-6.05 ([101.63.128.26]) by mx.google.com with ESMTPS id qb10sm11132996pbb.43.2013.03.09.09.25.15 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Sat, 09 Mar 2013 09:25:18 -0800 (PST) In-Reply-To: <778E2A4E7CBA425C994F7678C2E690CE@us.oracle.com> (Drew Adams's message of "Sat, 9 Mar 2013 09:14:41 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72285 Archived-At: "Drew Adams" writes: >> > Do you at least see why your *Messages* logged `exit-minibuffer'? >> >> ,---- In `read-regexp' >> | + (let ((user-defaults (read-regexp-defaults))) >> | + (unless (eq user-defaults t) >> | + (setq defaults user-defaults) >> | + (message "cmd: %s defaults: %S" this-command defaults))) >> | + >> `---- >> >> cmd: exit-minibuffer defaults: nil >> >> > Your code checks only (eq user-defaults t). When >> > `user-defaults' is nil, this returns nil. >> >> The cmd is `exit-minibuffer'. That corresponds to RET in minibuffer >> map. I have no other explanation. >> >> Btw, your explanation is *totally* off the mark. It talks about >> defaults in my snippet and not the cmd. > > NOW I suppose I AM dealing with a dead horse. But in hopes of helping and at > the risk of being told once more to f___ off, let me try once more: > > +(defun read-regexp-defaults () > + (if (not read-regexp-user-defaults) t > + (let ((user-default (assoc this-command read-regexp-user-defaults))) > + (pcase user-default > + (`(,cmd ,(and (pred functionp) getter)) > + (funcall getter)) > + (`nil nil) > + (_ t))))) > > Don't you think that that will return nil when `this-command' = > `exit-minibuffer', since `exit-minibuffer' is not in your value of alist > `read-regexp-user-defaults'? Right. > And if it returns nil, don't you think that the following will then print `cmd: > exit-minibuffer defaults: nil'? > > + (let ((user-defaults (read-regexp-defaults))) > + (unless (eq user-defaults t) > + (setq defaults user-defaults) > + (message "cmd: %s defaults: %S" this-command defaults))) > > If this doesn't help, I give up and lie down next to your dead horse. Right. The question is why is this-command `exit-minibuffer' when it should have been `multi-occur-in-matching-buffers'. Where does `exit-minibuffer' come from. I am not concerned about the defaults, I am concerned about how the cmd. Do you have an explanation. There should be an explanation... and the closest I have come to is to map RET to `exit-minibuffer'.