From: Xue Fuqiao <xfq.free@gmail.com>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Cannot generate web manuals
Date: Sun, 29 Dec 2013 12:04:59 +0800 [thread overview]
Message-ID: <CAAF+z6EtDHu3-Fn60D_Dn7ENNu82VARBK0e5t6j5U6fC6tOqcQ@mail.gmail.com> (raw)
[-- 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 ©" 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 ©" 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 ©" 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 ©" 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 --]
next reply other threads:[~2013-12-29 4:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-29 4:04 Xue Fuqiao [this message]
2013-12-29 5:53 ` Cannot generate web manuals 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAF+z6EtDHu3-Fn60D_Dn7ENNu82VARBK0e5t6j5U6fC6tOqcQ@mail.gmail.com \
--to=xfq.free@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.