Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 01 / 6483b02651a10c8f9bda3e12e6858081666ebf
1 Return-Path: <alpine.art.de@gmail.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 0734C431FB6\r
6         for <notmuch@notmuchmail.org>; Tue, 14 Oct 2014 06:45:37 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id TNUpxN4bk-lH for <notmuch@notmuchmail.org>;\r
17         Tue, 14 Oct 2014 06:45:29 -0700 (PDT)\r
18 Received: from mail-la0-f47.google.com (mail-la0-f47.google.com\r
19         [209.85.215.47]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id C0D28431FAF\r
22         for <notmuch@notmuchmail.org>; Tue, 14 Oct 2014 06:45:28 -0700 (PDT)\r
23 Received: by mail-la0-f47.google.com with SMTP id pv20so8400823lab.6\r
24         for <notmuch@notmuchmail.org>; Tue, 14 Oct 2014 06:45:25 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=date:message-id:from:to:cc:subject:in-reply-to:references\r
27         :mime-version:content-type:content-disposition\r
28         :content-transfer-encoding;\r
29         bh=0mcLQD1QmOUzFvBJblncjftIOqHLJSzMqM5qaSbLj9U=;\r
30         b=cSv3pKEKWrrDpuvr/jI8N3rQQTtHWliezFWGmA08dWMA4WwFcw94K3Kv5XDV4MN2th\r
31         WbhdVT/ON9HMj7WmtACa8+LWGMsS9fd9zGzqDBNuPg/3mZQ6YaiRCVSPUX0M5xNTyeDA\r
32         KBRs6xE3jcmaTNXAHvNfkMGna8S4IgA8MTfo+PEeRIJ3le53ffYCQBBz2JzIXnS+ZG57\r
33         ePmoyXFiW5dgi+3RHAC2PsZjMOP9EV3BQOoU/znMmJqj+vZQAtaO8MUz5lQncRXPJkBr\r
34         0xmlV8B/qH/99jpnhkJX9x5btuscgrQOtY/KKDvVnO8oZhswqk0EG5lrZHoBz0YOU5Ar\r
35         LCmg==\r
36 X-Received: by 10.112.133.138 with SMTP id pc10mr5538692lbb.48.1413294325664; \r
37         Tue, 14 Oct 2014 06:45:25 -0700 (PDT)\r
38 Received: from localhost (p5B00C854.dip0.t-ipconnect.de. [91.0.200.84])\r
39         by mx.google.com with ESMTPSA id bk5sm5617818lbd.30.2014.10.14.06.45.23\r
40         for <multiple recipients>\r
41         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
42         Tue, 14 Oct 2014 06:45:24 -0700 (PDT)\r
43 Date: Tue, 14 Oct 2014 15:45:35 +0200\r
44 Message-ID: <20141014154535.GJ23373@TP_L520.localdomain>\r
45 From: Franz Fellner <alpine.art.de@gmail.com>\r
46 To: Ian Main <imain@stemwinder.org>\r
47 Subject: Re: [PATCH] VIM: Make an option to save sent mail locally\r
48 In-Reply-To: <1412619036-29203-1-git-send-email-imain@stemwinder.org>\r
49 References: <1412617904-27252-1-git-send-email-imain@stemwinder.org>\r
50         <1412619036-29203-1-git-send-email-imain@stemwinder.org>\r
51 MIME-Version: 1.0\r
52 Content-Type: text/plain; charset=utf-8\r
53 Content-Disposition: inline\r
54 Content-Transfer-Encoding: 8bit\r
55 Cc: notmuch@notmuchmail.org\r
56 X-BeenThere: notmuch@notmuchmail.org\r
57 X-Mailman-Version: 2.1.13\r
58 Precedence: list\r
59 List-Id: "Use and development of the notmuch mail system."\r
60         <notmuch.notmuchmail.org>\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
64 List-Post: <mailto:notmuch@notmuchmail.org>\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
67         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
68 X-List-Received-Date: Tue, 14 Oct 2014 13:45:37 -0000\r
69 \r
70 Why not simply use Notmuch::Database.add_message? Would save a\r
71 system-call.\r
72 One could easily copy the sent mail into nm_db_path/sent/cur, add it to the db, tag it.\r
73 Though I don't know enough about maildir handling, but probably rubys\r
74 Mail module could help here.\r
75 \r
76 Another issue is configuration. Hardcoding "Sent" probably won't fit\r
77 everyones needs. And (if I understand DOCS correctly) db.add_message\r
78 doesn't even force you to keep sent mail folder inside db_path; correct\r
79 me if I'm wrong :) notmuch --insert will put it into folder relative to\r
80 db_path.\r
81 \r
82 All in all the feature and the the rest of your work is very much\r
83 appreciated!\r
84 \r
85 Franz\r
86 \r
87 On Mon,  6 Oct 2014 11:10:36 -0700, Ian Main <imain@stemwinder.org> wrote:\r
88 > Add an option to use 'notmuch insert' to save your sent mail.\r
89 > ---\r
90\r
91 > Add -inbox as well.\r
92\r
93 >  vim/notmuch.vim | 17 +++++++++++++++++\r
94 >  1 file changed, 17 insertions(+)\r
95\r
96 > diff --git a/vim/notmuch.vim b/vim/notmuch.vim\r
97 > index 331e930..a9044c4 100644\r
98 > --- a/vim/notmuch.vim\r
99 > +++ b/vim/notmuch.vim\r
100 > @@ -58,6 +58,7 @@ let s:notmuch_date_format_default = '%d.%m.%y'\r
101 >  let s:notmuch_datetime_format_default = '%d.%m.%y %H:%M:%S'\r
102 >  let s:notmuch_reader_default = 'mutt -f %s'\r
103 >  let s:notmuch_sendmail_default = 'sendmail'\r
104 > +let s:notmuch_save_sent_locally_default = 1\r
105 >  let s:notmuch_folders_count_threads_default = 0\r
106 >  \r
107 >  function! s:new_file_buffer(type, fname)\r
108 > @@ -108,6 +109,18 @@ EOF\r
109 >               echohl None\r
110 >               return\r
111 >       endif\r
112 > +\r
113 > +     if g:notmuch_save_sent_locally\r
114 > +             let out = system('cat ' . fname . ' | notmuch insert --create-folder --folder=Sent +sent -unread -inbox')\r
115 > +             let err = v:shell_error\r
116 > +             if err\r
117 > +                     echohl Error\r
118 > +                     echo 'Eeek! unable to save sent mail'\r
119 > +                     echo out\r
120 > +                     echohl None\r
121 > +                     return\r
122 > +             endif\r
123 > +     endif\r
124 >       call delete(fname)\r
125 >       echo 'Mail sent successfully.'\r
126 >       call s:kill_this_buffer()\r
127 > @@ -388,6 +401,10 @@ endfunction\r
128 >  "" root\r
129 >  \r
130 >  function! s:set_defaults()\r
131 > +     if !exists('g:notmuch_save_sent_locally')\r
132 > +             let g:notmuch_save_sent_locally = s:notmuch_save_sent_locally_default\r
133 > +     endif\r
134 > +\r
135 >       if !exists('g:notmuch_date_format')\r
136 >               if exists('g:notmuch_rb_date_format')\r
137 >                       let g:notmuch_date_format = g:notmuch_rb_date_format\r
138 > -- \r
139 > 1.9.3\r
140\r
141 > _______________________________________________\r
142 > notmuch mailing list\r
143 > notmuch@notmuchmail.org\r
144 > http://notmuchmail.org/mailman/listinfo/notmuch\r