From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id D162B6DE0924 for ; Sat, 8 Aug 2015 08:25:35 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.801 X-Spam-Level: X-Spam-Status: No, score=-0.801 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FvPUarq-tlcs for ; Sat, 8 Aug 2015 08:25:34 -0700 (PDT) Received: from mail-io0-f181.google.com (mail-io0-f181.google.com [209.85.223.181]) by arlo.cworth.org (Postfix) with ESMTPS id B048C6DE02D2 for ; Sat, 8 Aug 2015 08:25:33 -0700 (PDT) Received: by ioii16 with SMTP id i16so136060945ioi.0 for ; Sat, 08 Aug 2015 08:25:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:message-id:date:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=by1ZZwX3DeLaWxp7wgl0JsGAglTcUqSRwt2GBTTHkq0=; b=MRVVMEwybaU/dqzjoTOoAhBaGEzPBixu4vbPG0X5hmcknx3BN4Ajk1fO0jVULj57ix FTyqM+zb3qIauhZKnF0UwEnidHAgoKlDRqN4SdTGlYWqGZZmRAPzsNLbKHynpFVLljzD E9MRyBtUvWwzJ80CuqUCzAJlOBQBofLOEKJ6DnFRrsI7kI7ffdXAEYzYUCfXq7tBzEkB rNhDMjOr2naxmRMV7pC0kMewizjFC8ZBUXStoUPuWZqbwkF+hOP+fy1YybEGB2vhkaCq wuTwTTBR8GqEY9QrkNODw8BQnz3gObKvV69EzSUPGUF4GhyU3hIp3WL2Lpjx7DbIKLM+ KMQQ== X-Received: by 10.107.33.18 with SMTP id h18mr12678525ioh.148.1439047532763; Sat, 08 Aug 2015 08:25:32 -0700 (PDT) Received: from [192.168.2.4] (135-23-227-59.cpe.pppoe.ca. [135.23.227.59]) by smtp.googlemail.com with ESMTPSA id k62sm9266817ioi.10.2015.08.08.08.25.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Aug 2015 08:25:32 -0700 (PDT) From: Paul Tarvydas X-Google-Original-From: Paul Tarvydas Message-ID: <55C61F6A.10103@gmail.com> Date: Sat, 08 Aug 2015 11:25:30 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: notmuch@notmuchmail.org Subject: tags vs. show Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sun, 09 Aug 2015 08:29:19 -0700 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.18 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: Sat, 08 Aug 2015 15:25:35 -0000 I'm having a problem with "notmuch show" producing too many results. Can somebody tell me how to "notmuch show" only emails that a specific tag? Specifics (linux mint, emacs 24.3.1): I run this tagging query at the command line: > notmuch tag +xyz -- '(to:xyz@me.com or from:xyz@me.com or cc:xyz@me.com)' In emacs, notmuch-hello, I search tag:xyz and I get a buffer of emails that I expect. Then, I run on the command line: > notmuch show --format=mbox "tag:xyz" >xyz-all.txt the resulting xyz-all.txt contains many other emails (e.g. spam from linkedin, etc). In the end, I want to create a new gmail account containing only the above tagged emails. I will upload it with: > python imap_upload.py --gmail --box inbox --error Friends.err --user xyz --password xyz xyz-all.txt I did this several years ago and see, from my scripts, that I had the same problem. I worked around it by clearing tags, then creating an exclusion tag and tagging everything with that and, etc. ... I would prefer to know how to do this exactly, this time. Thanks in advance for any advice! pt