From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#12253: Restore window start position Date: Fri, 18 Jan 2013 14:42:22 -0800 Message-ID: References: <878vd7vqji.fsf@mail.jurta.org><50348568.5060401@gmx.at><87haru8rxr.fsf@mail.jurta.org><5035EE75.9090809@gmx.at><877gsp9sl2.fsf@mail.jurta.org><50374D30.7090401@gmx.at><8762874wyk.fsf@mail.jurta.org><5038D5CA.5000502@gmx.at> <87r4qun7u1.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_00C1_01CDF58A.071E7160" X-Trace: ger.gmane.org 1358548998 23599 80.91.229.3 (18 Jan 2013 22:43:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Jan 2013 22:43:18 +0000 (UTC) Cc: 12253@debbugs.gnu.org To: "'Juri Linkov'" , "'martin rudalics'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 18 23:43:36 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TwKes-0004YT-Kc for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Jan 2013 23:43:34 +0100 Original-Received: from localhost ([::1]:42215 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwKeb-0005kT-VL for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Jan 2013 17:43:17 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwKeZ-0005kN-9L for bug-gnu-emacs@gnu.org; Fri, 18 Jan 2013 17:43:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TwKeY-0001xO-5K for bug-gnu-emacs@gnu.org; Fri, 18 Jan 2013 17:43:15 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwKeY-0001xI-1s for bug-gnu-emacs@gnu.org; Fri, 18 Jan 2013 17:43:14 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TwKfK-0000VQ-6Y for bug-gnu-emacs@gnu.org; Fri, 18 Jan 2013 17:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Jan 2013 22:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12253 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12253-submit@debbugs.gnu.org id=B12253.13585490011882 (code B ref 12253); Fri, 18 Jan 2013 22:44:02 +0000 Original-Received: (at 12253) by debbugs.gnu.org; 18 Jan 2013 22:43:21 +0000 Original-Received: from localhost ([127.0.0.1]:39206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwKee-0000UI-R0 for submit@debbugs.gnu.org; Fri, 18 Jan 2013 17:43:21 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:17594) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwKec-0000UB-FU for 12253@debbugs.gnu.org; Fri, 18 Jan 2013 17:43:19 -0500 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id r0IMgRPg001533 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 18 Jan 2013 22:42:28 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r0IMgRAA019987 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Jan 2013 22:42:27 GMT Original-Received: from abhmt116.oracle.com (abhmt116.oracle.com [141.146.116.68]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id r0IMgQI0028832; Fri, 18 Jan 2013 16:42:26 -0600 Original-Received: from dradamslap1 (/10.159.184.17) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 18 Jan 2013 14:42:26 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac2C+0nK9NpFW8R+Ts2vfezQ83sDyRxDxSgwAHCRyOA= X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:70003 Archived-At: This is a multi-part message in MIME format. ------=_NextPart_000_00C1_01CDF58A.071E7160 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit > The attached patch seems to fix the Isearch problem > generally, restoring the > original position of point within the window. Oops. I sent the wrong patch somehow, as should have been obvious if anyone looked at it. Here is the correct patch, which fixes this Isearch problem. ------=_NextPart_000_00C1_01CDF58A.071E7160 Content-Type: application/octet-stream; name="isearch-2013-01-16.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="isearch-2013-01-16.patch" diff -c isearch.el isearch-patched-2013-01-16.el=0A= *** isearch.el Wed Jan 16 08:49:58 2013=0A= --- isearch-patched-2013-01-16.el Wed Jan 16 08:51:10 2013=0A= ***************=0A= *** 605,610 ****=0A= --- 605,612 ----=0A= (defvar isearch-opoint 0)=0A= ;; The window configuration active at the beginning of the search.=0A= (defvar isearch-window-configuration nil)=0A= + ;; The line number of point before searching, relative to the line = number of `window-start'.=0A= + (defvar isearch-win-pt-line nil)=0A= =0A= ;; Flag to indicate a yank occurred, so don't move the cursor.=0A= (defvar isearch-yank-flag nil)=0A= ***************=0A= *** 827,832 ****=0A= --- 829,836 ----=0A= isearch-start-hscroll (window-hscroll)=0A= =0A= isearch-opoint (point)=0A= + isearch-win-pt-line (- (line-number-at-pos)=0A= + (line-number-at-pos (window-start)))=0A= search-ring-yank-pointer nil=0A= isearch-opened-overlays nil=0A= isearch-input-method-function input-method-function=0A= ***************=0A= *** 1307,1314 ****=0A= ;; For defined push-state function, restore the first state.=0A= ;; This calls pop-state function and restores original point.=0A= (let ((isearch-cmds (last isearch-cmds)))=0A= ! (isearch--set-state (car isearch-cmds)))=0A= ! (goto-char isearch-opoint))=0A= (isearch-done t) ; Exit isearch..=0A= (isearch-clean-overlays)=0A= (signal 'quit nil)) ; ..and pass on quit signal.=0A= --- 1311,1320 ----=0A= ;; For defined push-state function, restore the first state.=0A= ;; This calls pop-state function and restores original point.=0A= (let ((isearch-cmds (last isearch-cmds)))=0A= ! (isearch--set-state (car isearch-cmds))=0A= ! (when isearch-win-pt-line (recenter isearch-win-pt-line)))=0A= ! (goto-char isearch-opoint)=0A= ! (when isearch-win-pt-line (recenter isearch-win-pt-line)))=0A= (isearch-done t) ; Exit isearch..=0A= (isearch-clean-overlays)=0A= (signal 'quit nil)) ; ..and pass on quit signal.=0A= =0A= Diff finished. Wed Jan 16 15:52:01 2013=0A= ------=_NextPart_000_00C1_01CDF58A.071E7160--