From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | partial documentation builds |
Date: | 2016-11-17 01:23:13 |
Message-ID: | 1c91cb0c-0744-a1eb-d6ea-e952bc625fa8@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Here is a tip for building the documentation faster during development.
With the new toolchain, you can build only a part of the documentation,
like this:
make html XSLTPROCFLAGS='--stringparam rootid pageinspect'
where "pageinspect" is some XML id (see the top of pageinspect.sgml in
this example). This will build only that part of the documentation,
which is much faster than the full build, but still in the proper
context so that links and section numbering work correctly.
Here is an example of integrating this into an editor:
(defun top-level-id ()
"Return top-level XML/SGML id"
(save-excursion
(goto-char (point-min))
(if (re-search-forward "^<[a-z0-9]+ id=\"\\([a-z-]+\\)\"")
(match-string 1))))
(defun compile-html-of-this ()
(interactive)
(let ((id (top-level-id)))
(when id
(compile (format "make html XSLTPROCFLAGS='--stringparam rootid
%s'" id)))))
(defun browse-html-of-this ()
(interactive)
(let ((id (top-level-id)))
(when id
(browse-url-of-file (concat (file-name-directory buffer-file-name)
"html/" id ".html")))))
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Haribabu Kommi | 2016-11-17 01:24:04 | Re: Fun fact about autovacuum and orphan temp tables |
Previous Message | Peter Eisentraut | 2016-11-17 01:15:25 | Re: Re: [COMMITTERS] pgsql: Build HTML documentation using XSLT stylesheets by default |