threads / discuss / 33613

Zile as git core editor?

Subject: Zile as git core editor?

## tl;dr

7 messages between Apr 26, 2013 and Apr 26, 2013.

replies: 6people: 4as markdown or json

Thorsten Jolitz· Apr 26, 2013, 07:39 UTC · lore
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· Apr 26, 2013, 08:28 UTC · re: Thorsten Jolitz · lore

Re: Zile as git core editor?

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:
Show 23 quoted lines
>
> 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· Apr 26, 2013, 08:37 UTC · re: Tay Ray Chuan · lore

Re: Zile as git core editor?

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.

Show 28 quoted lines
> --
> 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· Apr 26, 2013, 08:57 UTC · re: Thorsten Jolitz · lore

Re: Zile as git core editor?

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· Apr 26, 2013, 16:08 UTC · re: Matthieu Moy · lore

Re: Zile as git core editor?

Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 16 quoted lines
> 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· Apr 26, 2013, 17:00 UTC · re: Thorsten Jolitz · lore

Re: Zile as git core editor?

Thorsten Jolitz <tjolitz@gmail.com> writes:
Show 10 quoted lines
>  ... 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· Apr 26, 2013, 18:33 UTC · re: Junio C Hamano · lore

Re: Zile as git core editor?

Junio C Hamano <gitster@pobox.com> writes:
Show 20 quoted lines
> 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

← back to recent threads