Philip Jackson
<[email protected]> writes:

> Hi,
>
> At Wed, 15 Sep 2010 00:58:46 +0300,
> Hannu Koivisto wrote:
>
>> I don't even understand how amending works anymore; what good does
>> it do to enable that _after_ hitting "C-c C-c"?  How can I edit the
>> old message?
>
> I've just read back over this. I was expecting people to use M-p/M-n
> to fetch the message out of the log edit ring and then hit C-c C-c,
> ammend, commit. Is this unreasonable?

Sounds a bit questionable.  This would entail a different kind of
log edit ring than what we have at the moment.  For example, with
the current one: start emacs, start magit, commit, M-p => "Empty
comment ring".  I also wonder what would be the right thing to do
with the log ring if you amend after rewriting, for example.  There
are already annoying problems with the log edit ring related to
rewriting so I'd be cautious of (mis)using it for this purpose as
well.

The current bindings are also reasonably comfortable when you don't
want to change the message.  I do c y C-c C-a C-c C-c all the time
and I can type that with my left hand with no need to lift control but
for c y M-p C-c C-c, even though seemingly shorter, I'd have to use
two hands and switch the modifier.  Actually, it would be even worse
with the reverted interface: c M-p C-c C-c -a c (or something like
that) :(

I would like to propose following, which I believe has the benefits
of the key groups idea while being backwards compatible with the
current interface:

Let's think of *magit-edit-log* as a dialog.  We have already
divided it into two areas, the header and the message, and we can
build on that:

----------- window border -----------------------------------------
Commit al(l): [x]  (A)mend: [x]  (S)ign-off: [x]  Allow (e)mpty: [ ]
Au(t)hor: ________________________ (D)ate: ________________________
-- Commit (m)essage goes below this line: --
My commit message.


----------- window border -----------------------------------------

The upper area could be used in multiple ways:

* You could click toggle buttons using mouse.
* Author field would be like text fields in customize buffers.
* I have put letters in parentheses to indicate key bindings
** C-c C-<letter> would work everywhere in the buffer
*** In case of toggles the binding would, well, toggle
*** In case of text edit fields it would "focus" the field.
** Optionally we could have a different keymap outside of text edit
   fields (including the commit message) so that only <letter>
   would be sufficient.
* We could still have the "Nothing staged.  Commit all unstaged
  changes? (y or n)" question before opening this buffer (as a
  customizable option if necessary).  You'd see your answer in the
  buffer and you could change it.

In fact, I guess you could think of this buffer as a kind of a big
*magit-key* buffer with text editing areas.
   
-- 
Hannu

Reply via email to