all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#864: 23.0.60; Info-dir-remove-duplicates fails to remove duplicates
@ 2008-09-02 15:26 ` Joshua S.
  2008-09-03  6:43   ` martin rudalics
  2008-09-07 10:30   ` bug#864: marked as done (23.0.60; Info-dir-remove-duplicates fails to remove duplicates) Emacs bug Tracking System
  0 siblings, 2 replies; 5+ messages in thread
From: Joshua S. @ 2008-09-02 15:26 UTC (permalink / raw)
  To: emacs-pretest-bug

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









^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#864: 23.0.60; Info-dir-remove-duplicates fails to remove duplicates
  2008-09-02 15:26 ` bug#864: 23.0.60; Info-dir-remove-duplicates fails to remove duplicates Joshua S.
@ 2008-09-03  6:43   ` martin rudalics
  2008-09-03 10:14     ` Joshua S.
  2008-09-07 10:30   ` bug#864: marked as done (23.0.60; Info-dir-remove-duplicates fails to remove duplicates) Emacs bug Tracking System
  1 sibling, 1 reply; 5+ messages in thread
From: martin rudalics @ 2008-09-03  6:43 UTC (permalink / raw)
  To: Joshua S., 864

[-- Attachment #1: Type: text/plain, Size: 1115 bytes --]

 > 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

[-- Attachment #2: 864.diff --]
[-- Type: text/plain, Size: 1666 bytes --]

*** 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#864: 23.0.60; Info-dir-remove-duplicates fails to remove duplicates
  2008-09-03  6:43   ` martin rudalics
@ 2008-09-03 10:14     ` Joshua S.
  2008-09-04  8:18       ` martin rudalics
  0 siblings, 1 reply; 5+ messages in thread
From: Joshua S. @ 2008-09-03 10:14 UTC (permalink / raw)
  To: 864

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.
//








^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#864: 23.0.60; Info-dir-remove-duplicates fails to remove duplicates
  2008-09-03 10:14     ` Joshua S.
@ 2008-09-04  8:18       ` martin rudalics
  0 siblings, 0 replies; 5+ messages in thread
From: martin rudalics @ 2008-09-04  8:18 UTC (permalink / raw)
  To: Joshua S., 864

> Looks better to me. Thanks.

I checked that in.  Please watch out for any anomalies.

Thanks, martin.







^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#864: marked as done (23.0.60; Info-dir-remove-duplicates  fails to remove duplicates)
  2008-09-02 15:26 ` bug#864: 23.0.60; Info-dir-remove-duplicates fails to remove duplicates Joshua S.
  2008-09-03  6:43   ` martin rudalics
@ 2008-09-07 10:30   ` Emacs bug Tracking System
  1 sibling, 0 replies; 5+ messages in thread
From: Emacs bug Tracking System @ 2008-09-07 10:30 UTC (permalink / raw)
  To: martin rudalics

[-- Attachment #1: Type: text/plain, Size: 889 bytes --]


Your message dated Sun, 07 Sep 2008 12:05:31 +0200
with message-id <48C3A76B.1020604@gmx.at>
and subject line Re: bug#864: 23.0.60;	Info-dir-remove-duplicates fails to remove duplicates
has caused the Emacs bug report #864,
regarding 23.0.60; Info-dir-remove-duplicates fails to remove duplicates
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)


-- 
864: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=864
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 3716 bytes --]

From: "Joshua S." <viking_r@george24.com>
To: emacs-pretest-bug@gnu.org
Subject: 23.0.60; Info-dir-remove-duplicates fails to remove duplicates
Date: Wed, 03 Sep 2008 00:26:19 +0900
Message-ID: <48BD5B1B.3020409@george24.com>

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






[-- Attachment #3: Type: message/rfc822, Size: 1591 bytes --]

From: martin rudalics <rudalics@gmx.at>
To: 864-done@emacsbugs.donarmstrong.com
Cc: "Joshua S." <viking_r@george24.com>
Subject: Re: bug#864: 23.0.60;	Info-dir-remove-duplicates fails to remove duplicates
Date: Sun, 07 Sep 2008 12:05:31 +0200
Message-ID: <48C3A76B.1020604@gmx.at>

Fixed as

2008-09-04  Martin Rudalics  <rudalics@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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-09-07 10:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <48C3A76B.1020604@gmx.at>
2008-09-02 15:26 ` bug#864: 23.0.60; Info-dir-remove-duplicates fails to remove duplicates Joshua S.
2008-09-03  6:43   ` martin rudalics
2008-09-03 10:14     ` Joshua S.
2008-09-04  8:18       ` martin rudalics
2008-09-07 10:30   ` bug#864: marked as done (23.0.60; Info-dir-remove-duplicates fails to remove duplicates) Emacs bug Tracking System

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.