且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

用于emacs的egg git接口,提交消息为空

更新时间:2022-10-22 09:24:51

问题解决了,虽然我不太明白。



我不得不改变一些鸡蛋的选择。在某些情况下,似乎没有找到 git.exe 的字符串。



我做了什么:

  Mx customize-group< RET>鸡蛋< RET> 

然后将 Egg git命令更改为 git.exe 包括其完整路径工作。



这是有点奇怪,因为: / p>


  • egg可以使用git生成状态缓冲区

  • git的路径在我的路径envvar

  • 信息中止提交...来自git,我相信。



在学习如何调试elisp之后,我发现标记应该显示提交消息的限制在函数 egg-log- msg-commit



在其他地方,这些标记包含提交消息的字符索引,但不存在。


I'm using egg (emacs got git) as git interface in emacs. Whenever I try to achieve a commit --amend, I receive a "GIT-COMMIT-AMEND> Aborting commit due to empty commit message".

This is what i do:

C-u C-x v c

Then the commit buffer appears, with the message of my previous commit.

Then upon C-c C-c I get the message stated above: empty commit message.

I think I've had this behaviour with regular commits (as in not amend) before, but can't remember or find how I solved it.

I tried editing the message (adding a space somewhere). No work.

I tried saving the buffer before committing, that wouldn't work either (since C-c C-c is not active in another buffer than the commit buffer).

Any clue?

Problem solved, although I do not quite understand.

I had to change some options for egg. It didn't seem to have the correct string to find git.exe in some cases.

What I did:

M-x customize-group <RET> egg <RET>

then changing Egg git command to git.exe including its full path worked.

This is a bit strange since:

  • egg could use git to generate the status buffer
  • the path to git is in my path envvar
  • the message "Aborting commit..." comes from git, I believe.

After learning how to debug elisp, I found that the markers supposed to show the limits of the commit message were both nil in the function egg-log-msg-commit.

At other places, these markers hold the character indexes for the commit message, but not there.