unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Cannot generate web manuals
@ 2013-12-29  4:04 Xue Fuqiao
  2013-12-29  5:53 ` Thien-Thi Nguyen
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Xue Fuqiao @ 2013-12-29  4:04 UTC (permalink / raw)
  To: emacs-devel

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

I was trying to generate the web manuals for the Emacs webpage locally
with `make-manuals' in admin/admin.el, but met an error.  I've attached
the backtrace.

I invoked this command without using prefix argument (which means to
generate all kinds of manuals: HTML, PDF, and PostScript).  The error
occurred when generating the "emacs-node" manual (which is the first
step).  The bug is in `manual-html-fix-headers': Emacs can't find "<meta
http-equiv=\"Content-Style".  I've also attached a sample HTML file
(Abbrevs.html), generated by Texinfo 5.1 and Emacs trunk revision
115779.  Maybe we should wrap it with something like
`with-demoted-errors', or remove the erroneous `search-forward' line in
`manual-html-fix-headers'.  Should I file a bug report?

BTW perhaps we should use something like `make-progress-reporter' to
report the progress of this function, since it'll take a long time.

I'll also start to work on generating PDF and PostScript versions of
doc/misc manuals as requested by Jambunathan K[fn:1] later.

I also have a question here: `manual-html-mono' does not generate the
manual for lispref.  How was
http://www.gnu.org/software/emacs/manual/html_mono/elisp.html generated?

Footnotes:

[fn:1] http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00000.html

-- 
http://www.gnu.org/software/emacs/

[-- Attachment #2: backtrace.txt --]
[-- Type: text/plain, Size: 7908 bytes --]

Debugger entered--Lisp error: (search-failed "<meta http-equiv=\"Content-Style")
  search-forward("<meta http-equiv=\"Content-Style")
  (let (opoint) (insert manual-doctype-string) (search-forward "<head>\n") (insert manual-meta-string) (search-forward "<meta") (setq opoint (match-beginning 0)) (re-search-forward "<!--") (goto-char (match-beginning 0)) (delete-region opoint (point)) (insert manual-style-string) (search-forward "<meta http-equiv=\"Content-Style") (setq opoint (match-beginning 0)) (search-forward "</head>") (delete-region opoint (match-beginning 0)))
  manual-html-fix-headers()
  (if (looking-at "<meta http-equiv") (set-buffer-modified-p nil) (manual-html-fix-headers) (if (equal f "index.html") (let (copyright-text) (manual-html-fix-index-1) (if (re-search-forward "[ 	]*<p>Copyright &copy;" nil t) (progn (setq opoint (match-beginning 0)) (re-search-forward "</blockquote>") (setq copyright-text (buffer-substring opoint (point))) (delete-region opoint (point)))) (manual-html-fix-index-2) (if copyright-text (insert copyright-text)) (insert "\n</div>\n")) (manual-html-fix-node-div)) (save-buffer))
  (progn (insert-file-contents (expand-file-name f dir)) (setq buffer-file-name (expand-file-name f dir)) (if (looking-at "<meta http-equiv") (set-buffer-modified-p nil) (manual-html-fix-headers) (if (equal f "index.html") (let (copyright-text) (manual-html-fix-index-1) (if (re-search-forward "[ 	]*<p>Copyright &copy;" nil t) (progn (setq opoint (match-beginning 0)) (re-search-forward "</blockquote>") (setq copyright-text (buffer-substring opoint ...)) (delete-region opoint (point)))) (manual-html-fix-index-2) (if copyright-text (insert copyright-text)) (insert "\n</div>\n")) (manual-html-fix-node-div)) (save-buffer)))
  (unwind-protect (progn (insert-file-contents (expand-file-name f dir)) (setq buffer-file-name (expand-file-name f dir)) (if (looking-at "<meta http-equiv") (set-buffer-modified-p nil) (manual-html-fix-headers) (if (equal f "index.html") (let (copyright-text) (manual-html-fix-index-1) (if (re-search-forward "[ 	]*<p>Copyright &copy;" nil t) (progn (setq opoint ...) (re-search-forward "</blockquote>") (setq copyright-text ...) (delete-region opoint ...))) (manual-html-fix-index-2) (if copyright-text (insert copyright-text)) (insert "\n</div>\n")) (manual-html-fix-node-div)) (save-buffer))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents (expand-file-name f dir)) (setq buffer-file-name (expand-file-name f dir)) (if (looking-at "<meta http-equiv") (set-buffer-modified-p nil) (manual-html-fix-headers) (if (equal f "index.html") (let (copyright-text) (manual-html-fix-index-1) (if (re-search-forward "[ 	]*<p>Copyright &copy;" nil t) (progn ... ... ... ...)) (manual-html-fix-index-2) (if copyright-text (insert copyright-text)) (insert "\n</div>\n")) (manual-html-fix-node-div)) (save-buffer))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
  (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents (expand-file-name f dir)) (setq buffer-file-name (expand-file-name f dir)) (if (looking-at "<meta http-equiv") (set-buffer-modified-p nil) (manual-html-fix-headers) (if (equal f "index.html") (let (copyright-text) (manual-html-fix-index-1) (if ... ...) (manual-html-fix-index-2) (if copyright-text ...) (insert "\n</div>\n")) (manual-html-fix-node-div)) (save-buffer))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
  (let (opoint) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents (expand-file-name f dir)) (setq buffer-file-name (expand-file-name f dir)) (if (looking-at "<meta http-equiv") (set-buffer-modified-p nil) (manual-html-fix-headers) (if (equal f "index.html") (let ... ... ... ... ... ...) (manual-html-fix-node-div)) (save-buffer))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))
  (while --dolist-tail-- (setq f (car --dolist-tail--)) (let (opoint) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents (expand-file-name f dir)) (setq buffer-file-name (expand-file-name f dir)) (if (looking-at "<meta http-equiv") (set-buffer-modified-p nil) (manual-html-fix-headers) (if ... ... ...) (save-buffer))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (setq --dolist-tail-- (cdr --dolist-tail--)))
  (let ((--dolist-tail-- (directory-files dir nil "\\.html\\'")) f) (while --dolist-tail-- (setq f (car --dolist-tail--)) (let (opoint) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents ...) (setq buffer-file-name ...) (if ... ... ... ... ...)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (setq --dolist-tail-- (cdr --dolist-tail--))))
  manual-html-node("/home/xfq/emacs-repo/main/test/doc/emacs/emacs.texi" "/home/xfq/emacs-repo/main/test/manual/html_node/emacs")
  (if (member type (quote (nil "emacs" "emacs-node"))) (manual-html-node emacs (expand-file-name "emacs" html-node-dir)))
  (let* ((dest (expand-file-name "manual" root)) (html-node-dir (expand-file-name "html_node" dest)) (html-mono-dir (expand-file-name "html_mono" dest)) (ps-dir (expand-file-name "ps" dest)) (pdf-dir (expand-file-name "pdf" dest)) (emacs (expand-file-name "doc/emacs/emacs.texi" root)) (elisp (expand-file-name "doc/lispref/elisp.texi" root)) (eintr (expand-file-name "doc/lispintro/emacs-lisp-intro.texi" root)) (misc (manual-misc-manuals root))) (if (file-directory-p dest) (progn (if (y-or-n-p (format "Directory %s exists, delete it first? " dest)) (delete-directory dest t) (user-error "Aborted")))) (if (member type (quote (nil "emacs" "emacs-node"))) (manual-html-node emacs (expand-file-name "emacs" html-node-dir))) (if (member type (quote (nil "emacs" "emacs-mono"))) (manual-html-mono emacs (expand-file-name "emacs.html" html-mono-dir))) (if (member type (quote (nil "emacs" "emacs-pdf" "pdf"))) (manual-pdf emacs (expand-file-name "emacs.pdf" pdf-dir))) (if (member type (quote (nil "emacs" "emacs-ps" "ps"))) (manual-ps emacs (expand-file-name "emacs.ps" ps-dir))) (if (member type (quote (nil "elisp" "elisp-node"))) (manual-html-node elisp (expand-file-name "elisp" html-node-dir))) (if (member type (quote (nil "elisp" "elisp-mono"))) (manual-html-mono elisp (expand-file-name "elisp.html" html-mono-dir))) (if (member type (quote (nil "elisp" "elisp-pdf" "pdf"))) (manual-pdf elisp (expand-file-name "elisp.pdf" pdf-dir))) (if (member type (quote (nil "elisp" "elisp-ps" "ps"))) (manual-ps elisp (expand-file-name "elisp.ps" ps-dir))) (if (member type (quote (nil "eintr" "eintr-node"))) (manual-html-node eintr (expand-file-name "eintr" html-node-dir))) (if (member type (quote (nil "eintr" "eintr-node"))) (manual-html-mono eintr (expand-file-name "eintr.html" html-mono-dir))) (if (member type (quote (nil "eintr" "eintr-pdf" "pdf"))) (manual-pdf eintr (expand-file-name "eintr.pdf" pdf-dir))) (if (member type (quote (nil "eintr" "eintr-ps" "ps"))) (manual-ps eintr (expand-file-name "eintr.ps" ps-dir))) (let ((--dolist-tail-- misc) manual) (while --dolist-tail-- (setq manual (car --dolist-tail--)) (if (member type (cons nil (cons manual (quote ...)))) (manual-misc-html manual root html-node-dir html-mono-dir)) (setq --dolist-tail-- (cdr --dolist-tail--)))) (message "Manuals created in %s" dest))
  make-manuals("~/emacs-repo/main/test/" nil)
  call-interactively(make-manuals record nil)
  command-execute(make-manuals record)
  execute-extended-command(nil "make-manuals")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

[-- Attachment #3: Abbrevs.html --]
[-- Type: text/html, Size: 6368 bytes --]

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

end of thread, other threads:[~2013-12-30 14:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-29  4:04 Cannot generate web manuals Xue Fuqiao
2013-12-29  5:53 ` Thien-Thi Nguyen
2013-12-29 15:43 ` Eli Zaretskii
2013-12-29 20:13 ` Glenn Morris
2013-12-29 23:32   ` Xue Fuqiao
2013-12-30  1:26     ` Glenn Morris
2013-12-30  3:47       ` Stephen J. Turnbull
2013-12-30 14:28       ` Xue Fuqiao

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