unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] test: Unset ALTERNATE_EDITOR before running emacsclient
@ 2015-12-28 21:16 Michal Sojka
  2015-12-28 22:29 ` Tomi Ollila
  0 siblings, 1 reply; 5+ messages in thread
From: Michal Sojka @ 2015-12-28 21:16 UTC (permalink / raw)
  To: notmuch

ALTERNATE_EDITOR causes emacsclient to run an alternate editor if the
emacs server is not ready. This can collide with intended
functionality in test-lib.sh.

If the ALTERNATE_EDITOR is set but empty, emacsclient runs emacs
daemon and tries to connect to it. When this happens the emacs run by
test-lib.sh fails to start the server and the subsequent attempts to
use the server fail because the daemon started by emacsclient does not
know about notmuch-test-progn. This leads to test suite failure due to
time out on any emacs test.
---
 test/test-lib.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index 126911f..0f6a6cf 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -1152,6 +1152,7 @@ test_emacs () {
 	rm -f OUTPUT
 	touch OUTPUT
 
+	unset ALTERNATE_EDITOR
 	${TEST_EMACSCLIENT} --socket-name="$EMACS_SERVER" --eval "(notmuch-test-progn $@)"
 }
 
-- 
2.6.4

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

* Re: [PATCH] test: Unset ALTERNATE_EDITOR before running emacsclient
  2015-12-28 21:16 [PATCH] test: Unset ALTERNATE_EDITOR before running emacsclient Michal Sojka
@ 2015-12-28 22:29 ` Tomi Ollila
  2015-12-29  8:52   ` [PATCH v2] " Michal Sojka
  0 siblings, 1 reply; 5+ messages in thread
From: Tomi Ollila @ 2015-12-28 22:29 UTC (permalink / raw)
  To: Michal Sojka, notmuch

On Mon, Dec 28 2015, Michal Sojka <sojkam1@fel.cvut.cz> wrote:

> ALTERNATE_EDITOR causes emacsclient to run an alternate editor if the
> emacs server is not ready. This can collide with intended
> functionality in test-lib.sh.
>
> If the ALTERNATE_EDITOR is set but empty, emacsclient runs emacs
> daemon and tries to connect to it. When this happens the emacs run by
> test-lib.sh fails to start the server and the subsequent attempts to
> use the server fail because the daemon started by emacsclient does not
> know about notmuch-test-progn. This leads to test suite failure due to
> time out on any emacs test.
> ---

Looks good to me -- just that should the unsetting be done in the same
place as (most) other environment variables are handled... in the
region starting from line 64 of that same file.

Tomi


>  test/test-lib.sh | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/test/test-lib.sh b/test/test-lib.sh
> index 126911f..0f6a6cf 100644
> --- a/test/test-lib.sh
> +++ b/test/test-lib.sh
> @@ -1152,6 +1152,7 @@ test_emacs () {
>  	rm -f OUTPUT
>  	touch OUTPUT
>  
> +	unset ALTERNATE_EDITOR
>  	${TEST_EMACSCLIENT} --socket-name="$EMACS_SERVER" --eval "(notmuch-test-progn $@)"
>  }
>  
> -- 
> 2.6.4
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch

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

* [PATCH v2] test: Unset ALTERNATE_EDITOR before running emacsclient
  2015-12-28 22:29 ` Tomi Ollila
@ 2015-12-29  8:52   ` Michal Sojka
  2015-12-29 10:05     ` Tomi Ollila
  2015-12-30 15:30     ` David Bremner
  0 siblings, 2 replies; 5+ messages in thread
From: Michal Sojka @ 2015-12-29  8:52 UTC (permalink / raw)
  To: notmuch

ALTERNATE_EDITOR causes emacsclient to run an alternate editor if the
emacs server is not ready. This can collide with intended
functionality in test-lib.sh.

If the ALTERNATE_EDITOR is set but empty, emacsclient runs emacs
daemon and tries to connect to it. When this happens the emacs run by
test-lib.sh fails to start the server and the subsequent attempts to
use the server fail because the daemon started by emacsclient does not
know about notmuch-test-progn. This leads to test suite failure due to
time out on any emacs test.
---
 test/test-lib.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index 126911f..270c718 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -82,6 +82,9 @@ unset CDPATH
 
 unset GREP_OPTIONS
 
+# For emacsclient
+unset ALTERNATE_EDITOR
+
 # Convenience
 #
 # A regexp to match 5 and 40 hexdigits
-- 
2.6.4

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

* Re: [PATCH v2] test: Unset ALTERNATE_EDITOR before running emacsclient
  2015-12-29  8:52   ` [PATCH v2] " Michal Sojka
@ 2015-12-29 10:05     ` Tomi Ollila
  2015-12-30 15:30     ` David Bremner
  1 sibling, 0 replies; 5+ messages in thread
From: Tomi Ollila @ 2015-12-29 10:05 UTC (permalink / raw)
  To: Michal Sojka, notmuch

On Tue, Dec 29 2015, Michal Sojka <sojkam1@fel.cvut.cz> wrote:

> ALTERNATE_EDITOR causes emacsclient to run an alternate editor if the
> emacs server is not ready. This can collide with intended
> functionality in test-lib.sh.
>
> If the ALTERNATE_EDITOR is set but empty, emacsclient runs emacs
> daemon and tries to connect to it. When this happens the emacs run by
> test-lib.sh fails to start the server and the subsequent attempts to
> use the server fail because the daemon started by emacsclient does not
> know about notmuch-test-progn. This leads to test suite failure due to
> time out on any emacs test.
> ---

LGTM.
Tomi


>  test/test-lib.sh | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/test/test-lib.sh b/test/test-lib.sh
> index 126911f..270c718 100644
> --- a/test/test-lib.sh
> +++ b/test/test-lib.sh
> @@ -82,6 +82,9 @@ unset CDPATH
>  
>  unset GREP_OPTIONS
>  
> +# For emacsclient
> +unset ALTERNATE_EDITOR
> +
>  # Convenience
>  #
>  # A regexp to match 5 and 40 hexdigits
> -- 
> 2.6.4
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch

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

* Re: [PATCH v2] test: Unset ALTERNATE_EDITOR before running emacsclient
  2015-12-29  8:52   ` [PATCH v2] " Michal Sojka
  2015-12-29 10:05     ` Tomi Ollila
@ 2015-12-30 15:30     ` David Bremner
  1 sibling, 0 replies; 5+ messages in thread
From: David Bremner @ 2015-12-30 15:30 UTC (permalink / raw)
  To: Michal Sojka, notmuch

Michal Sojka <sojkam1@fel.cvut.cz> writes:

> ALTERNATE_EDITOR causes emacsclient to run an alternate editor if the
> emacs server is not ready. This can collide with intended
> functionality in test-lib.sh.
>

pushed,

d

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

end of thread, other threads:[~2015-12-30 15:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-28 21:16 [PATCH] test: Unset ALTERNATE_EDITOR before running emacsclient Michal Sojka
2015-12-28 22:29 ` Tomi Ollila
2015-12-29  8:52   ` [PATCH v2] " Michal Sojka
2015-12-29 10:05     ` Tomi Ollila
2015-12-30 15:30     ` 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).