unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16295: make-manuals can't generate web manuals with Texinfo 5.1
@ 2013-12-29 23:30 Xue Fuqiao
  2014-01-04  3:20 ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Xue Fuqiao @ 2013-12-29 23:30 UTC (permalink / raw)
  To: 16295

[-- Attachment #1: Type: text/plain, Size: 715 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.

Originally reported as:
http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00996.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] 3+ messages in thread

* bug#16295: make-manuals can't generate web manuals with Texinfo 5.1
  2013-12-29 23:30 bug#16295: make-manuals can't generate web manuals with Texinfo 5.1 Xue Fuqiao
@ 2014-01-04  3:20 ` Glenn Morris
  2014-01-08 22:40   ` Xue Fuqiao
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2014-01-04  3:20 UTC (permalink / raw)
  To: Xue Fuqiao; +Cc: 16295


I think this might work now.
It's all very fragile, please check for oddness in the output.





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

* bug#16295: make-manuals can't generate web manuals with Texinfo 5.1
  2014-01-04  3:20 ` Glenn Morris
@ 2014-01-08 22:40   ` Xue Fuqiao
  0 siblings, 0 replies; 3+ messages in thread
From: Xue Fuqiao @ 2014-01-08 22:40 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 16295

[ Sorry for the late reply. ]

On Sat, Jan 4, 2014 at 11:20 AM, Glenn Morris <rgm@gnu.org> wrote:
>
> I think this might work now.
> It's all very fragile, please check for oddness in the output.

I just checked it and the result looked good to me.  Thanks.

(IMHO we should try to reduce this kind of ugly hack as much as possible.)

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





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

end of thread, other threads:[~2014-01-08 22:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-29 23:30 bug#16295: make-manuals can't generate web manuals with Texinfo 5.1 Xue Fuqiao
2014-01-04  3:20 ` Glenn Morris
2014-01-08 22:40   ` 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).