[PATCH] test: Unset ALTERNATE_EDITOR before running emacsclient

Tomi Ollila tomi.ollila at iki.fi
Mon Dec 28 14:29:19 PST 2015


On Mon, Dec 28 2015, Michal Sojka <sojkam1 at 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 at notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch


More information about the notmuch mailing list