[Top][All Lists]

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

Re: Request for enhancement: Scrolling (etc.) in incremental search.

From: Juri Linkov
Subject: Re: Request for enhancement: Scrolling (etc.) in incremental search.
Date: Mon, 10 Nov 2003 08:49:56 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Alan Mackenzie <address@hidden> writes:
> [A quick reminder of what this is for:  it lets you scroll the window
> during incremental search, so that you can see more of what's around
> point without leaving the search.  I've been using it for months, and
> wouldn't want to be without it now.  :-]

Until you presented this patch, I used a simple C-l keybinding to
isearch-mode-map to recenter.  But your patch is a big improvement
over it.  Thank you!

However, I found one glitch with new code: due to a bug in the display
engine, sometimes point moves to a wrong position after scrolling, and
isearch completely stumbles over.  The following patch fixes this by
setting the point back to its original position.  This patch is also
helpful for scrolling with scroll-preserve-screen-position set to t.

Index: emacs/lisp/isearch.el
RCS file: /cvsroot/emacs/emacs/lisp/isearch.el,v
retrieving revision 1.223
diff -c -r1.223 isearch.el
*** emacs/lisp/isearch.el       1 Nov 2003 17:00:02 -0000       1.223
--- emacs/lisp/isearch.el       10 Nov 2003 05:03:27 -0000
*** 1461,1467 ****
             (command-execute scroll-command)
             (let ((ab-bel (isearch-string-out-of-window isearch-point)))
               (if ab-bel
!                  (isearch-back-into-window (eq ab-bel 'above) isearch-point)))
           (let (window)
--- 1461,1469 ----
             (command-execute scroll-command)
             (let ((ab-bel (isearch-string-out-of-window isearch-point)))
               (if ab-bel
!                  (isearch-back-into-window (eq ab-bel 'above) isearch-point)
!                (or (eq (point) isearch-point)
!                    (goto-char isearch-point))))
           (let (window)


reply via email to

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