[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: WoMan chokes on some manpages: Invalid search bound (wrong side of p
From: |
Stefan Monnier |
Subject: |
Re: WoMan chokes on some manpages: Invalid search bound (wrong side of point) |
Date: |
Wed, 08 Aug 2007 15:52:14 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
> On several manpages (one of them is attached) WoMan complains:
> Invalid search bound (wrong side of point) and leaves point at the end
> of the buffer and the buffer status modified and writable. The
> backtrace looks as following:
> Debugger entered--Lisp error: (error "Invalid search bound (wrong side of
> point)")
> re-search-forward("\\([-a-zA-Z0-9_\x8ad+][-a-zA-Z0-9_.:\x8ad+]*\\)[
> ]*(\\([0-9][a-zA-Z0-9+]*\\|[LNln]\\))"
> 8881 t)
Can you confirm that the patch below fixes the problem for you?
I've installed it in the 22 branch,
Stefan
--- man.el 26 jui 2007 14:47:54 -0400 1.169
+++ man.el 08 aoû 2007 15:24:45 -0400
@@ -975,7 +975,7 @@
(Man-next-section 1)
(point)))
(goto-char (point-min))
- (point-max))))
+ nil)))
(while (re-search-forward regexp end t)
(make-text-button
(match-beginning button-pos)
@@ -1291,14 +1291,17 @@
(defun Man-next-section (n)
"Move point to Nth next section (default 1)."
(interactive "p")
- (let ((case-fold-search nil))
+ (let ((case-fold-search nil)
+ (start (point)))
(if (looking-at Man-heading-regexp)
(forward-line 1))
(if (re-search-forward Man-heading-regexp (point-max) t n)
(beginning-of-line)
(goto-char (point-max))
;; The last line doesn't belong to any section.
- (forward-line -1))))
+ (forward-line -1))
+ ;; But don't move back from the starting point.
+ (if (< (point) start) (goto-char start))))
(defun Man-previous-section (n)
"Move point to Nth previous section (default 1)."