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 49194429E25 for ; Sun, 20 Nov 2011 17:11:53 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, 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 zUq5h8meTxoF for ; Sun, 20 Nov 2011 17:11:52 -0800 (PST) Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 9DC8D431FD0 for ; Sun, 20 Nov 2011 17:11:52 -0800 (PST) Received: by bkaq10 with SMTP id q10so6607251bka.26 for ; Sun, 20 Nov 2011 17:11:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type; bh=DMbfqWUY+WSL+8itHxKm5Tg1OZUWOuOL6Rq1Yi19soo=; b=Vo7R9ipeQwvYkKOpXvieVhDOtqlKnxXsnnEja5wvvQOrFOLayIjZzOdsNpgPubooEh WVkYswCedP8fqe+d1lKocseXRFv8lu8KYVHDQqmYpc396hLglpV+RxucT7bUWzFvhZJa OW/aLYuHm5Kpe3mSQL6yd+xeGbiuirnMV+iPo= Received: by 10.204.155.152 with SMTP id s24mr12270373bkw.5.1321837911243; Sun, 20 Nov 2011 17:11:51 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id j9sm5996977bkd.2.2011.11.20.17.11.50 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 20 Nov 2011 17:11:50 -0800 (PST) From: Dmitry Kurochkin To: Austin Clements , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: Avoid unnecessary markers. In-Reply-To: <1321837622-8755-1-git-send-email-amdragon@mit.edu> References: <1321837622-8755-1-git-send-email-amdragon@mit.edu> User-Agent: Notmuch/0.10~rc1+20~gec94ced (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Mon, 21 Nov 2011 05:11:33 +0400 Message-ID: <87aa7qp9dm.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Mon, 21 Nov 2011 01:11:53 -0000 On Sun, 20 Nov 2011 20:07:02 -0500, Austin Clements wrote: > This is just cleanup. These markers are all immediately resolved to > points by Emacs, so using markers here is just unncessary overhead. > --- > I originally did this for performance, since Emacs has to scan all > un-GC'd markers on every buffer change, but it turns out to matter > notmuch. > Again, makes sense and looks good. Regads, Dmitry > emacs/notmuch.el | 10 +++++----- > 1 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/emacs/notmuch.el b/emacs/notmuch.el > index a8e4d62..f15a75b 100644 > --- a/emacs/notmuch.el > +++ b/emacs/notmuch.el > @@ -805,12 +805,12 @@ non-authors is found, assume that all of the authors match." > (goto-char (point-max)) > (if (/= (match-beginning 1) line) > (insert (concat "Error: Unexpected output from notmuch search:\n" (substring string line (match-beginning 1)) "\n"))) > - (let ((beg (point-marker))) > + (let ((beg (point))) > (notmuch-search-show-result date count authors subject tags) > - (notmuch-search-color-line beg (point-marker) tag-list) > - (put-text-property beg (point-marker) 'notmuch-search-thread-id thread-id) > - (put-text-property beg (point-marker) 'notmuch-search-authors authors) > - (put-text-property beg (point-marker) 'notmuch-search-subject subject) > + (notmuch-search-color-line beg (point) tag-list) > + (put-text-property beg (point) 'notmuch-search-thread-id thread-id) > + (put-text-property beg (point) 'notmuch-search-authors authors) > + (put-text-property beg (point) 'notmuch-search-subject subject) > (if (string= thread-id notmuch-search-target-thread) > (progn > (set 'found-target beg) > -- > 1.7.7.2 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch