emacs-devel
[Top][All Lists]
Advanced

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

RE: Should ending successful Isearch with C-g restore the relative windo


From: Drew Adams
Subject: RE: Should ending successful Isearch with C-g restore the relative window position?
Date: Tue, 15 Jan 2013 14:04:53 -0800

> > Thanks for the explanation.  So it sounds like this is not 
> > an enhancement we can expect anytime soon.
> 
> Depends on the availability of motivated volunteers ;-)

Well I'm certainly no expert here.  And I believe you when you say that it will
be difficult to fix this adequately.

I took a quick stab at it anyway.  Please try the attached patch, as a first
attempt.  It does not provide for the new behavior to be optional - dunno
whether that is needed.

I did not check the many possible Isearch code paths and use cases.  I just
checked it quickly.  So far, it seems to DTRT for the few things I tried.

If this happens to actually be TRT, great.  But the change I made is trivial, so
I assume there must be more to it, to DTRT in all cases.

I hope that passing this along might allow someone to enlighten me further or
perhaps encourage someone to provide a more complete solution.

All I did was this:

1. Save the relative window line number of point, before searching, in
`isearch-mode'.

2. Restore that, in `isearch-cancel'.

HTH.

Attachment: isearch-2013-01-15.patch
Description: Binary data


reply via email to

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