From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: call-interactively 'query-replace and 'isearch-forward Date: Mon, 11 Mar 2013 09:46:01 -0700 Message-ID: References: <87wqtehqz7.fsf@gmail.com><21988CA51DDE443B8EAE9816831AA264@us.oracle.com> <87sj41j4a3.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1363020708 2245 80.91.229.3 (11 Mar 2013 16:51:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Mar 2013 16:51:48 +0000 (UTC) To: "'Thorsten Jolitz'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 11 17:52:12 2013 Return-path: Envelope-to: geh-help-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 1UF5xJ-0003Cg-Fy for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Mar 2013 17:52:09 +0100 Original-Received: from localhost ([::1]:36116 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UF5wx-0000zC-BI for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Mar 2013 12:51:47 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:32926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UF5wm-0000yw-C4 for help-gnu-emacs@gnu.org; Mon, 11 Mar 2013 12:51:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UF5wk-0005gb-O8 for help-gnu-emacs@gnu.org; Mon, 11 Mar 2013 12:51:36 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:38180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UF5rS-00044X-FU for help-gnu-emacs@gnu.org; Mon, 11 Mar 2013 12:46:06 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r2BGk3hm031165 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 11 Mar 2013 16:46:04 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r2BGk2vd005946 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 11 Mar 2013 16:46:02 GMT Original-Received: from abhmt118.oracle.com (abhmt118.oracle.com [141.146.116.70]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id r2BGk2MM029059; Mon, 11 Mar 2013 11:46:02 -0500 Original-Received: from dradamslap1 (/130.35.178.8) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 11 Mar 2013 09:46:02 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87sj41j4a3.fsf@gmail.com> Thread-Index: Ac4edJSx176dta7LTPGGl13aN0HLvQAArChg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89471 Archived-At: > ,------------------------------------------ > | emacs -Q > | > | (defun foo () > | (interactive) > | (call-interactively #'isearch-forward) > | (call-interactively #'query-replace)) > | > | (defun bar () > | (interactive) > | (call-interactively #'query-replace) > | (call-interactively #'isearch-forward)) > | > | M-x foo > | M-x bar > `------------------------------------------ > > Both do the same thing: ask for input for 'query-replace'. > 'isearch-forward' is simply skipped when calling 'foo'. Actually, `isearch-forward' is not skipped in either case. In the case of `bar', there is no problem: just follow through with query-replacing (ending it when you are done), and you will see that you enter Isearch normally. The problem is that in the case of `foo', Isearch is entered but more or less immediately ends. I did not bother to step through the debugger or study the code to see why. Perhaps someone will do that and reply. But here is something that works for `foo': (defun foo () (interactive) (isearch-mode t nil nil t nil) (call-interactively #'query-replace))