test/emacs: force *Messages* buffer to be writable
authorDavid Bremner <david@tethera.net>
Sat, 25 Oct 2014 06:53:29 +0000 (08:53 +0200)
committerDavid Bremner <david@tethera.net>
Sat, 25 Oct 2014 08:39:07 +0000 (10:39 +0200)
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
test/T450-emacs-show.sh

index ac966e525a04af8f88daabf618cf7af9ef08afd5..af6b21265fa035e6710fa246a12d9cbb5d5b3cd9 100755 (executable)
@@ -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\")
index 2a3a5356303a89ccfad1efe26f04bb2bf3dbbfe1..bfcd5efedaf9f409d37aa75c36eaddb668a2cc64 100755 (executable)
@@ -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))))