From aa09cc09e65c2bda5d4e20f84b4db707f9008e35 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Fri, 13 Jul 2012 20:45:19 +2000 Subject: [PATCH] [PATCH 7/7] emacs: Fix navigation of multi-line search result formats --- f4/c3e6c2524da14781718110efe9fb38dac96052 | 115 ++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 f4/c3e6c2524da14781718110efe9fb38dac96052 diff --git a/f4/c3e6c2524da14781718110efe9fb38dac96052 b/f4/c3e6c2524da14781718110efe9fb38dac96052 new file mode 100644 index 000000000..c2240de27 --- /dev/null +++ b/f4/c3e6c2524da14781718110efe9fb38dac96052 @@ -0,0 +1,115 @@ +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 8DBBF41ED71 + for ; Thu, 12 Jul 2012 17:45:36 -0700 (PDT) +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 GHvV6l6-yN9r for ; + Thu, 12 Jul 2012 17:45:34 -0700 (PDT) +Received: from dmz-mailsec-scanner-4.mit.edu (DMZ-MAILSEC-SCANNER-4.MIT.EDU + [18.9.25.15]) + by olra.theworths.org (Postfix) with ESMTP id 7802741ED72 + for ; Thu, 12 Jul 2012 17:45:30 -0700 (PDT) +X-AuditID: 1209190f-b7f306d0000008b4-9e-4fff6faa0fe2 +Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) + by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP + id D5.91.02228.AAF6FFF4; Thu, 12 Jul 2012 20:45:30 -0400 (EDT) +Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) + by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q6D0jUS9021131; + Thu, 12 Jul 2012 20:45:30 -0400 +Received: from drake.dyndns.org + (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com + [209.6.116.242]) (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q6D0jSIP010706 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Thu, 12 Jul 2012 20:45:29 -0400 (EDT) +Received: from amthrax by drake.dyndns.org with local (Exim 4.77) + (envelope-from ) + id 1SpU0e-0005SE-O7; Thu, 12 Jul 2012 20:45:28 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: [PATCH 7/7] emacs: Fix navigation of multi-line search result formats +Date: Thu, 12 Jul 2012 20:45:19 -0400 +Message-Id: <1342140319-19859-8-git-send-email-amdragon@mit.edu> +X-Mailer: git-send-email 1.7.10 +In-Reply-To: <1342140319-19859-1-git-send-email-amdragon@mit.edu> +References: <1342140319-19859-1-git-send-email-amdragon@mit.edu> +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFtrMIsWRmVeSWpSXmKPExsUixG6nrrsq/7+/Qet0YYvrN2cyOzB6PFt1 + izmAMYrLJiU1J7MstUjfLoErY/WEFraC7dwVk/4uZ2lgXM3ZxcjJISFgIjHvyTdGCFtM4sK9 + 9WxdjFwcQgL7GCU2bH4C5WxglOic1MEC4Txikuj9tIUVwpnLKDF17VY2kH42AQ2JbfuXg80S + EZCW2Hl3NlARBwezgJrEny4VkLCwgJ/EjM/7wEpYBFQl5h2/yAJi8wo4SKz+PpMd4gx5iaf3 + +8BGcgo4Smz4coEVxBYCqmk8NpN5AiP/AkaGVYyyKblVurmJmTnFqcm6xcmJeXmpRbomermZ + JXqpKaWbGEFhwynJv4Px20GlQ4wCHIxKPLy/Y//7C7EmlhVX5h5ilORgUhLldckGCvEl5adU + ZiQWZ8QXleakFh9ilOBgVhLhXWcPlONNSaysSi3Kh0lJc7AoifNeTbnpLySQnliSmp2aWpBa + BJOV4eBQkuDlBMaHkGBRanpqRVpmTglCmomDE2Q4D9DwbXkgw4sLEnOLM9Mh8qcYFaXEeS+A + JARAEhmleXC9sLh+xSgO9Iow706QKh5gSoDrfgU0mAlo8Kyf/0AGlyQipKQaGJ0U5fj3nft+ + IbKG03UVe6/Cl8a/Z5ZHRISXBTr9fSPu8ZvdJDrl3Laig48Ef5jo593rjIubc7uh/rnVXfdL + x3ty8v8e3zb9xI2jR0KXb1F4sbbj4YFg9obJh3yn7Z+Tw+IcuXNZcqnUygVGS+8lbbTYJxUz + aebV440nGtb07J+VkVcdprD7SoISS3FGoqEWc1FxIgBHHS6TxgIAAA== +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: Fri, 13 Jul 2012 00:45:37 -0000 + +At this point, the only remaining functions that don't support +multi-line search result formats are the thread navigation functions. +This patch fixes that by rewriting them in terms of +notmuch-search-result-{beginning,end}. +--- + emacs/notmuch.el | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/emacs/notmuch.el b/emacs/notmuch.el +index f32cfb0..2ece97d 100644 +--- a/emacs/notmuch.el ++++ b/emacs/notmuch.el +@@ -287,18 +287,24 @@ For a mouse binding, return nil." + (defun notmuch-search-next-thread () + "Select the next thread in the search results." + (interactive) +- (forward-line 1)) ++ (when (notmuch-search-get-result (notmuch-search-result-end)) ++ (goto-char (notmuch-search-result-end)))) + + (defun notmuch-search-previous-thread () + "Select the previous thread in the search results." + (interactive) +- (forward-line -1)) ++ (if (notmuch-search-get-result) ++ (unless (bobp) ++ (goto-char (notmuch-search-result-beginning (- (point) 1)))) ++ ;; We must be past the end; jump to the last result ++ (notmuch-search-last-thread))) + + (defun notmuch-search-last-thread () + "Select the last thread in the search results." + (interactive) + (goto-char (point-max)) +- (forward-line -2)) ++ (forward-line -2) ++ (goto-char (notmuch-search-result-beginning))) + + (defun notmuch-search-first-thread () + "Select the first thread in the search results." +-- +1.7.10 + -- 2.26.2