unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#47394: 27.2; admin.el:make-manuals infloops on HTML manuals
@ 2021-03-25 17:56 Eli Zaretskii
  2021-03-25 18:31 ` Glenn Morris
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2021-03-25 17:56 UTC (permalink / raw)
  To: 47394

The script admin/make-manuals never finishes, when invoked on HTML
manuals produced by Texinfo 6.7 (and possibly some older versions).

This happens because 'make-manuals' from admin.el infloops in the
function 'manual-html-fix-index-2' when processing the index.html for
the Emacs user manual.  The loop is in this fragment:

	(while (not done)
	  (cond ((re-search-forward "<tr><td.*&bull; \\(<a.*</a>\\)\
:</td><td>&nbsp;&nbsp;</td><td[^>]*>\\(.*\\)" (line-end-position) t)
		 (replace-match (format "<tr><td%s>\\1</td>\n<td>\\2"
					(if table-workaround
					    " bgcolor=\"white\"" "")))
		 (search-forward "</td></tr>")
		 (forward-line 1))
		((looking-at "<tr><th.*<pre class=\"menu-comment\">\n")
		 (replace-match "<tr><th colspan=\"2\" align=\"left\" \
style=\"text-align:left\">")
		 (search-forward "</pre></th></tr>")
		 (replace-match "</th></tr>\n"))
		;; Not all manuals have the detailed menu.
		;; If it is there, split it into a separate table.
		((re-search-forward "<tr>.*The Detailed Node Listing *"
				    (line-end-position) t)
		 (setq opoint (match-beginning 0))
		 (while (and (looking-at " *&mdash;")
			     (zerop (forward-line 1))))
		 (delete-region opoint (point))
		 (insert "</table>\n\n\
<h2>Detailed Node Listing</h2>\n\n<p>")
		 ;; FIXME Fragile!
		 ;; The Emacs and Elisp manual have some text at the
		 ;; start of the detailed menu that is not part of the menu.
		 ;; Other manuals do not.
		 (if (re-search-forward "in one step:" (line-end-position 3) t)
		     (forward-line 1))
		 (insert "</p>\n")
		 (search-forward "</pre></th></tr>")
		 (delete-region (match-beginning 0) (match-end 0))
		 (forward-line -1)
		 (or (looking-at "^$") (error "Parse error 1"))
		 (forward-line -1)
		 (if (looking-at "^$") (error "Parse error 2"))
		 (forward-line -1)
		 (or (looking-at "^$") (error "Parse error 3"))
		 (forward-line 1)
		 (insert "<table class=\"menu\" style=\"float:left\" width=\"100%\">\n\
<tr><th colspan=\"2\" align=\"left\" style=\"text-align:left\">\n")
		 (forward-line 1)
		 (insert "</th></tr>")
		 (forward-line 1))
		((looking-at ".*</table")
		 (forward-line 1)
		 (setq done t)))))

It loops because none of the branches of 'cond' inside the 'while'
loop matches the text, and so point doesn't move.

This currently precludes updating the HTML docs on the GNU Web site,
unless the HTML files were produced by Texinfo 5 or older.


In GNU Emacs 27.2 (build 2, i686-pc-mingw32)
 of 2021-03-25 built on HOME-C4E4A596F7
Windowing system distributor 'Microsoft Corp.', version 5.1.2600
System Description: Microsoft Windows XP Service Pack 3 (v5.1.0.2600)

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure -C --prefix=/d/usr --with-wide-int 'CFLAGS=-O2 -gdwarf-4
 -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2
HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER LCMS2 GMP

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1255

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads w32notify w32 lcms2 multi-tty make-network-process
emacs)

Memory information:
((conses 16 50555 10281)
 (symbols 48 7168 1)
 (strings 16 18840 2076)
 (string-bytes 1 533230)
 (vectors 16 9541)
 (vector-slots 8 127997 8538)
 (floats 8 21 265)
 (intervals 40 255 98)
 (buffers 888 11))





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

* bug#47394: 27.2; admin.el:make-manuals infloops on HTML manuals
  2021-03-25 17:56 bug#47394: 27.2; admin.el:make-manuals infloops on HTML manuals Eli Zaretskii
@ 2021-03-25 18:31 ` Glenn Morris
  2021-03-25 19:17   ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Glenn Morris @ 2021-03-25 18:31 UTC (permalink / raw)
  To: 47394-done

Version: 27.3

This turned out to be trivial.
(I leave it to others to verify the results look correct.)

