From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 16CC5431FB6 for ; Thu, 3 Feb 2011 16:15:27 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.689 X-Spam-Level: X-Spam-Status: No, score=-0.689 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7, T_MIME_NO_TEXT=0.01, UNPARSEABLE_RELAY=0.001] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qTq1wlLt26VF for ; Thu, 3 Feb 2011 16:15:26 -0800 (PST) Received: from mx1.riseup.net (mx1.riseup.net [204.13.164.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 9ECD5431FB5 for ; Thu, 3 Feb 2011 16:15:26 -0800 (PST) Received: from tern.riseup.net (tern-pn.riseup.net [10.0.1.12]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Gandi Standard SSL CA" (verified OK)) by mx1.riseup.net (Postfix) with ESMTPS id D80AA25EC22 for ; Thu, 3 Feb 2011 16:15:23 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: micah@tern.riseup.net) with ESMTPSA id DBC3114C16F Received: by algae (Postfix, from userid 1000) id 2D752419FD; Thu, 3 Feb 2011 19:15:23 -0500 (EST) From: micah To: notmuch@notmuchmail.org Subject: notmuch-show-get-filename and maildir location Date: Thu, 03 Feb 2011 19:15:22 -0500 Message-ID: <874o8kk63p.fsf@algae.riseup.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Virus-Scanned: clamav-milter 0.96.5 at mx1 X-Virus-Status: Clean X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Feb 2011 00:15:27 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable I recently upgraded to the newer notmuch to test out the new folder patch (its great!) and the new decryption/signature verification (its fantastic!), and noticed something odd start happening. I think that notmuch moves a new message to the maildir cur directory, From=20the new directory when you first read it. Is that right? This is actually what I would expect with maildirs, but notmuch wasn't doing this before. The reason why I care is because if I open a message, notmuch-show-get-filename tells me that the file is located in the 'new/' path, but it is actually not there at all, looking around it appears to be in the 'cur/' directory.=20 This is because I made a function to let me do bayes training by putting mistaken emails in my Mistakes folder, so that they can be retrained: (defun notmuch-mark-as-mistake () "Moves the current message into the Mistakes folder" (interactive) (let* ((fullpath (notmuch-show-get-filename)) (filename (file-name-nondirectory fullpath))) (save-excursion (rename-file fullpath (concat "/home/micah/Maildir/INBOX.Mistakes/new/" fil= ename))) (notmuch-show-archive-thread-then-exit) (notmuch-search-refresh-view) (hl-line-mode 1)(hl-line-mode 1))) (define-key notmuch-show-mode-map (kbd "S") 'notmuch-mark-as-mistake) if I hit the 'S' key on a message now, it complains that it cannot rename the file because it doesn't exist. Incidentally, does anyone know how I can do this without having to actually do a notmuch-show on the message? Most spam I can recognize by the subject in my inbox, and I dont need to open it to see that. micah --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCgAGBQJNS0UaAAoJEIy/mjIoYaeQKM8P/jYB+hnpB8IHCAcPG5WYO7y5 1kaDT7w+gUUknp4BaoPapWT0QJhPH+6bJ2Rdn/Nn31W2sPBr8T88Wh4op+pRPgk1 pB0eVPCV+wT7ZulqiaXzt1fI45b0ywdcwbt8SxdSt90MPXmxfIwIyRODyNs9zuaj 7m0o558TMKOUrc2LVgICxQquiZskk3tpEDOBSWCw7gDipiUrCRzngcWGmP/WLedC G3PMok9IdAWL3SNUgoUe3xs62xzvoGpnr36yIyMLaim7o5ijQbdhG/Md5z6zpQgY Zfa5igdrTY0HAqefC/K4Qc+wuxUPcfxMWSuUFHgQNDVbdS96Z4NfGCFiGT40lCd0 3XDxab10t484WxsPob2a8m+mfnnQeCu313zIvLfUPe56OY82nqr0Te7d8B501+V4 ZN2BB872MW1vC+AZJS3bDTcJa8MDjvQzMCtcNiUFIdav1CtOEBOmzQgg0Hup7V3/ /ERWJk/cjFWHrr3WTuz2anqibVgWWX5yeS3QpHSVn9C6gJcm5KIvtNI8BQZkF0r2 ok/HbLvybW9FdagsXcMPpSE7n/5qNoAHd7Fqh1pKaR/GFRZC9Mq+5MM06rsJE1Ip a+4Bu/DukK6loOVxQdmAe4Hhr1ZOAOPiZD94sTa4V16v5BU5wF/af37cdL0EWHZe 41/KBNSsS+D7FY8khJVB =NNsh -----END PGP SIGNATURE----- --=-=-=--