From: "Drew Adams" <drew.adams@oracle.com>
To: "'Thorsten Jolitz'" <tjolitz@gmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: call-interactively 'query-replace and 'isearch-forward
Date: Mon, 11 Mar 2013 09:46:01 -0700 [thread overview]
Message-ID: <BD010CF5754C46CC90F290D1E97A28FE@us.oracle.com> (raw)
In-Reply-To: <87sj41j4a3.fsf@gmail.com>
> ,------------------------------------------
> | 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))
next prev parent reply other threads:[~2013-03-11 16:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 15:54 call-interactively 'query-replace and 'isearch-forward Thorsten Jolitz
2013-03-11 16:08 ` Drew Adams
2013-03-11 16:21 ` Thorsten Jolitz
2013-03-11 16:46 ` Drew Adams [this message]
2013-03-11 17:10 ` Thorsten Jolitz
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BD010CF5754C46CC90F290D1E97A28FE@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=tjolitz@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.