commit 0d7e2a993e

    admin.el fix for bug#47394
    
    * admin/admin.el (manual-html-fix-index-2): Handle Texinfo 6.7.

diff --git a/admin/admin.el b/admin/admin.el
index fa96b7e5ca..9be6f4a607 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -545,7 +545,7 @@ Leave point after the table."
 	(forward-line 1)
 	(while (not done)
 	  (cond ((re-search-forward "<tr><td.*&bull; \\(<a.*</a>\\)\
-:</td><td>&nbsp;&nbsp;</td><td[^>]*>\\(.*\\)" (line-end-position) t)
+:?</td><td>&nbsp;&nbsp;</td><td[^>]*>\\(.*\\)" (line-end-position) t)
 		 (replace-match (format "<tr><td%s>\\1</td>\n<td>\\2"
 					(if table-workaround
 					    " bgcolor=\"white\"" "")))





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

* bug#47394: 27.2; admin.el:make-manuals infloops on HTML manuals
  2021-03-25 18:31 ` Glenn Morris
@ 2021-03-25 19:17   ` Eli Zaretskii
  2021-03-25 19:24     ` Eli Zaretskii
  2021-03-25 19:47     ` Glenn Morris
  0 siblings, 2 replies; 9+ messages in thread
From: Eli Zaretskii @ 2021-03-25 19:17 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 47394

> From: Glenn Morris <rgm@gnu.org>
> Date: Thu, 25 Mar 2021 14:31:00 -0400
> 
> Version: 27.3
> 
> This turned out to be trivial.
> (I leave it to others to verify the results look correct.)
> 
> commit 0d7e2a993e
> 
>     admin.el fix for bug#47394
>     
>     * admin/admin.el (manual-html-fix-index-2): Handle Texinfo 6.7.

Thanks.  I've run the updated script, it goes much further, but
eventually dies with

  ...
  Saving file /home/e/eliz/git/emacs/pretest/manual/html_mono/eintr.html...
  Wrote /home/e/eliz/git/emacs/pretest/manual/html_mono/eintr.html
  Removing old name: no such file or directory, /home/e/eliz/git/emacs/pretest/manual/ps/eintr.dvi
  make-manuals: error running make-manuals

What does it mean? that TeX barfed producing eintr.dvi?  There's no
other error message or diagnostics anywhere in sight.





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

* bug#47394: 27.2; admin.el:make-manuals infloops on HTML manuals
  2021-03-25 19:17   ` Eli Zaretskii
@ 2021-03-25 19:24     ` Eli Zaretskii
  2021-03-25 19:49       ` Glenn Morris
  2021-03-25 19:47     ` Glenn Morris
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2021-03-25 19:24 UTC (permalink / raw)
  To: rgm; +Cc: 47394

> Date: Thu, 25 Mar 2021 21:17:57 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 47394@debbugs.gnu.org
> 
> Thanks.  I've run the updated script, it goes much further, but
> eventually dies with

Btw, FTR: it took the script about 30 min to get to that point, and
99% of the time isn't taken by makeinfo, but by Emacs massaging the
HTML files.  So if it takes just 90 sec on Glenn's machine, I guess
that machine must be much faster than fencepost.gnu.org, where I ran
it.





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

* bug#47394: 27.2; admin.el:make-manuals infloops on HTML manuals
  2021-03-25 19:17   ` Eli Zaretskii
  2021-03-25 19:24     ` Eli Zaretskii
@ 2021-03-25 19:47     ` Glenn Morris
  2021-03-25 20:17       ` Eli Zaretskii
  1 sibling, 1 reply; 9+ messages in thread
From: Glenn Morris @ 2021-03-25 19:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 47394

Eli Zaretskii wrote:

>   Removing old name: no such file or directory,
> /home/e/eliz/git/emacs/pretest/manual/ps/eintr.dvi
>   make-manuals: error running make-manuals
>
> What does it mean? that TeX barfed producing eintr.dvi?

Probably. Indeed this fails on fencepost:

texi2dvi -I ../emacs -I ../misc emacs-lisp-intro.texi -o eintr.dvi

(Works on my system.)





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

* bug#47394: 27.2; admin.el:make-manuals infloops on HTML manuals
  2021-03-25 19:24     ` Eli Zaretskii
@ 2021-03-25 19:49       ` Glenn Morris
  0 siblings, 0 replies; 9+ messages in thread
From: Glenn Morris @ 2021-03-25 19:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 47394

Eli Zaretskii wrote:

> Btw, FTR: it took the script about 30 min to get to that point, and
> 99% of the time isn't taken by makeinfo, but by Emacs massaging the
> HTML files.  So if it takes just 90 sec on Glenn's machine, I guess
> that machine must be much faster than fencepost.gnu.org, where I ran it.

FTR, it was 90 seconds for me with makeinfo 4.13.
It is 200 seconds with makeinfo 6.7.
This is on a three-year old laptop.





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

* bug#47394: 27.2; admin.el:make-manuals infloops on HTML manuals
  2021-03-25 19:47     ` Glenn Morris
@ 2021-03-25 20:17       ` Eli Zaretskii
  2021-03-25 20:44         ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2021-03-25 20:17 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 47394

> From: Glenn Morris <rgm@gnu.org>
> Cc: 47394@debbugs.gnu.org
> Date: Thu, 25 Mar 2021 15:47:27 -0400
> 
> Eli Zaretskii wrote:
> 
> >   Removing old name: no such file or directory,
> > /home/e/eliz/git/emacs/pretest/manual/ps/eintr.dvi
> >   make-manuals: error running make-manuals
> >
> > What does it mean? that TeX barfed producing eintr.dvi?
> 
> Probably. Indeed this fails on fencepost:
> 
> texi2dvi -I ../emacs -I ../misc emacs-lisp-intro.texi -o eintr.dvi

  Output written on emacs-lisp-intro.dvi (272 pages, 986064 bytes).
  Transcript written on emacs-lisp-intro.log.
  /home/e/eliz/bin/texi2dvi: etex exited with bad status, quitting. <<<<<<<<<

Does anyone have any idea what causes this?  The only messages that
could mean trouble are:

  ./emacs-lisp-intro.texi:9527: epsf.tex not found, images will be ignored.
  @image ...f.tex not found, images will be ignored}
						    @global @warnednoepsftrue ...
  <argument> @hfil @ignorespaces @image {cons-1}
						@unskip @hfil
  @centersub ...enalty @fi @line {@kern @leftskip #1
						    @kern @rightskip }
  @\center ...{@hfil @ignorespaces #1@unskip @hfil }
						    @let @centersub @relax
  l.9527 @center @image{cons-1}

Is that the reason? that epsf.tex is missing?







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

* bug#47394: 27.2; admin.el:make-manuals infloops on HTML manuals
  2021-03-25 20:17       ` Eli Zaretskii
@ 2021-03-25 20:44         ` Eli Zaretskii
  2021-03-26  6:31           ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2021-03-25 20:44 UTC (permalink / raw)
  To: rgm; +Cc: 47394

> Date: Thu, 25 Mar 2021 22:17:22 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 47394@debbugs.gnu.org
> 
>   ./emacs-lisp-intro.texi:9527: epsf.tex not found, images will be ignored.
>   @image ...f.tex not found, images will be ignored}
> 						    @global @warnednoepsftrue ...
>   <argument> @hfil @ignorespaces @image {cons-1}
> 						@unskip @hfil
>   @centersub ...enalty @fi @line {@kern @leftskip #1
> 						    @kern @rightskip }
>   @\center ...{@hfil @ignorespaces #1@unskip @hfil }
> 						    @let @centersub @relax
>   l.9527 @center @image{cons-1}
> 
> Is that the reason? that epsf.tex is missing?

Seems like that.  TeX should be told where to find that file, and then
producing eintr.dvi works.





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

* bug#47394: 27.2; admin.el:make-manuals infloops on HTML manuals
  2021-03-25 20:44         ` Eli Zaretskii
@ 2021-03-26  6:31           ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2021-03-26  6:31 UTC (permalink / raw)
  To: rgm; +Cc: 47394

> Date: Thu, 25 Mar 2021 22:44:42 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 47394@debbugs.gnu.org
> 
> > Is that the reason? that epsf.tex is missing?
> 
> Seems like that.  TeX should be told where to find that file, and then
> producing eintr.dvi works.

OK, I've now regenerated the HTML and other formats using Texinfo 6.7,
and updated the Web site.  Thanks for your help.





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

end of thread, other threads:[~2021-03-26  6:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-25 17:56 bug#47394: 27.2; admin.el:make-manuals infloops on HTML manuals Eli Zaretskii
2021-03-25 18:31 ` Glenn Morris
2021-03-25 19:17   ` Eli Zaretskii
2021-03-25 19:24     ` Eli Zaretskii
2021-03-25 19:49       ` Glenn Morris
2021-03-25 19:47     ` Glenn Morris
2021-03-25 20:17       ` Eli Zaretskii
2021-03-25 20:44         ` Eli Zaretskii
2021-03-26  6:31           ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).