all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Isearch halts in commands and macros
@ 2005-10-28 23:43 Aaron S. Hawley
  2005-10-29 20:34 ` Richard M. Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Aaron S. Hawley @ 2005-10-28 23:43 UTC (permalink / raw)


This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.4.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2005-10-02 on trouble, modified by Debian
configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--with-x=yes' '--with-x-toolkit=athena' 'CFLAGS=-DDEBIAN -g -O2' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu''
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Binding a "word Isearch" with `C-s C-w' to a shorter command, like
`C-.', causes Isearch to halt.  The unfortunate halting is not
existent in GNU Emacs 20.5.1.

To reproduce, evaluate the following key binding:

  (global-set-key [?\C-.] "\C-s\C-w")

Compare running `C-s C-w' with `C-.'.  I enjoy incremental search's
highlighting of all the instances of the completed search in the
buffer.  If I wanted to halt an incremental search in a key binding or macro I'd use `RET'.

  (global-set-key [?\C-.] "\C-s\C-w\C-m")

This behavior exists in the development version of Emacs, also.

Thanks for Emacs,
/a


Recent input:
C-x k C-g C-x C-k C-x e C-n C-n C-k C-c C-c C-a C-f 
C-f C-f C-x C-k C-g C-x C-k b C-h f C-g C-h a b i n 
d <return> C-x o C-s m a c C-a C-s m a c r o C-a C-v 
C-v C-x o C-h a b <backspace> m a c r o <return> C-x 
o C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-p C-p C-x o C-x C-k C-x e b C-_ <down-mouse-1> 
<mouse-1> M-x r e p o <tab> r <tab> <return>

Recent messages:
edit-kbd-macro: Key sequence b is not a keyboard macro
setq: Quit
Loading apropos...done
Loading view...done
Type C-x 1 to remove help window.  C-M-v to scroll the help.
Mark saved where search started [2 times]
Formatting keyboard macro...done
Undo!
Making completion list...
Loading emacsbug...done

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Isearch halts in commands and macros
  2005-10-28 23:43 Isearch halts in commands and macros Aaron S. Hawley
@ 2005-10-29 20:34 ` Richard M. Stallman
  2005-10-29 23:19   ` Aaron S. Hawley
  0 siblings, 1 reply; 4+ messages in thread
From: Richard M. Stallman @ 2005-10-29 20:34 UTC (permalink / raw)
  Cc: bug-gnu-emacs

    To reproduce, evaluate the following key binding:

      (global-set-key [?\C-.] "\C-s\C-w")

Don't you mean C-s C-m C-w?

The reason this can't work is that ending the macro
forces exit of the minibuffer that C-s C-m enters.
That is a flaw, but not an easy one to fix.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Isearch halts in commands and macros
  2005-10-29 20:34 ` Richard M. Stallman
@ 2005-10-29 23:19   ` Aaron S. Hawley
  2005-11-01 22:03     ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Aaron S. Hawley @ 2005-10-29 23:19 UTC (permalink / raw)


On Sat, 29 Oct 2005, Richard M. Stallman wrote:

>     To reproduce, evaluate the following key binding:
>
>       (global-set-key [?\C-.] "\C-s\C-w")
>
> Don't you mean C-s C-m C-w?

No, I didn't mean "Word Search", the "special case of nonincremental
search".  I'm sorry about the confusion.  I didn't even know "Word Search"
existed until you mentioned it.  What I meant was searching with Isearch
and grabbing the next word in the buffer with C-w.

> The reason this can't work is that ending the macro
> forces exit of the minibuffer that C-s C-m enters.
> That is a flaw, but not an easy one to fix.

I can imagine.

Only after seeing that a macro with Isearch could work as one would expect
in GNU Emacs 20 did I determine that the behavior was a reasonable
expectation to make of Emacs and therefore worthy of sending a bug report.

I actually don't require this key binding for Isearch in my editing, but
came across it in my missionary work for the Church of Emacs.  I was
trying to help a Vi user port a favored Vi-command into their reborn life
with Emacs.

/a

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Isearch halts in commands and macros
  2005-10-29 23:19   ` Aaron S. Hawley
@ 2005-11-01 22:03     ` Juri Linkov
  0 siblings, 0 replies; 4+ messages in thread
From: Juri Linkov @ 2005-11-01 22:03 UTC (permalink / raw)
  Cc: bug-gnu-emacs

> Only after seeing that a macro with Isearch could work as one would expect
> in GNU Emacs 20 did I determine that the behavior was a reasonable
> expectation to make of Emacs and therefore worthy of sending a bug report.

In Emacs 21 macro termination intentionally causes isearch mode to exit.
You can find in isearch.el the following line that does this:

    (add-hook 'kbd-macro-termination-hook 'isearch-done)

There are other places that check if a keyboard macro is executing,
and don't highlight search strings in this case, etc.

So with the current state, you could write an equivalent Lisp code like:

(defun isearch-current-word ()
  (interactive)
  (isearch-forward nil 1)
  (isearch-yank-word))

(global-set-key [?\C-.] 'isearch-current-word)

-- 
Juri Linkov
http://www.jurta.org/emacs/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-11-01 22:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-28 23:43 Isearch halts in commands and macros Aaron S. Hawley
2005-10-29 20:34 ` Richard M. Stallman
2005-10-29 23:19   ` Aaron S. Hawley
2005-11-01 22:03     ` Juri Linkov

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.