test/emacs: force *Messages* buffer to be writable

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.
This commit is contained in:
David Bremner 2014-10-25 08:53:29 +02:00
parent b4278d4e8e
commit 1de97ee586
2 changed files with 6 additions and 3 deletions

View file

@ -877,7 +877,8 @@ exit 1
EOF EOF
chmod a+x notmuch_fail chmod a+x notmuch_fail
test_emacs "(let ((notmuch-command \"$PWD/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*\") (with-current-buffer (get-buffer-create \"*Notmuch errors*\")
(erase-buffer)) (erase-buffer))
(notmuch-search \"tag:inbox\") (notmuch-search \"tag:inbox\")
@ -909,7 +910,8 @@ exit 0
EOF EOF
chmod a+x notmuch_fail chmod a+x notmuch_fail
test_emacs "(let ((notmuch-command \"$PWD/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*\") (with-current-buffer (get-buffer-create \"*Notmuch errors*\")
(erase-buffer)) (erase-buffer))
(notmuch-search \"tag:inbox\") (notmuch-search \"tag:inbox\")

View file

@ -173,7 +173,8 @@ exit 1
EOF EOF
chmod a+x notmuch_fail chmod a+x notmuch_fail
test_emacs "(let ((notmuch-command \"$PWD/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 (condition-case err
(notmuch-show \"*\") (notmuch-show \"*\")
(error (message \"%s\" (second err)))) (error (message \"%s\" (second err))))