# Zile as git core editor?

7 messages from 2013-04-26 to 2013-04-26. Participants: Thorsten Jolitz, Tay Ray Chuan, Matthieu Moy, Junio C Hamano.
Thread: https://gitlist.dev/t/33613

## Thorsten Jolitz, 2013-04-26 07:39

Subject: Zile as git core editor?
Message-ID: <877gjp91w5.fsf@gmail.com>
URL: https://gitlist.dev/e/877gjp91w5.fsf%40gmail.com

```

Hi List, 

after experiencing one crash to many, I'm back to Standard Emacs
(instead of Emacsserver/Emacsclient), thus using 'emacs' (instead of
emacsclient) as git core editor triggers reading my huge init file and
is way to slow.

I would like to use Zile (a small Emacs clone) instead, and although
otherwise it works alright on my system, it does not seem to work as git
core editor. 

Is it possible to use 'git config --global core.editor zile'?

-- 
cheers,
Thorsten

```

## Tay Ray Chuan, 2013-04-26 08:28

Subject: Re: Zile as git core editor?
Message-ID: <CALUzUxpZ9=8aVEMBfFUH2hN5ZkwzKVX31J79MVzkCEGRX++LPw@mail.gmail.com>
URL: https://gitlist.dev/e/CALUzUxpZ9%3D8aVEMBfFUH2hN5ZkwzKVX31J79MVzkCEGRX%2B%2BLPw%40mail.gmail.com
In-Reply-To: <877gjp91w5.fsf@gmail.com>

```
Hi,

Is the GIT_EDITOR or EDITOR environment variable set? They may be
overriding the core.editor setting.

--
Cheers,
Ray Chuan

On Fri, Apr 26, 2013 at 3:39 PM, Thorsten Jolitz <tjolitz@gmail.com> wrote:
>
> Hi List,
>
> after experiencing one crash to many, I'm back to Standard Emacs
> (instead of Emacsserver/Emacsclient), thus using 'emacs' (instead of
> emacsclient) as git core editor triggers reading my huge init file and
> is way to slow.
>
> I would like to use Zile (a small Emacs clone) instead, and although
> otherwise it works alright on my system, it does not seem to work as git
> core editor.
>
> Is it possible to use 'git config --global core.editor zile'?
>
> --
> cheers,
> Thorsten
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

```

## Thorsten Jolitz, 2013-04-26 08:37

Subject: Re: Zile as git core editor?
Message-ID: <87txmt7km9.fsf@gmail.com>
URL: https://gitlist.dev/e/87txmt7km9.fsf%40gmail.com
In-Reply-To: <CALUzUxpZ9=8aVEMBfFUH2hN5ZkwzKVX31J79MVzkCEGRX++LPw@mail.gmail.com>

```
Tay Ray Chuan <rctay89@gmail.com> writes:

Hi,

> Is the GIT_EDITOR or EDITOR environment variable set? They may be
> overriding the core.editor setting.

Actually, EDITOR is set to Zile, so that should not be the problem:

[tj@hostname ~]$ echo $EDITOR
/usr/bin/zile
[tj@hostname ~]$ echo $GIT_EDITOR

[tj@hostname ~]$ 

BTW - would 'git config --global core.editor zile' or 'git config
--global core.editor /usr/bin/zile' the right way to set it (both did
not work)? I can start Zile simply with 'zile' on the command line. 

> --
> Cheers,
> Ray Chuan
>
> On Fri, Apr 26, 2013 at 3:39 PM, Thorsten Jolitz <tjolitz@gmail.com> wrote:
>>
>> Hi List,
>>
>> after experiencing one crash to many, I'm back to Standard Emacs
>> (instead of Emacsserver/Emacsclient), thus using 'emacs' (instead of
>> emacsclient) as git core editor triggers reading my huge init file and
>> is way to slow.
>>
>> I would like to use Zile (a small Emacs clone) instead, and although
>> otherwise it works alright on my system, it does not seem to work as git
>> core editor.
>>
>> Is it possible to use 'git config --global core.editor zile'?
>>
>> --
>> cheers,
>> Thorsten
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe git" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
cheers,
Thorsten

```

## Matthieu Moy, 2013-04-26 08:57

Subject: Re: Zile as git core editor?
Message-ID: <vpqppxhfz3i.fsf@grenoble-inp.fr>
URL: https://gitlist.dev/e/vpqppxhfz3i.fsf%40grenoble-inp.fr
In-Reply-To: <87txmt7km9.fsf@gmail.com>

