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 51C176DE11A3 for ; Thu, 6 Oct 2016 14:59:06 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.507 X-Spam-Level: X-Spam-Status: No, score=0.507 tagged_above=-999 required=5 tests=[AWL=-0.623, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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 fX4XxObk6x1t for ; Thu, 6 Oct 2016 14:59:05 -0700 (PDT) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by arlo.cworth.org (Postfix) with ESMTPS id DB5C06DE1149 for ; Thu, 6 Oct 2016 14:59:04 -0700 (PDT) Received: by mail-wm0-f65.google.com with SMTP id f193so5447770wmg.2 for ; Thu, 06 Oct 2016 14:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jKu66VlSDsSSByJiw+WhxExxqW3wttRgxICz5eTiNYs=; b=VFlIeyeoU4yVdjsmiYaoGF++oY/kLkrjd/biIQ/95dj2cHszRPyWR5Yyoo2ywRuR8d OIP8b6Mh8y7f9CVUTyeyFpziW45AMfNh0CQm2tKEcW2P1TC3J4enavZKM6DrKflx7INI 3FnQRhV2lrh5bG+tBL1DRcOQuh6Punk9/qOFETmwCHaWcPqPRdWNaz63/r23ZwWyVg3m PktTJSlpFwzO5F801AdytSAO0eIlm6Zl0FQXy8f3yCr4OMwNiu/sjnlAS6sD0ARvgME9 DCdYWs8KCDczOD86F6oBQUM55Abtj1IfMkBIAzfW6DX7/cAOd+puLogOSVx/5f0zsACB n32Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jKu66VlSDsSSByJiw+WhxExxqW3wttRgxICz5eTiNYs=; b=TMOdZZllaQNtJ5LEWmJG8sMIhutRvtlmhde/DNUOBsXdFB7Q+7JvcNTDJJVxJ+Qj5c GEgdSs/rmm9bbLB1OBXgkmFMZ0l/w257DR55JNjtOF91NiKKuBC4hCBzHWs0aVAQGRf8 ndsB5IV55yQCF/Z20ojJbDbvznYwecd9YSl9DiX8TCnI6UukrqtC6In07h4rZkk2RBn7 tVD0V1VmhXKJsX+BiQYz5ONDrdgW3Xkt//bvn/AEvJYosMC1C05OA+hNSBCFnpAB09ll X+J8a2IXxflQVyLJmAfMICxW9v3Dok0Y+kNrVULPqL0I2M+bI1FlnGE+ce3emtC+q5oY cUaQ== X-Gm-Message-State: AA6/9RlH7z/pfI49ICuNQxBMR4oAYz7jfR07UGhyG6hzLgb6aKDv5spipzYNeiqyg5W1HA== X-Received: by 10.28.67.133 with SMTP id q127mr4145069wma.31.1475791143283; Thu, 06 Oct 2016 14:59:03 -0700 (PDT) Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) by smtp.gmail.com with ESMTPSA id w203sm37145650wmw.7.2016.10.06.14.59.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Oct 2016 14:59:02 -0700 (PDT) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH] emacs: tag-jump: make k binding for the reverse tag change map Date: Thu, 6 Oct 2016 22:59:00 +0100 Message-Id: <1475791140-23657-1-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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 Oct 2016 21:59:06 -0000 Currently, by default k invokes the tag-jump menu, and following it by r invokes the reverse tag change jump menu. This is awkward to type (e.g. k r u for undoing a -unread change). This changes it so that k followed by k invokes the reverse menu. We make the key for the reverse map a variable as that makes it possible for a user to change it by editing their .emacs file. --- I think this is the right solution (suggested by Tomi on irc). Previously it was not possible for the user to configure this binding without some substantial lisp, or patching the source. Best wishes Mark id:1475765990-15031-1-git-send-email-markwalters1009@gmail.com emacs/notmuch-tag.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el index 49662c2..c03027f 100644 --- a/emacs/notmuch-tag.el +++ b/emacs/notmuch-tag.el @@ -485,6 +485,9 @@ begin with a \"+\" or a \"-\". If REVERSE is non-nil, replace all s))) tags)) +(defvar notmuch-tag-jump-reverse-key "k" + "The key in tag-jump to switch to the reverse tag changes.") + (defun notmuch-tag-jump (reverse) "Create a jump menu for tagging operations. @@ -523,9 +526,10 @@ and vice versa." (push (list key name-string `(lambda () (,tag-function ',tag-change))) action-map))) - (push (list "r" (if reverse - "Forward tag changes " - "Reverse tag changes") + (push (list notmuch-tag-jump-reverse-key + (if reverse + "Forward tag changes " + "Reverse tag changes") (apply-partially 'notmuch-tag-jump (not reverse))) action-map) (setq action-map (nreverse action-map)) -- 2.1.4