emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] better isearch support for complex input methods


From: Stefan Monnier
Subject: Re: [PATCH] better isearch support for complex input methods
Date: Wed, 25 Apr 2001 08:31:34 -0400

> Andreas Schwab <address@hidden> writes:
> > |> For C-w while searching, I wouldn't mind so much, because there it's
> > |> usually better to grab too little than too much (as you can't easily
> > |> delete small overruns).
> > 
> > Grabbing too much isn't actually so bad, now that we have M-e
> > (isearch-edit-string).
> 
> Well, perhaps, but I don't really think that's a great solution --
> going into edit mode, although it's nice when you need it, really
> interrupts the flow; it's much easier to just hit C-w a bunch of times
> (and DEL to correct).

All we need is to change DEL so that it never deletes more than one char.
I always hated the fact that C-s C-s DEL ends up with an empty search string.
I currently use a simple hack:

(defun my-isearch-delete-char ()
  (interactive)
  (setq isearch-string (substring isearch-string 0 -1))
  (setq isearch-message
        (mapconcat 'isearch-text-char-description isearch-string ""))
  (isearch-update))
(define-key isearch-mode-map "\C-?" 'my-isearch-delete-char)

but the "backtracking" behavior of the current DEL is also desirable.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]