git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] git-gui: Handle Ctrl+BS & Ctrl+Del in the commit msg
@ 2019-02-11 21:42 Ismael Luceno
  2019-02-12  0:29 ` brian m. carlson
  0 siblings, 1 reply; 3+ messages in thread
From: Ismael Luceno @ 2019-02-11 21:42 UTC (permalink / raw)
  To: git; +Cc: Pat Thoyts, Ismael Luceno

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
---
 git-gui.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/git-gui.sh b/git-gui.sh
index 5bc21b878d41..e00d9a345294 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -3788,6 +3788,8 @@ bind $ui_comm <$M1B-Key-KP_Subtract> {show_less_context;break}
 bind $ui_comm <$M1B-Key-equal> {show_more_context;break}
 bind $ui_comm <$M1B-Key-plus> {show_more_context;break}
 bind $ui_comm <$M1B-Key-KP_Add> {show_more_context;break}
+bind $ui_comm <Control-Key-BackSpace> {%W delete {insert -1 chars wordstart} insert;break}
+bind $ui_comm <Control-Key-Delete> {%W delete insert {insert wordend};break}
 
 bind $ui_diff <$M1B-Key-x> {tk_textCopy %W;break}
 bind $ui_diff <$M1B-Key-X> {tk_textCopy %W;break}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] git-gui: Handle Ctrl+BS & Ctrl+Del in the commit msg
  2019-02-11 21:42 [PATCH] git-gui: Handle Ctrl+BS & Ctrl+Del in the commit msg Ismael Luceno
@ 2019-02-12  0:29 ` brian m. carlson
       [not found]   ` <9EBA7C5F-4D59-45EE-B2E6-E7E76D7221EC@iodev.co.uk>
  0 siblings, 1 reply; 3+ messages in thread
From: brian m. carlson @ 2019-02-12  0:29 UTC (permalink / raw)
  To: Ismael Luceno; +Cc: git, Pat Thoyts

[-- Attachment #1: Type: text/plain, Size: 1400 bytes --]

On Mon, Feb 11, 2019 at 10:42:03PM +0100, Ismael Luceno wrote:
> Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
> ---
>  git-gui.sh | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/git-gui.sh b/git-gui.sh
> index 5bc21b878d41..e00d9a345294 100755
> --- a/git-gui.sh
> +++ b/git-gui.sh
> @@ -3788,6 +3788,8 @@ bind $ui_comm <$M1B-Key-KP_Subtract> {show_less_context;break}
>  bind $ui_comm <$M1B-Key-equal> {show_more_context;break}
>  bind $ui_comm <$M1B-Key-plus> {show_more_context;break}
>  bind $ui_comm <$M1B-Key-KP_Add> {show_more_context;break}
> +bind $ui_comm <Control-Key-BackSpace> {%W delete {insert -1 chars wordstart} insert;break}
> +bind $ui_comm <Control-Key-Delete> {%W delete insert {insert wordend};break}

I don't use git-gui and I don't understand TCL, but I was interested to
learn more about these key bindings in case other programs use them and
they might be useful in my day-to-day life.

However, your commit message doesn't include a body, so it isn't clear
to me what this change does and why these are useful keys for git-gui to
understand. Are they common among many programs? What do they do? Why
did we pick these keys instead of others?

Perhaps you could send a v2 with a more comprehensive commit message
that provides some of these answers.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] git-gui: Handle Ctrl+BS & Ctrl+Del in the commit msg
       [not found]   ` <9EBA7C5F-4D59-45EE-B2E6-E7E76D7221EC@iodev.co.uk>
@ 2019-02-13  3:35     ` brian m. carlson
  0 siblings, 0 replies; 3+ messages in thread
From: brian m. carlson @ 2019-02-13  3:35 UTC (permalink / raw)
  To: ismael; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1242 bytes --]

On Tue, Feb 12, 2019 at 12:24:40PM +0100, ismael@iodev.co.uk wrote:
> These bindings delete the word before and after the cursor
> respectively. It didn't seem necessary to describe the thing in detail
> because it has been commonplace for more than 30 years AFAICT.

I'm sure that these key bindings are familiar to you and probably to a
lot of people, but I wasn't aware of them. I imagine there might be
other people who aren't aware of them as well. The commit message is an
opportunity for you to explain both what your patch does and argue why
it's valuable.

It's also rather uncommon for commit messages in this project to lack a
body; we typically prefer to say at least a few sentences about why
we've chosen to make a change, even preferring to perhaps state some of
the more obvious things just for clarity's sake to assist other people
(and future us) in understanding what's going on.

This isn't me trying to be difficult, but rather to help you get your
patch in a state that's most likely to be accepted. It's common here to
do a couple of revisions of a patch, incorporating reviewers' comments
and polishing along the way.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-13  3:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11 21:42 [PATCH] git-gui: Handle Ctrl+BS & Ctrl+Del in the commit msg Ismael Luceno
2019-02-12  0:29 ` brian m. carlson
     [not found]   ` <9EBA7C5F-4D59-45EE-B2E6-E7E76D7221EC@iodev.co.uk>
2019-02-13  3:35     ` brian m. carlson

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).