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 A83FC431FB6 for ; Thu, 6 Dec 2012 14:48:10 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 ak6uVhO2WAOe for ; Thu, 6 Dec 2012 14:48:10 -0800 (PST) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 17653431FAE for ; Thu, 6 Dec 2012 14:48:09 -0800 (PST) Received: by mail-lb0-f181.google.com with SMTP id ge1so5974121lbb.26 for ; Thu, 06 Dec 2012 14:48:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=CKQES+M3ntljyAAZFcEACUrh+gLYbzQ3LGQBySOfUmc=; b=LHvoffzhYecZttYZKH7kc68ygrxd/OMlcU70MVkyyM4LFSD352qdGhp9cc/jzGvt4b kWzrmkEJk6BsVBVHLAUpDExvukStP4d+CejcE5PLDXS+JOGaQ2Ihh9n8wOcs2ev7uAYd LhXiUnZ6g14PX6b5jPmqupVYqOh96yQKVPO3+YtXw5cF/mNtMfNOu/H4fyQ1hbviU2WG gndGV4L8y0NblNg6iE10nfgUZtQEyhERKJNHp97AGHRSRm9qaP//uA+GGP/xY9iHV+6d TWArlv97DNiVr8PzAibhPLFi6RnwUZHiA9Y2CVyLcF6/6A0pcyfRyyHnP0O/WUT6k0aM 2WHw== Received: by 10.112.42.233 with SMTP id r9mr1616454lbl.76.1354834088480; Thu, 06 Dec 2012 14:48:08 -0800 (PST) Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi. [80.223.81.27]) by mx.google.com with ESMTPS id z9sm4006239lby.8.2012.12.06.14.48.06 (version=SSLv3 cipher=OTHER); Thu, 06 Dec 2012 14:48:07 -0800 (PST) From: Jani Nikula To: notmuch@notmuchmail.org, Mark Walters Subject: [PATCH v2] emacs: add support for stashing the thread id in show view Date: Fri, 7 Dec 2012 00:48:05 +0200 Message-Id: <1354834085-8225-1-git-send-email-jani@nikula.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <87mwxqhkqu.fsf@qmul.ac.uk> References: <87mwxqhkqu.fsf@qmul.ac.uk> X-Gm-Message-State: ALoCoQmo4z0jztfrXhXJbBpqZD0lRU8n4TWSFzoOF0wHHFe5rj+HWbidjaZEMeRBv185OZI6RxVs 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: Thu, 06 Dec 2012 22:48:10 -0000 Add a prefix argument to notmuch-show-stash-message-id to stash thread id instead of message id. --- emacs/notmuch-show.el | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 4d6c014..658a2be 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1901,10 +1901,16 @@ thread from search." (interactive) (notmuch-common-do-stash (notmuch-show-get-from))) -(defun notmuch-show-stash-message-id () - "Copy id: query matching the current message to kill-ring." - (interactive) - (notmuch-common-do-stash (notmuch-show-get-message-id))) +(defun notmuch-show-stash-message-id (&optional stash-thread-id) + "Copy id: query matching the current message to kill-ring. + +If invoked with a prefix argument (or STASH-THREAD-ID is +non-nil), copy thread: query matching the current thread to +kill-ring." + (interactive "P") + (if stash-thread-id + (notmuch-common-do-stash notmuch-show-thread-id) + (notmuch-common-do-stash (notmuch-show-get-message-id)))) (defun notmuch-show-stash-message-id-stripped () "Copy message ID of current message (sans `id:' prefix) to kill-ring." -- 1.7.10.4