Re: [notmuch] indexing mail?
authorOlly Betts <olly@survex.com>
Fri, 15 Jan 2010 07:30:04 +0000 (07:30 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:35:59 +0000 (09:35 -0800)
e9/c38bddb6ddf5e61713c9538b1ff042b242ee14 [new file with mode: 0644]

diff --git a/e9/c38bddb6ddf5e61713c9538b1ff042b242ee14 b/e9/c38bddb6ddf5e61713c9538b1ff042b242ee14
new file mode 100644 (file)
index 0000000..bf3800c
--- /dev/null
@@ -0,0 +1,95 @@
+Return-Path: <gmn-notmuch@m.gmane.org>\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 50FAA431FBC\r
+       for <notmuch@notmuchmail.org>; Thu, 14 Jan 2010 23:30:30 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.035\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.035 tagged_above=-999 required=5 tests=[AWL=0.564,\r
+       BAYES_00=-2.599] autolearn=ham\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 cjvKTo2fkDwx for <notmuch@notmuchmail.org>;\r
+       Thu, 14 Jan 2010 23:30:28 -0800 (PST)\r
+Received: from lo.gmane.org (lo.gmane.org [80.91.229.12])\r
+       by olra.theworths.org (Postfix) with ESMTP id 75A89431FAE\r
+       for <notmuch@notmuchmail.org>; Thu, 14 Jan 2010 23:30:28 -0800 (PST)\r
+Received: from list by lo.gmane.org with local (Exim 4.50) id 1NVgdW-0005Xk-5m\r
+       for notmuch@notmuchmail.org; Fri, 15 Jan 2010 08:30:26 +0100\r
+Received: from ip-118-90-138-203.xdsl.xnet.co.nz ([118.90.138.203])\r
+       by main.gmane.org with esmtp (Gmexim 0.1 (Debian))\r
+       id 1AlnuQ-0007hv-00\r
+       for <notmuch@notmuchmail.org>; Fri, 15 Jan 2010 08:30:26 +0100\r
+Received: from olly by ip-118-90-138-203.xdsl.xnet.co.nz with local (Gmexim\r
+       0.1 (Debian)) id 1AlnuQ-0007hv-00\r
+       for <notmuch@notmuchmail.org>; Fri, 15 Jan 2010 08:30:26 +0100\r
+X-Injected-Via-Gmane: http://gmane.org/\r
+To: notmuch@notmuchmail.org\r
+From: Olly Betts <olly@survex.com>\r
+Date: Fri, 15 Jan 2010 07:30:04 +0000 (UTC)\r
+Lines: 37\r
+Message-ID: <slrnhl06bt.2rf.olly@msgid.survex.com>\r
+References: <4B4ED7E8.20501@exys.org> <878wc0623y.fsf@exys.org>\r
+       <20100114183854.1d04f111@hikari> <87fx68e2am.fsf@yoom.home.cworth.org>\r
+       <slrnhkvo6d.2rf.olly@msgid.survex.com>\r
+       <878wbzx3td.wl%djcb@djcbsoftware.nl>\r
+X-Complaints-To: usenet@ger.gmane.org\r
+X-Gmane-NNTP-Posting-Host: ip-118-90-138-203.xdsl.xnet.co.nz\r
+User-Agent: slrn/pre1.0.0-11 (Linux)\r
+Sender: news <news@ger.gmane.org>\r
+Subject: Re: [notmuch] indexing mail?\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: Fri, 15 Jan 2010 07:30:30 -0000\r
+\r
+On 2010-01-15, Dirk-Jan C  Binnema wrote:\r
+>>>>>> "Olly" == Olly Betts <olly@survex.com> writes:\r
+>    Olly> Not a full patch, but I already posted what this code should look like\r
+>    Olly> to handle both systems without d_type, and those which return DT_UNKNOWN:\r
+>\r
+>    Olly> http://article.gmane.org/gmane.mail.notmuch.general/1044\r
+\r
+> static gboolean\r
+> _set_dtype (const char* path, struct dirent *entry)\r
+\r
+Underscore prefixed identifiers are reserved by ISO C at file-scope; using them\r
+yourself is undefined behaviour...\r
+\r
+>      /* we only care about dirs, regular files and links */\r
+>      if (S_ISREG (statbuf.st_mode))\r
+>              entry->d_type = DT_REG;\r
+>      else if (S_ISDIR (statbuf.st_mode))\r
+>              entry->d_type = DT_DIR;\r
+>      else if (S_ISLNK (statbuf.st_mode))\r
+>              entry->d_type = DT_LNK;\r
+\r
+This addresses the case where the FS returns DT_UNKNOWN for d_type, but doesn't\r
+deal with the case of platforms where struct dirent has no d_type member - from\r
+the Linux readdir man page:\r
+\r
+  The only fields in the dirent structure that are mandated by POSIX.1 are:\r
+  d_name[], of unspecified size, with at most NAME_MAX characters preceding\r
+  the terminating null byte; and (as an XSI extension) d_ino.  The other fields\r
+  are unstandardized, and not present on all systems; see NOTES below for some\r
+  further details.\r
+\r
+And in NOTES:\r
+\r
+  Other than Linux, the d_type field is available mainly only on BSD systems.\r
+\r
+Cheers,\r
+    Olly\r
+\r