[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5652: 23.1.92; Info-index puts cursor at wrong position
From: |
Juri Linkov |
Subject: |
bug#5652: 23.1.92; Info-index puts cursor at wrong position |
Date: |
Fri, 26 Feb 2010 11:08:27 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (x86_64-pc-linux-gnu) |
> 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 <henrik.enberg@telia.com>
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/