--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 1AEE3431FAF\r
+ for <notmuch@notmuchmail.org>; Mon, 13 Jan 2014 13:06:12 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id UJkEe6XRCP1h for <notmuch@notmuchmail.org>;\r
+ Mon, 13 Jan 2014 13:06:08 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id E43D2431FAE\r
+ for <notmuch@notmuchmail.org>; Mon, 13 Jan 2014 13:06:07 -0800 (PST)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id 94AF4100086;\r
+ Mon, 13 Jan 2014 23:06:03 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 2/3] man: partial conversion to pod.\r
+In-Reply-To: <1388921950-5017-3-git-send-email-david@tethera.net>\r
+References: <1366852752-3584-1-git-send-email-david@tethera.net>\r
+ <1388921950-5017-1-git-send-email-david@tethera.net>\r
+ <1388921950-5017-3-git-send-email-david@tethera.net>\r
+User-Agent: Notmuch/0.17+34~g98b959f (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+Date: Mon, 13 Jan 2014 23:06:03 +0200\r
+Message-ID: <m2mwizoamc.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+Cc: David Bremner <bremner@debian.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 13 Jan 2014 21:06:12 -0000\r
+\r
+David Bremner <david@tethera.net> writes:\r
+\r
+> From: David Bremner <bremner@debian.org>\r
+>\r
+> This allows generation of man page and info document from the same source.\r
+> It is also a bit more friendly to edit for most people.\r
+\r
+IMHO it is good idea to have common format where to produce man, info &\r
+html files. If we're going to need pandoc then the question of source\r
+format explodes with choices...\r
+\r
+\r
+> The conversion was done as follows:\r
+>\r
+> % groff -e -mandoc -Tascii -rHY=0 $* | rman -f POD | sed -e '/./,/^$/!d' -e 's/\r
+>\r
+> Some small hand-editing of the .pod may be needed afterwards.\r
+> ---\r
+> INSTALL | 6 +\r
+> configure | 12 ++\r
+> info/Makefile.local | 25 +++-\r
+> man/Makefile.local | 19 ++-\r
+> man/man1/notmuch.1 | 190 ----------------------------\r
+> man/man7/notmuch-search-terms.7 | 269 ----------------------------------------\r
+> pod/notmuch-search-terms.pod | 235 +++++++++++++++++++++++++++++++++++\r
+> pod/notmuch.pod | 155 +++++++++++++++++++++++\r
+> 8 files changed, 448 insertions(+), 463 deletions(-)\r
+> delete mode 100644 man/man1/notmuch.1\r
+> delete mode 100644 man/man7/notmuch-search-terms.7\r
+> create mode 100644 pod/notmuch-search-terms.pod\r
+> create mode 100644 pod/notmuch.pod\r
+>\r
+> diff --git a/INSTALL b/INSTALL\r
+> index 451bf05..697b7b2 100644\r
+> --- a/INSTALL\r
+> +++ b/INSTALL\r
+> @@ -60,6 +60,12 @@ Talloc which are each described below:\r
+> \r
+> Talloc is available from http://talloc.samba.org/\r
+> \r
+> + pod2man\r
+> + -------\r
+> +\r
+> + Some of the documentation is built with pod2man. This is part\r
+> + of the standard Perl distribution since Perl 5.6.0\r
+> +\r
+> texinfo\r
+> -------\r
+> \r
+> diff --git a/configure b/configure\r
+> index e75c1d4..6dadbaa 100755\r
+> --- a/configure\r
+> +++ b/configure\r
+> @@ -389,6 +389,15 @@ else\r
+> have_emacs=0\r
+> fi\r
+> \r
+> +printf "Checking for pod2man... "\r
+> +if pod2man --help > /dev/null 2>&1; then\r
+> + printf "Yes.\n"\r
+> + have_pod2man=1\r
+> +else\r
+> + printf "No (man page install may fail)\n"\r
+> + have_pod2man=0\r
+> +fi\r
+> +\r
+> printf "Checking for makeinfo... "\r
+> if makeinfo --version > /dev/null 2>&1; then\r
+> printf "Yes.\n"\r
+> @@ -768,6 +777,9 @@ HAVE_MAKEINFO = ${have_makeinfo}\r
+> # Whether there's an install-info binary available\r
+> HAVE_INSTALLINFO = ${have_installinfo}\r
+> \r
+> +# Is pod2man in the path?\r
+> +HAVE_POD2MAN = ${have_pod2man}\r
+> +\r
+> # where to install info files\r
+> \r
+> INFODIR = ${INFODIR}\r
+> diff --git a/info/Makefile.local b/info/Makefile.local\r
+> index 55e9740..cca891a 100644\r
+> --- a/info/Makefile.local\r
+> +++ b/info/Makefile.local\r
+> @@ -2,10 +2,14 @@\r
+> \r
+> dir := info\r
+> \r
+> +man_texi := $(dir)/notmuch.texi $(dir)/notmuch-search-terms.texi\r
+> +man_info := $(man_texi:.texi=.info)\r
+> +man_entry := $(man_texi:.texi=.entry)\r
+> +\r
+> texi_sources := $(dir)/notmuch-emacs.texi\r
+> emacs_info := $(texi_sources:.texi=.info)\r
+> \r
+> -info := $(emacs_info)\r
+> +info := $(emacs_info) $(man_info)\r
+> \r
+> ifeq ($(HAVE_MAKEINFO),1)\r
+> all: $(info)\r
+> @@ -15,11 +19,23 @@ ifeq ($(HAVE_INSTALLINFO),1)\r
+> install: install-info\r
+> endif\r
+> \r
+> -%.info: %.texi\r
+> +%.entry: ../pod/%.pod\r
+> + printf "@dircategory Notmuch\n@direntry\n" > $@\r
+> + printf "* %s: (%s). " $(*F) $(*F) >> $@\r
+> + podselect -section Name $< | \\r
+> + perl -n -e 's/notmuch.* - (.*)/\u\L$$1/ && print' >> $@\r
+> + printf "@end direntry\n" >> $@\r
+> +\r
+> +%.info: %.texi %.entry\r
+> makeinfo --no-split -o $@ $<\r
+> \r
+> $(dir)/notmuch-emacs.info: $(dir)/notmuch-emacs.texi $(dir)/version.texi\r
+\r
+> +%.texi: ../pod/%.pod\r
+> + # a nasty hack, but the nicer ways seem to have bugs.\r
+> + pod2texi $< | \\r
+> + sed 's/@node Top/@include $(*F).entry\n@node Top/' > $@\r
+\r
+This usage of pipeline above is problematic as if pod2texi returns nonzero\r
+it is shadowed by return value of sed. Therefore a temporary file is\r
+needed for this kind of operation.\r
+\r
+\r
+Tomi\r