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 149F9429E25 for ; Sun, 20 Nov 2011 16:58:34 -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 5dOyJ8LAxOBg for ; Sun, 20 Nov 2011 16:58:33 -0800 (PST) Received: from dmz-mailsec-scanner-2.mit.edu (DMZ-MAILSEC-SCANNER-2.MIT.EDU [18.9.25.13]) by olra.theworths.org (Postfix) with ESMTP id 86888431FD0 for ; Sun, 20 Nov 2011 16:58:33 -0800 (PST) X-AuditID: 1209190d-b7f726d0000008d1-ed-4ec9a238450c Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP id 40.14.02257.832A9CE4; Sun, 20 Nov 2011 19:58:32 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id pAL0wVll015948; Sun, 20 Nov 2011 19:58:31 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pAL0wUVu014350 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Sun, 20 Nov 2011 19:58:31 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1RSIFl-0002GX-88; Sun, 20 Nov 2011 20:00:57 -0500 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH] emacs: Don't record undo information for search or show buffers. Date: Sun, 20 Nov 2011 20:00:55 -0500 Message-Id: <1321837255-8669-1-git-send-email-amdragon@mit.edu> X-Mailer: git-send-email 1.7.7.2 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprJIsWRmVeSWpSXmKPExsUixCmqrGux6KSfwZYvPBbXb85kdmD0eLbq FnMAYxSXTUpqTmZZapG+XQJXRv+Lg2wFB7gqZh7kbGA8yNHFyMkhIWAicWTmCjYIW0ziwr31 QDYXh5DAPkaJt49bGCGcDYwS2/9MA6sSEjjJJPHgsRdEYjOjxIw5X5lAEmwCGhLb9i9nBLFF BKQldt6dzdrFyMHBLKAm8adLBSQsLBAoMWvmJ7ASFgFViTfrvrGC2LwC9hKdP/YyQ1yhIDFj yhXGCYy8CxgZVjHKpuRW6eYmZuYUpybrFicn5uWlFuka6eVmluilppRuYgSHgCTvDsZ3B5UO MQpwMCrx8AoHnvATYk0sK67MPcQoycGkJMrbs/CknxBfUn5KZUZicUZ8UWlOavEhRgkOZiUR 3hxnoBxvSmJlVWpRPkxKmoNFSZy3cIeDn5BAemJJanZqakFqEUxWhoNDSYJ39QygRsGi1PTU irTMnBKENBMHJ8hwHqDhO0AW8xYXJOYWZ6ZD5E8xKkqJ86aAJARAEhmleXC9sBh9xSgO9Iow r9pMoCoeYHzDdb8CGswENHja2hMgg0sSEVJSDYwl2UX2Vnem7I0/eOt5/I9/tdtfzTml7Xss xrJjymzdE1vlQl+UCmrfLNlrnL+FOSfFZU/E4qMWcpPtFk9rtPXwiSjJ/2f7Vzv795eva0Jc BAW3l3WbT+KuWrbk0U+XNX817tlz+e3w1tqzLGzqd4EtWY9TN4YpX9M5nv69fn/hcfUnujan FSKUWIozEg21mIuKEwFen4CXrAIAAA== 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 00:58:34 -0000 There's no reason to record undo information for read-only, programmatically-constructed buffers. The undo list just chews up memory keeping track of our calls to insert. --- emacs/notmuch-show.el | 2 ++ emacs/notmuch.el | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index d5c95d8..7689867 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -843,6 +843,8 @@ buffer." (inhibit-read-only t)) (switch-to-buffer buffer) (notmuch-show-mode) + ;; Don't track undo information for this buffer + (set 'buffer-undo-list t) (setq notmuch-show-thread-id thread-id) (setq notmuch-show-parent-buffer parent-buffer) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index c1827cc..a8e4d62 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -920,6 +920,8 @@ The optional parameters are used as follows: (let ((buffer (get-buffer-create (notmuch-search-buffer-title query)))) (switch-to-buffer buffer) (notmuch-search-mode) + ;; Don't track undo information for this buffer + (set 'buffer-undo-list t) (set 'notmuch-search-query-string query) (set 'notmuch-search-oldest-first oldest-first) (set 'notmuch-search-target-thread target-thread) -- 1.7.7.2