From: Jani Nikula Date: Thu, 6 Dec 2012 20:57:23 +0000 (+0200) Subject: [PATCH] emacs: add support for stashing the thread id in show view X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=d408f26fd1fecd72cf826ed3afeadd29db77fc04;p=notmuch-archives.git [PATCH] emacs: add support for stashing the thread id in show view --- diff --git a/6f/b47f34fc725d1a2672a9b2e83739263165160a b/6f/b47f34fc725d1a2672a9b2e83739263165160a new file mode 100644 index 000000000..af0949609 --- /dev/null +++ b/6f/b47f34fc725d1a2672a9b2e83739263165160a @@ -0,0 +1,94 @@ +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 2D60C431FB6 + for ; Thu, 6 Dec 2012 12:57:30 -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 3Tl4GViQcdtF for ; + Thu, 6 Dec 2012 12:57:29 -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 8738A431FAE + for ; Thu, 6 Dec 2012 12:57:29 -0800 (PST) +Received: by mail-lb0-f181.google.com with SMTP id ge1so5898994lbb.26 + for ; Thu, 06 Dec 2012 12:57:28 -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:x-gm-message-state; + bh=E3s40yZSlYtEcOxT2ZmZ6FsXyahhvJT+wfnzAJmvex4=; + b=ch8tue0FwqkxdRsZg1iqtgp9haXBlFzuou2q5PcTE1ByHOm9vjjUnQ2JtRuQ2FVMHL + 3kdaVlrtPtJwX/h5PchkNxmWvOTVPnV+DlRukdzMeT7ai750WK9zuCiI+fKa2bOUMaNo + ETA3A6wPMFVGmDb5ELsczbJLLciRYi/ygmo/Ab2C15i/x+7QFd3rocQhqRysroRczAOB + 3DkJ/bzxCK3fbCbLm1riycno8nK/ageKZbzDaXxAdvXZTGHqNci0MlLgW4qvLAgHjVfO + Dn8m2dPC22WwX04fnDImaNNxao6mjBzmNI4CHVunxMC0dXbLgxPuhACQCnLvZPA8e3/K + qJoA== +Received: by 10.112.101.135 with SMTP id fg7mr1581580lbb.87.1354827446761; + Thu, 06 Dec 2012 12:57:26 -0800 (PST) +Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi. + [80.223.81.27]) + by mx.google.com with ESMTPS id ee5sm3930122lbb.14.2012.12.06.12.57.24 + (version=SSLv3 cipher=OTHER); Thu, 06 Dec 2012 12:57:25 -0800 (PST) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH] emacs: add support for stashing the thread id in show view +Date: Thu, 6 Dec 2012 22:57:23 +0200 +Message-Id: <1354827443-10549-1-git-send-email-jani@nikula.org> +X-Mailer: git-send-email 1.7.10.4 +X-Gm-Message-State: + ALoCoQnD7Mjy2EZ3W1auf13damc5cT0bK/+Gj2gLMZehBq45WBfFKDIxJzSwA1NDsFdMK+SI7kxf +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 20:57:30 -0000 + +Add a prefix argument to notmuch-show-stash-message-id to stash thread +id instead of message id. +--- + emacs/notmuch-show.el | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +index 4d6c014..2245b4f 100644 +--- a/emacs/notmuch-show.el ++++ b/emacs/notmuch-show.el +@@ -1901,10 +1901,15 @@ 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 thread-id) ++ "Copy id: query matching the current message to kill-ring. ++ ++If invoked with a prefix argument (or THREAD-ID is non-nil), copy ++thread: query matching the current thread to kill-ring." ++ (interactive "P") ++ (if 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 +