unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Michal Sojka <sojkam1@fel.cvut.cz>
To: micah <micah@riseup.net>, notmuch@notmuchmail.org
Subject: Re: notmuch-show-get-filename and maildir location
Date: Sun, 06 Feb 2011 01:26:26 +0100	[thread overview]
Message-ID: <87r5bmovnx.fsf@wsheee.2x.cz> (raw)
In-Reply-To: <874o8kk63p.fsf@algae.riseup.net>

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

      reply	other threads:[~2011-02-06  0:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-04  0:15 notmuch-show-get-filename and maildir location micah
2011-02-06  0:26 ` Michal Sojka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r5bmovnx.fsf@wsheee.2x.cz \
    --to=sojkam1@fel.cvut.cz \
    --cc=micah@riseup.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).