[PATCH] emacs: Avoid unnecessary markers.
authorAustin Clements <amdragon@MIT.EDU>
Mon, 21 Nov 2011 01:07:02 +0000 (20:07 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:40:20 +0000 (09:40 -0800)
9c/ceefa741d91f06f258d3b176f403a46a9c92de [new file with mode: 0644]

diff --git a/9c/ceefa741d91f06f258d3b176f403a46a9c92de b/9c/ceefa741d91f06f258d3b176f403a46a9c92de
new file mode 100644 (file)
index 0000000..aa8d13d
--- /dev/null
@@ -0,0 +1,104 @@
+Return-Path: <amthrax@awakening.csail.mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 371DC429E25\r
+       for <notmuch@notmuchmail.org>; Sun, 20 Nov 2011 17:04:40 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 6VJG0PyrpLfd for <notmuch@notmuchmail.org>;\r
+       Sun, 20 Nov 2011 17:04:39 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU\r
+       [18.9.25.14])\r
+       by olra.theworths.org (Postfix) with ESMTP id A6F38431FD0\r
+       for <notmuch@notmuchmail.org>; Sun, 20 Nov 2011 17:04:39 -0800 (PST)\r
+X-AuditID: 1209190e-b7f4a6d0000008e5-dc-4ec9a3a6b070\r
+Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
+       by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 91.91.02277.6A3A9CE4; Sun, 20 Nov 2011 20:04:38 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id pAL14bLd002238; \r
+       Sun, 20 Nov 2011 20:04:37 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pAL14ala014947\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Sun, 20 Nov 2011 20:04:37 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amthrax@awakening.csail.mit.edu>)\r
+       id 1RSILf-0002IA-N5; Sun, 20 Nov 2011 20:07:03 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] emacs: Avoid unnecessary markers.\r
+Date: Sun, 20 Nov 2011 20:07:02 -0500\r
+Message-Id: <1321837622-8755-1-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.7.2\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFprFIsWRmVeSWpSXmKPExsUixCmqrbts8Uk/g4kbpC2u35zJ7MDo8WzV\r
+       LeYAxigum5TUnMyy1CJ9uwSujPubV7IXXOCpWL/6H2MD41KuLkZODgkBE4k5LTeYIWwxiQv3\r
+       1rN1MXJxCAnsY5TYeH0plLOBUeLeya+MIFVCAieZJB5M54ZIbGaUuHN6KytIgk1AQ2Lb/uVg\r
+       RSIC0hI7784GinNwMAuoSfzpUgEJCwsYScxdfQFsG4uAqsSaaRvAbF4Be4lnG++yQVyhIDFj\r
+       yhXGCYy8CxgZVjHKpuRW6eYmZuYUpybrFicn5uWlFuka6+VmluilppRuYgQHgSTfDsavB5UO\r
+       MQpwMCrx8AoGnvATYk0sK67MPcQoycGkJMq7Y9FJPyG+pPyUyozE4oz4otKc1OJDjBIczEoi\r
+       vDnOQDnelMTKqtSifJiUNAeLkjjv6h0OfkIC6YklqdmpqQWpRTBZGQ4OJQnefyBDBYtS01Mr\r
+       0jJzShDSTBycIMN5gIY/BKnhLS5IzC3OTIfIn2JUlBKHSAiAJDJK8+B6YVH6ilEc6BVhXrWZ\r
+       QFU8wAiH634FNJgJaPC0tSdABpckIqSkGhg57kW6VFS8spSIaUzvZg1WvnF4wXvhemYN++B/\r
+       3KrX3L3dD1x/qF+U6KCqPMHYe8r0rESmtRrqJhstN0uI6ocfvS9SVt90l2HfVvcvK2eG1Px1\r
+       XhTedo7p9zJLo80fN+5cfXOFtMhWoRVc35uOn12s4CN451lxztMkxx75P8wTo5fnn28OZldi\r
+       Kc5INNRiLipOBAC2TekFrQIAAA==\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 21 Nov 2011 01:04:40 -0000\r
+\r
+This is just cleanup.  These markers are all immediately resolved to\r
+points by Emacs, so using markers here is just unncessary overhead.\r
+---\r
+I originally did this for performance, since Emacs has to scan all\r
+un-GC'd markers on every buffer change, but it turns out to matter\r
+notmuch.\r
+\r
+ emacs/notmuch.el |   10 +++++-----\r
+ 1 files changed, 5 insertions(+), 5 deletions(-)\r
+\r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index a8e4d62..f15a75b 100644\r
+--- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -805,12 +805,12 @@ non-authors is found, assume that all of the authors match."\r
+                     (goto-char (point-max))\r
+                     (if (/= (match-beginning 1) line)\r
+                         (insert (concat "Error: Unexpected output from notmuch search:\n" (substring string line (match-beginning 1)) "\n")))\r
+-                    (let ((beg (point-marker)))\r
++                    (let ((beg (point)))\r
+                       (notmuch-search-show-result date count authors subject tags)\r
+-                      (notmuch-search-color-line beg (point-marker) tag-list)\r
+-                      (put-text-property beg (point-marker) 'notmuch-search-thread-id thread-id)\r
+-                      (put-text-property beg (point-marker) 'notmuch-search-authors authors)\r
+-                      (put-text-property beg (point-marker) 'notmuch-search-subject subject)\r
++                      (notmuch-search-color-line beg (point) tag-list)\r
++                      (put-text-property beg (point) 'notmuch-search-thread-id thread-id)\r
++                      (put-text-property beg (point) 'notmuch-search-authors authors)\r
++                      (put-text-property beg (point) 'notmuch-search-subject subject)\r
+                       (if (string= thread-id notmuch-search-target-thread)\r
+                           (progn\r
+                             (set 'found-target beg)\r
+-- \r
+1.7.7.2\r
+\r