6

Emacs macros playback everything the user enters over the course of the macro, unless they escape the macro. The way to escape a macro in progress is with C-x q kbd-macro-query. Specifically I believe you need to enter recursive edit, which can prompt for a command in minibuffer before continuing the macro. I think you want to define your query-replace ...


5

Many interactive commands read minibuffer input. find-file is one such command. Reading minibuffer input "activates" the minibuffer window, which is why you can switch to it with the other-window command. Interactive isearch is special because it's implemented as a minor mode. It doesn't technically read your search string from the minibuffer, but ...


4

In your mode line, [...] suggests you have an existing backtrace is running, you need to quit this one in order to trigger a new backtrace, you can do this by C-x b *Backtrace* and q. If there is something in the mode line you don't understand, you can use mouse hover to see the tooltip. For example, if you hover [ or ], it will say something like "...


3

This doesn't seem like a great fit for a keyboard macro, since you want to ask for user input. Presumably you are wanting to record a macro because this is a query-replace that you intend to do frequently. If you can't make the keyboard macro do what you are after, you could create a keybinding to your specific call to query-replace as follows: (global-set-...


2

The Emacs manual node Recursive Edit explains the phenomenon. In a way it's like having another editing session (typically temporarily), with the same buffers etc. available (for the most part). That node of the manual gives one example of how or why you might use it: you can use C-r to pause aquery-replace, then make some editing changes or search around a ...


2

I don't think there's a "clean command" that will tell you that directly. But M-x debug RET will give you the current backtrace, where you should be able to find both recursive-edit and its predecessor (i.e. caller).


2

The below snippet [Source] aborts recursive edit when focus moves away from the minibuffer. This is to avoid the irritating occassions where repeated C-g pressing doesn't edit the mini-buffer as cursor focus has moved out of it. (defun stop-using-minibuffer ()   "kill the minibuffer"   (when (and (>= (recursion-depth) 1) (active-minibuffer-window))     (...


1

Drew has already commented on this, but... isearch1 doesn't actually use the minibuffer, which probably accounts for part of your confusion. It displays things in the echo area (which is in the same window as the minibuffer, but isn't actually the minibuffer). That being the case, the notion of switching to and from the minibuffer while running an isearch ...


Only top voted, non community-wiki answers of a minimum length are eligible