git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Birger Skogeng Pedersen <birger.sp@gmail.com>
To: Pratyush Yadav <me@yadavpratyush.com>
Cc: Git List <git@vger.kernel.org>, Johannes Sixt <j6t@kdbg.org>
Subject: Re: git-gui: automatically move focus to staged file before typing commit message?
Date: Tue, 8 Oct 2019 21:46:44 +0200	[thread overview]
Message-ID: <CAGr--=JM2uTyyymUxHw6vhE9H=bzAO_E_yzrmuOhuuk-td02CA@mail.gmail.com> (raw)
In-Reply-To: <20191008175938.iqibournnxam4r6d@yadavpratyush.com>

Hi Pratyush,

On Tue, Oct 8, 2019 at 7:59 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
> On 07/10/19 06:52PM, Birger Skogeng Pedersen wrote:
> > So I kinda got this working, but only when focusing the commit message widget.
>
> Isn't this the point of your feature? You change the view when focusing
> the commit message widget. I remember you were explicitly against doing
> it as soon as all unstaged files were staged. Did you change your point
> of view on that?

Yes, kindof. Sorry for not being more clear about the intent.
I would prefer that the automatic selection of a staged file happens
also when adding files while the Commit Message widget is in focused.
For instance, if the user focuses the Commit Message widget and then
hits CTRL/CMD+i a staged file should be selected (if it isn't
already).

> > I did not manage to get it working when invoking "do_add_all", (e.g.
> > when pressing CTRL/CMD+i). I added this:
> >
> > bind $ui_comm <$M1B-Key-i> {do_add_all;select_staged_file;break}
> > bind $ui_comm <$M1B-Key-I> {do_add_all;select_staged_file;break}
> >
> > But it seems that the "select_staged_file" procedure is invoked
> > _before_ "do_add_all" finishes. So that's not working. All changes
> > gets staged, but no staged change is selected.
>
> Hmm, that shouldn't happen. select_staged_file should be executed
> _after_ do_add_all, not before. I haven't looked into your patches yet
> though.

I don't understand why it doesn't work. I'll play around some more with it.

> > And I'm quite stuck. Do I send the unfinished patch, so maybe I can
> > get some advice? Or is it better to just wait until I have the perfect
> > patch ready?
>
> If you are stuck on something, and want to share the WIP feature to get
> help/comments, you should mark your patches as "RFC" (Request For
> Comments). This can be done by passing the option '-rfc' to
> `git-format-patch`. This will make your subject prefix to "RFC PATCH"
> instead of just "PATCH".

Sorry for not doing that, I'll take not and do that next time.

Thanks!
Birger

      reply	other threads:[~2019-10-08 19:47 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-14 12:24 git-gui: automatically move focus to staged file before typing commit message? Birger Skogeng Pedersen
2019-09-14 21:15 ` Pratyush Yadav
2019-09-14 21:26   ` Johannes Sixt
2019-09-14 21:27   ` Pratyush Yadav
2019-09-15  7:55     ` Birger Skogeng Pedersen
2019-09-16 18:01       ` Pratyush Yadav
2019-09-26 18:33         ` Birger Skogeng Pedersen
2019-09-26 19:30           ` Pratyush Yadav
2019-09-26 21:17             ` Birger Skogeng Pedersen
2019-10-07 16:52               ` Birger Skogeng Pedersen
2019-10-07 17:11                 ` [PATCH 1/2] git-gui: implement proc select_path_in_widget Birger Skogeng Pedersen
2019-10-07 17:11                   ` [PATCH 2/2] git-gui: select staged on ui_comm focus Birger Skogeng Pedersen
2019-10-16 19:25                     ` Pratyush Yadav
2019-10-13 20:21                   ` [PATCH 1/2] git-gui: implement proc select_path_in_widget Pratyush Yadav
2019-10-15 10:51                     ` Birger Skogeng Pedersen
2019-10-16 19:28                       ` Pratyush Yadav
2019-10-17  5:08                         ` Birger Skogeng Pedersen
2019-10-17  5:33                           ` Johannes Sixt
2019-10-17  6:54                             ` Birger Skogeng Pedersen
2019-10-17 18:28                           ` Pratyush Yadav
2019-10-08 17:59                 ` git-gui: automatically move focus to staged file before typing commit message? Pratyush Yadav
2019-10-08 19:46                   ` Birger Skogeng Pedersen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGr--=JM2uTyyymUxHw6vhE9H=bzAO_E_yzrmuOhuuk-td02CA@mail.gmail.com' \
    --to=birger.sp@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=me@yadavpratyush.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).