Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 088AE431FB6 for ; Sat, 5 Feb 2011 16:26:30 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 FW6NEog+6M00 for ; Sat, 5 Feb 2011 16:26:29 -0800 (PST) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id 61960431FB5 for ; Sat, 5 Feb 2011 16:26:29 -0800 (PST) Received: from localhost (unknown [192.168.200.4]) by max.feld.cvut.cz (Postfix) with ESMTP id B38793CFE8E; Sun, 6 Feb 2011 01:26:28 +0100 (CET) X-Virus-Scanned: IMAP AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new, port 10044) with ESMTP id 1JVPGKAeXt7r; Sun, 6 Feb 2011 01:26:27 +0100 (CET) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id 790E63CFE71; Sun, 6 Feb 2011 01:26:27 +0100 (CET) Received: from wsheee.2x.cz (unknown [213.29.198.144]) (Authenticated sender: sojkam1) by imap.feld.cvut.cz (Postfix) with ESMTPSA id 735DA15C031; Sun, 6 Feb 2011 01:26:27 +0100 (CET) Received: from wsh by wsheee.2x.cz with local (Exim 4.72) (envelope-from ) id 1PlsSQ-00081f-Po; Sun, 06 Feb 2011 01:26:26 +0100 From: Michal Sojka To: micah , notmuch@notmuchmail.org Subject: Re: notmuch-show-get-filename and maildir location In-Reply-To: <874o8kk63p.fsf@algae.riseup.net> References: <874o8kk63p.fsf@algae.riseup.net> User-Agent: Notmuch/0.5-103-g1253785 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu) Date: Sun, 06 Feb 2011 01:26:26 +0100 Message-ID: <87r5bmovnx.fsf@wsheee.2x.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Sun, 06 Feb 2011 00:26:30 -0000 On Fri, 04 Feb 2011, micah wrote: > > 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 the 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. > > 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)) Hi Micah, Use this instead of the above line. (let* ((fullpath (car (process-lines notmuch-command "search" "--output=files" (notmuch-show-get-message-id)))) > 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. Look at http://notmuchmail.org/emacstips/#index5h2. This is similar to what you want. -Michal