GNU bug report logs -
#864
23.0.60; Info-dir-remove-duplicates fails to remove duplicates
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 864 in the body.
You can then email your comments to 864 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#864
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
"Joshua S." <viking_r <at> george24.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Hi,
I use NTEmacs with Cygwin, and something like this in my ~/.emacs.
(setq Info-directory-list (list (expand-file-name "../info"
data-directory) "c:/cygwin/usr/share/info"))
Then the Info Directory Node lists some duplicated items.
I did bellow patch to fix this. (You know, I am not a good Lisp programmer.)
Index: lisp/info.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/info.el,v
retrieving revision 1.541
diff -u -d -w -r1.541 info.el
--- lisp/info.el 30 Aug 2008 20:16:36 -0000 1.541
+++ lisp/info.el 2 Sep 2008 15:05:54 -0000
@@ -1222,9 +1222,10 @@
;; Fold case straight away; `member-ignore-case' here wasteful.
(let ((x (downcase (match-string 1))))
(if (member x seen)
- (delete-region (match-beginning 0)
+ (progn (delete-region (match-beginning 0)
(progn (re-search-forward "^[^ \t]" nil t)
(match-beginning 0)))
+ (forward-line 0))
(push x seen))))))))))
;; Note that on entry to this function the current-buffer must be the
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#864
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
martin rudalics <rudalics <at> gmx.at>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #10 received at 864 <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
> I did bellow patch to fix this. (You know, I am not a good Lisp
> programmer.)
>
> Index: lisp/info.el
> ===================================================================
> RCS file: /sources/emacs/emacs/lisp/info.el,v
> retrieving revision 1.541
> diff -u -d -w -r1.541 info.el
> --- lisp/info.el 30 Aug 2008 20:16:36 -0000 1.541
> +++ lisp/info.el 2 Sep 2008 15:05:54 -0000
> @@ -1222,9 +1222,10 @@
> ;; Fold case straight away; `member-ignore-case' here wasteful.
> (let ((x (downcase (match-string 1))))
> (if (member x seen)
> - (delete-region (match-beginning 0)
> + (progn (delete-region (match-beginning 0)
> (progn (re-search-forward "^[^ \t]" nil t)
> (match-beginning 0)))
> + (forward-line 0))
> (push x seen))))))))))
>
> ;; Note that on entry to this function the current-buffer must be the
Looks good to me. However, could you try the attached patch instead
which also does away with the quite obscure "limit" thing.
martin
[864.diff (text/plain, inline)]
*** info.el.~1.541.~ 2008-08-31 09:48:43.390625000 +0200
--- info.el 2008-09-03 08:33:07.734375000 +0200
***************
*** 1213,1231 ****
(delete-region (1- (point)) (point))))
;; Now remove duplicate entries under the same heading.
! (let ((seen nil)
! (limit (point-marker)))
! (goto-char start)
! (while (and (> limit (point))
! (re-search-forward "^* \\([^:\n]+:\\(:\\|[^.\n]+\\).\\)"
! limit 'move))
! ;; Fold case straight away; `member-ignore-case' here wasteful.
! (let ((x (downcase (match-string 1))))
! (if (member x seen)
! (delete-region (match-beginning 0)
! (progn (re-search-forward "^[^ \t]" nil t)
! (match-beginning 0)))
! (push x seen))))))))))
;; Note that on entry to this function the current-buffer must be the
;; *info* buffer; not the info tags buffer.
--- 1213,1232 ----
(delete-region (1- (point)) (point))))
;; Now remove duplicate entries under the same heading.
! (let (seen)
! (save-restriction
! (narrow-to-region start (point))
! (goto-char (point-min))
! (while (re-search-forward "^* \\([^:\n]+:\\(:\\|[^.\n]+\\).\\)" nil 'move)
! ;; Fold case straight away; `member-ignore-case' here wasteful.
! (let ((x (downcase (match-string 1))))
! (if (member x seen)
! (delete-region
! (match-beginning 0)
! (if (re-search-forward "^[^ \t]" nil 'move)
! (goto-char (match-beginning 0))
! (point-max)))
! (push x seen)))))))))))
;; Note that on entry to this function the current-buffer must be the
;; *info* buffer; not the info tags buffer.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#864
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
"Joshua S." <viking_r <at> george24.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #15 received at 864 <at> emacsbugs.donarmstrong.com (full text, mbox):
martin rudalics wrote:
> Looks good to me. However, could you try the attached patch instead
> which also does away with the quite obscure "limit" thing.
>
Looks better to me. Thanks.
//
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#864
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
martin rudalics <rudalics <at> gmx.at>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #20 received at 864 <at> emacsbugs.donarmstrong.com (full text, mbox):
> Looks better to me. Thanks.
I checked that in. Please watch out for any anomalies.
Thanks, martin.
Reply sent to
martin rudalics <rudalics <at> gmx.at>
:
You have taken responsibility.
Full text and
rfc822 format available.
Notification sent to
"Joshua S." <viking_r <at> george24.com>
:
bug acknowledged by developer.
Full text and
rfc822 format available.
Message #25 received at 864-done <at> emacsbugs.donarmstrong.com (full text, mbox):
Fixed as
2008-09-04 Martin Rudalics <rudalics <at> gmx.at>
* info.el (Info-dir-remove-duplicates): Narrow buffer when
removing duplicate entries under same heading. Don't skip char
matching anything but a space or tab at bol. (Bug#864)
Thanks
bug archived.
Request was from
Debbugs Internal Request <don <at> donarmstrong.com>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Sun, 05 Oct 2008 14:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 16 years and 256 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.