unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] test/emacs: force *Messages* buffer to be writable
@ 2014-10-25  7:49 David Bremner
  2014-10-25  8:05 ` [PATCH] test: kill '"filename": "signature.asc"' from json output David Bremner
  2014-10-25  8:37 ` [PATCH] test/emacs: force *Messages* buffer to be writable Tomi Ollila
  0 siblings, 2 replies; 4+ messages in thread
From: David Bremner @ 2014-10-25  7:49 UTC (permalink / raw)
  To: notmuch

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] test: kill '"filename": "signature.asc"' from json output
  2014-10-25  7:49 [PATCH] test/emacs: force *Messages* buffer to be writable David Bremner
@ 2014-10-25  8:05 ` David Bremner
  2014-10-25  8:37 ` [PATCH] test/emacs: force *Messages* buffer to be writable Tomi Ollila
  1 sibling, 0 replies; 4+ messages in thread
From: David Bremner @ 2014-10-25  8:05 UTC (permalink / raw)
  To: notmuch

This starts to appear with emacs24.4, so we can't easily have it in
our expected output.
---
 test/test-lib.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index 17deaab..72559cc 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -690,6 +690,7 @@ notmuch_json_show_sanitize ()
     sed \
 	-e 's|"id": "[^"]*",|"id": "XXXXX",|g' \
 	-e 's|"Date": "Fri, 05 Jan 2001 [^"]*0000"|"Date": "GENERATED_DATE"|g' \
+	-e 's|"filename": "signature.asc",||g' \
 	-e 's|"filename": "/[^"]*",|"filename": "YYYYY",|g' \
 	-e 's|"timestamp": 97.......|"timestamp": 42|g'
 }
-- 
2.1.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] test/emacs: force *Messages* buffer to be writable
  2014-10-25  7:49 [PATCH] test/emacs: force *Messages* buffer to be writable David Bremner
  2014-10-25  8:05 ` [PATCH] test: kill '"filename": "signature.asc"' from json output David Bremner
@ 2014-10-25  8:37 ` Tomi Ollila
  2014-10-25 17:23   ` David Bremner
  1 sibling, 1 reply; 4+ messages in thread
From: Tomi Ollila @ 2014-10-25  8:37 UTC (permalink / raw)
  To: David Bremner, notmuch

On Sat, Oct 25 2014, David Bremner <david@tethera.net> wrote:

> 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.

series LGTM

Tomi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] test/emacs: force *Messages* buffer to be writable
  2014-10-25  8:37 ` [PATCH] test/emacs: force *Messages* buffer to be writable Tomi Ollila
@ 2014-10-25 17:23   ` David Bremner
  0 siblings, 0 replies; 4+ messages in thread
From: David Bremner @ 2014-10-25 17:23 UTC (permalink / raw)
  To: Tomi Ollila, notmuch

Tomi Ollila <tomi.ollila@iki.fi> writes:

> On Sat, Oct 25 2014, David Bremner <david@tethera.net> wrote:
>
>> 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.
>
> series LGTM

These two patches were pushed, released, and generally spread all over
the planet.

d

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-25 17:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-25  7:49 [PATCH] test/emacs: force *Messages* buffer to be writable David Bremner
2014-10-25  8:05 ` [PATCH] test: kill '"filename": "signature.asc"' from json output David Bremner
2014-10-25  8:37 ` [PATCH] test/emacs: force *Messages* buffer to be writable Tomi Ollila
2014-10-25 17:23   ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).