From: David Bremner Date: Sat, 25 Oct 2014 07:49:59 +0000 (+0200) Subject: [PATCH] test/emacs: force *Messages* buffer to be writable X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fc92fc805cab7225965afa45a8024c5ae4cc9b13;p=notmuch-archives.git [PATCH] test/emacs: force *Messages* buffer to be writable --- diff --git a/71/a658f781a4fde999943175251ea8e544a39536 b/71/a658f781a4fde999943175251ea8e544a39536 new file mode 100644 index 000000000..e6c2f2696 --- /dev/null +++ b/71/a658f781a4fde999943175251ea8e544a39536 @@ -0,0 +1,95 @@ +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 6539E431FC9 + for ; Sat, 25 Oct 2014 00:50:20 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 0Bkl10Z9ZSW1 for ; + Sat, 25 Oct 2014 00:50:16 -0700 (PDT) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 44CF0431FBD + for ; Sat, 25 Oct 2014 00:50:16 -0700 (PDT) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1Xhw70-0007Tr-Tq; Sat, 25 Oct 2014 04:50:10 -0300 +Received: (nullmailer pid 13174 invoked by uid 1000); Sat, 25 Oct 2014 + 07:50:05 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [PATCH] test/emacs: force *Messages* buffer to be writable +Date: Sat, 25 Oct 2014 09:49:59 +0200 +Message-Id: <1414223399-13128-1-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.1.1 +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: Sat, 25 Oct 2014 07:50:20 -0000 + +In emacs 24.4 the messages buffer starts being read-only, which kills +these tests. This seems to be the point of the variable +inihibit-read-only, which has existed at least since emacs 21. +--- + test/T310-emacs.sh | 6 ++++-- + test/T450-emacs-show.sh | 3 ++- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh +index ac966e5..af6b212 100755 +--- a/test/T310-emacs.sh ++++ b/test/T310-emacs.sh +@@ -877,7 +877,8 @@ exit 1 + EOF + chmod a+x notmuch_fail + test_emacs "(let ((notmuch-command \"$PWD/notmuch_fail\")) +- (with-current-buffer \"*Messages*\" (erase-buffer)) ++ (with-current-buffer \"*Messages*\" ++ (let ((inhibit-read-only t)) (erase-buffer))) + (with-current-buffer (get-buffer-create \"*Notmuch errors*\") + (erase-buffer)) + (notmuch-search \"tag:inbox\") +@@ -909,7 +910,8 @@ exit 0 + EOF + chmod a+x notmuch_fail + test_emacs "(let ((notmuch-command \"$PWD/notmuch_fail\")) +- (with-current-buffer \"*Messages*\" (erase-buffer)) ++ (with-current-buffer \"*Messages*\" ++ (let ((inhibit-read-only t)) (erase-buffer))) + (with-current-buffer (get-buffer-create \"*Notmuch errors*\") + (erase-buffer)) + (notmuch-search \"tag:inbox\") +diff --git a/test/T450-emacs-show.sh b/test/T450-emacs-show.sh +index 2a3a535..bfcd5ef 100755 +--- a/test/T450-emacs-show.sh ++++ b/test/T450-emacs-show.sh +@@ -173,7 +173,8 @@ exit 1 + EOF + chmod a+x notmuch_fail + test_emacs "(let ((notmuch-command \"$PWD/notmuch_fail\")) +- (with-current-buffer \"*Messages*\" (erase-buffer)) ++ (with-current-buffer \"*Messages*\" ++ (let ((inhibit-read-only t)) (erase-buffer))) + (condition-case err + (notmuch-show \"*\") + (error (message \"%s\" (second err)))) +-- +2.1.1 +