[feature request] emacs: use `notmuch insert` for FCC
[notmuch-archives.git] / b5 / a6479afe7e9ce181b4943d9aee15df92a9cc7f
1 Return-Path: <tomi.ollila@nixu.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 74A1E429E21\r
6         for <notmuch@notmuchmail.org>; Tue, 15 Nov 2011 08:11:28 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id Ft1J6ebCJLhy for <notmuch@notmuchmail.org>;\r
16         Tue, 15 Nov 2011 08:11:21 -0800 (PST)\r
17 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])\r
18         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id DDF08431FB6\r
21         for <notmuch@notmuchmail.org>; Tue, 15 Nov 2011 08:11:20 -0800 (PST)\r
22 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])\r
23         by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id\r
24         pAFGBGuC011967\r
25         for <notmuch@notmuchmail.org>; Tue, 15 Nov 2011 18:11:18 +0200\r
26 From: Tomi Ollila <tomi.ollila@iki.fi>\r
27 To: <notmuch@notmuchmail.org>\r
28 Subject: [RFC PATCH] nmbug help w/o perldoc\r
29 User-Agent: Notmuch/0.9+73~ged20210 (http://notmuchmail.org) Emacs/23.3.1\r
30         (i686-pc-linux-gnu)\r
31 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
32         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
33         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
34 Date: Tue, 15 Nov 2011 18:11:16 +0200\r
35 Message-ID: <yf6aa7xl61n.fsf@taco2.nixu.fi>\r
36 MIME-Version: 1.0\r
37 Content-Type: text/plain; charset=us-ascii\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Tue, 15 Nov 2011 16:11:28 -0000\r
51 \r
52 \r
53 ---\r
54 \r
55 notmuch help runs pod2usage with -verbose => 2, which by default\r
56 tries to run perldoc. Adding -noperldoc => 1 disables this use\r
57 but there is no pre-verifying interface (or so) available.\r
58 \r
59 In one of my systems there was no 'perldoc' script, which basically\r
60 contains:\r
61 \r
62 use Pod::PerlDoc;\r
63 exit( Pod::Perldoc->run() );\r
64 \r
65 However, the system has Pod/Perldoc.pm installed. \r
66 \r
67 This patch demonstraces how Perldoc.pm can be used directly from perl\r
68 program. This is probably not the best way, but 'man Perldoc' does not\r
69 mention any other way to use the module.\r
70 \r
71 If you have problems running 'notmuch help' (it prints contents of the\r
72 command instead of help) and/or are otherwise interested the problem\r
73 look this patch and if you have ideas/knowledge how to improve it please\r
74 reply to this e-mail.\r
75 \r
76  contrib/nmbug |    9 +++++----\r
77  1 files changed, 5 insertions(+), 4 deletions(-)\r
78 \r
79 diff --git a/contrib/nmbug b/contrib/nmbug\r
80 index bb0739f..343fe10 100755\r
81 --- a/contrib/nmbug\r
82 +++ b/contrib/nmbug\r
83 @@ -5,7 +5,6 @@\r
84  use strict;\r
85  use warnings;\r
86  use File::Temp qw(tempdir);\r
87 -use Pod::Usage;\r
88  \r
89  no encoding;\r
90  \r
91 @@ -467,14 +466,16 @@ sub decode_from_fs {\r
92  \r
93  \r
94  sub usage {\r
95 -  pod2usage ();\r
96 +  require Pod::Usage;\r
97 +  Pod::Usage::pod2usage ();\r
98    exit (1);\r
99  }\r
100  \r
101  \r
102  sub do_help {\r
103 -  pod2usage ( -verbose => 2 );\r
104 -  exit (0);\r
105 +  require Pod::Perldoc;\r
106 +  @ARGV = ( $0 );\r
107 +  exit ( Pod::Perldoc->run() );\r
108  }\r
109  \r
110  __END__\r
111 --\r
112 1.7.7.3\r
113 \r