```
Thorsten Jolitz <tjolitz@gmail.com> writes:

> BTW - would 'git config --global core.editor zile' or 'git config
> --global core.editor /usr/bin/zile' the right way to set it (both did
> not work)? I can start Zile simply with 'zile' on the command line. 

What do you mean by "did not work"? Does the launching fail? Or is
another editor launched?

Try:

GIT_TRACE=true git commit -a

to see what's going on.

BTW, you may also try "emacs -nw -Q" instead of zile.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

```

## Thorsten Jolitz, 2013-04-26 16:08

Subject: Re: Zile as git core editor?
Message-ID: <87ppxh6zru.fsf@gmail.com>
URL: https://gitlist.dev/e/87ppxh6zru.fsf%40gmail.com
In-Reply-To: <vpqppxhfz3i.fsf@grenoble-inp.fr>

```
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:

> Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>> BTW - would 'git config --global core.editor zile' or 'git config
>> --global core.editor /usr/bin/zile' the right way to set it (both did
>> not work)? I can start Zile simply with 'zile' on the command line. 
>
> What do you mean by "did not work"? Does the launching fail? Or is
> another editor launched?
>
> Try:
>
> GIT_TRACE=true git commit -a
>
> to see what's going on.
>
> BTW, you may also try "emacs -nw -Q" instead of zile.


Thanks for the tip, I found out that:

1. on the command-line, zile actually works as core editor, but
2. not from within Emacs (Magit) where I tried it

 "emacs -nw -Q" is a nice tip, but I think what I really would like to
 have it that, when I use GNU Emacs Magit and enter a git command 

,-----------------------------
| Run git like this: <command>
`-----------------------------

that calls an editor (e.g. commit --amend), the running Emacs instance
is (re)used and a new buffer is opened for editing (instead of starting
another Emacs instance).

-- 
cheers,
Thorsten

```

## Junio C Hamano, 2013-04-26 17:00

Subject: Re: Zile as git core editor?
Message-ID: <7vtxmtxm4j.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vtxmtxm4j.fsf%40alter.siamese.dyndns.org
In-Reply-To: <87ppxh6zru.fsf@gmail.com>

```
Thorsten Jolitz <tjolitz@gmail.com> writes:

>  ... I think what I really would like to
>  have it that, when I use GNU Emacs Magit and enter a git command 
>
> ,-----------------------------
> | Run git like this: <command>
> `-----------------------------
>
> that calls an editor (e.g. commit --amend), the running Emacs instance
> is (re)used and a new buffer is opened for editing (instead of starting
> another Emacs instance).

Hmph, isn't that what "emacsclient" is for?  I have these

	(setenv "PAGER" "cat")
	(setenv "EDITOR" "emacsclient")
	(server-start)

somewhere in my ~/.emacs to make commands in "M-x compile" behave.

```

## Thorsten Jolitz, 2013-04-26 18:33

Subject: Re: Zile as git core editor?
Message-ID: <87ip396t1m.fsf@gmail.com>
URL: https://gitlist.dev/e/87ip396t1m.fsf%40gmail.com
In-Reply-To: <7vtxmtxm4j.fsf@alter.siamese.dyndns.org>

```
Junio C Hamano <gitster@pobox.com> writes:

> Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>>  ... I think what I really would like to
>>  have it that, when I use GNU Emacs Magit and enter a git command 
>>
>> ,-----------------------------
>> | Run git like this: <command>
>> `-----------------------------
>>
>> that calls an editor (e.g. commit --amend), the running Emacs instance
>> is (re)used and a new buffer is opened for editing (instead of starting
>> another Emacs instance).
>
> Hmph, isn't that what "emacsclient" is for?  I have these
>
> 	(setenv "PAGER" "cat")
> 	(setenv "EDITOR" "emacsclient")
> 	(server-start)
>
> somewhere in my ~/.emacs to make commands in "M-x compile" behave.

I was a big fan of emacsclient and used it quite some time - but finally
those frequent Emacs crashes caused by it were just unbearable, so I
went back to 'normal' use of Emacs.

But maybe you are right - I should run a second Emacs instance as server
only used to popup emacsclient buffers on demand, while doing all the
serious stuff in a non-server instance of Emacs. 

-- 
cheers,
Thorsten

```
