From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#5652: 23.1.92; Info-index puts cursor at wrong position Date: Fri, 26 Feb 2010 11:08:27 +0200 Organization: JURTA Message-ID: <871vg89yve.fsf@mail.jurta.org> References: <201002260126.o1Q1Q6uq008127@memory-leak.sm.sony.co.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1267176218 5714 80.91.229.12 (26 Feb 2010 09:23:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 26 Feb 2010 09:23:38 +0000 (UTC) Cc: 5652@debbugs.gnu.org To: enami tsugutomo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 26 10:23:34 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NkwQ1-000363-33 for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Feb 2010 10:23:33 +0100 Original-Received: from localhost ([127.0.0.1]:46949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkwQ0-0004sM-GX for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Feb 2010 04:23:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NkwPv-0004rR-88 for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2010 04:23:27 -0500 Original-Received: from [140.186.70.92] (port=48949 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkwPt-0004r2-VI for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2010 04:23:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NkwPn-0007q6-3L for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2010 04:23:24 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50334) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NkwPm-0007pu-Vx for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2010 04:23:19 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NkwNb-0001xy-CT; Fri, 26 Feb 2010 04:21:03 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Feb 2010 09:21:03 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5652 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5652-submit@debbugs.gnu.org id=B5652.12671760387528 (code B ref 5652); Fri, 26 Feb 2010 09:21:03 +0000 Original-Received: (at 5652) by debbugs.gnu.org; 26 Feb 2010 09:20:38 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NkwNC-0001xL-Bd for submit@debbugs.gnu.org; Fri, 26 Feb 2010 04:20:38 -0500 Original-Received: from smtp-out4.starman.ee ([85.253.0.6] helo=mx2.starman.ee) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NkwMx-0001wk-GC for 5652@debbugs.gnu.org; Fri, 26 Feb 2010 04:20:27 -0500 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Original-Received: from mail.starman.ee (82.131.30.33.cable.starman.ee [82.131.30.33]) by mx2.starman.ee (Postfix) with ESMTP id 636DA3F405B; Fri, 26 Feb 2010 11:20:13 +0200 (EET) In-Reply-To: <201002260126.o1Q1Q6uq008127@memory-leak.sm.sony.co.jp> (enami tsugutomo's message of "Fri, 26 Feb 2010 10:26:06 +0900 (JST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 26 Feb 2010 04:21:03 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35329 Archived-At: > Info-index puts cursor at wrong position. The key sequence in `Recent > input' below is the example when `save-excursion' is searched on emacs > lisp refernec manual. Ideally (and acutually at least emacs 20.7 does) > it puts cursor at the line here: > > -- Special Form: save-excursion body... > > .. but instead it puts 2 lines below. > > I guess Info-index-next should be changed as follows: Thanks for the bug report. I think your patch is not right. When you look at the raw Info file in info/elisp-11, you can see: * save-excursion: Excursions. (line 20) ======== When you turn breadcrumbs off e.g. by (setq Info-breadcrumbs-depth 0), visit (info "(elisp) Excursions") and go to the line 20, you can see that it is the following line: The `save-excursion' special form saves the identity of the current So currently the incorrect offset is not 2 lines, but only 1 line. When you see that the line 20 is "-- Special Form: save-excursion body..." it is only when breadcrumbs insert a line directly to the Info buffer and thus breaks line numbers. We have more troubles with breadcrumbs and hope to fix them by displaying breadcrumbs in the header window. Now it seems the right fix is to just decrement this offset by 1: === modified file 'lisp/info.el' --- lisp/info.el 2010-02-11 20:57:10 +0000 +++ lisp/info.el 2010-02-26 09:07:27 +0000 @@ -3090,7 +3090,7 @@ (defun Info-index-next (num) num (1- num))) (Info-goto-node (nth 1 (car Info-index-alternatives))) (if (> (nth 3 (car Info-index-alternatives)) 0) - (forward-line (1- (nth 3 (car Info-index-alternatives)))) + (forward-line (- (nth 3 (car Info-index-alternatives)) 2)) (forward-line 3) ; don't search in headers (let ((name (car (car Info-index-alternatives)))) (Info-find-index-name name))) BTW, the brz history seems corrupted. Trying to see the reason why this line in `Info-index-next' was changed last time: (forward-line (1- (nth 3 (car Info-index-alternatives)))) I typed `C-x v g' (vc-annotate) in info.el, and it displays: 49780.1.32 henrik. | (forward-line (1- (nth 3 (car Info-index-alternatives)))) Typing `l' on this line displays the *vc-change-log* buffer: ------------------------------------------------------------ revno: 49780.1.32 committer: Henrik Enberg timestamp: Mon 2006-01-16 00:03:54 +0000 message: sync with trunk Does anyone know is it possible to see the original log instead of this merge commit? -- Juri Linkov http://www.jurta.org/emacs/