Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Cross-reference commits
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
PJ Weisberg  
View profile  
 More options Apr 19 2011, 1:28 am
From: PJ Weisberg <pjweisb...@gmail.com>
Date: Mon, 18 Apr 2011 22:28:38 -0700
Local: Tues, Apr 19 2011 1:28 am
Subject: Cross-reference commits
A pull request I just sent in:
https://github.com/philjackson/magit/pull/171
a.k.a.
git://github.com/pjweisberg/magit.git link-commits
======================================================================
When a commit message mentions another commit by its SHA1 hash, put
the magit-log-sha1 face on it, and allow the user to visit the
referenced commit by putting the cursor on it and pressing RET. (I
also did the same thing for the two parents in a merge commit.)

It picks out only hashes that actually are other commits. So in the
phrase "Elvis is dead," "dead" would be highlighted if and only if
dead uniquely identifies a commit in the repository. In the phrase
"Zombies are deader than vampires," "dead" would never be highlighted
because of the non-hex digit in the word.

To make it easier to get back to where you were I added "back" and
"forward" buttons to the commit buffer.
======================================================================

Someone mentioned on this list that keybindings were a controversial
topic, so I thought I'd mention this here, because I bound those
"back" and "forward" functions I added to <M-left> and <M-right> in
the commit buffer.  (Firefox and Chrome use those keys for back and
forward.)  However, magit-mode already binds <M-left> to
magit-goto-parent-section.  Does that seem like an acceptable change,
or should I pick a different binding?

-PJ


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Óscar Fuentes  
View profile  
 More options Apr 19 2011, 2:08 am
From: Óscar Fuentes <o...@wanadoo.es>
Date: Tue, 19 Apr 2011 08:08:43 +0200
Local: Tues, Apr 19 2011 2:08 am
Subject: Re: Cross-reference commits

PJ Weisberg <pjweisb...@gmail.com> writes:

[snip]

> Someone mentioned on this list that keybindings were a controversial
> topic, so I thought I'd mention this here, because I bound those
> "back" and "forward" functions I added to <M-left> and <M-right> in
> the commit buffer.  (Firefox and Chrome use those keys for back and
> forward.)  However, magit-mode already binds <M-left> to
> magit-goto-parent-section.  Does that seem like an acceptable change,
> or should I pick a different binding?

<M-right> is forward-word, as usually. <M-left> is not bound to
backward-word on the commit buffer by accident, I guess.

Those bindings are very common on Emacs and I'm sure that there are
people that use them for moving the cursor around. I recommend using
different bindings.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
PJ Weisberg  
View profile  
 More options Apr 19 2011, 2:28 am
From: PJ Weisberg <pjweisb...@gmail.com>
Date: Mon, 18 Apr 2011 23:28:49 -0700
Local: Tues, Apr 19 2011 2:28 am
Subject: Re: Cross-reference commits

On Mon, Apr 18, 2011 at 11:08 PM, Óscar Fuentes <o...@wanadoo.es> wrote:
> PJ Weisberg <pjweisb...@gmail.com> writes:

> [snip]

>> Someone mentioned on this list that keybindings were a controversial
>> topic, so I thought I'd mention this here, because I bound those
>> "back" and "forward" functions I added to <M-left> and <M-right> in
>> the commit buffer.  (Firefox and Chrome use those keys for back and
>> forward.)  However, magit-mode already binds <M-left> to
>> magit-goto-parent-section.  Does that seem like an acceptable change,
>> or should I pick a different binding?

> <M-right> is forward-word, as usually. <M-left> is not bound to
> backward-word on the commit buffer by accident, I guess.

The commit buffer, and all other Magit buffers.

> Those bindings are very common on Emacs and I'm sure that there are
> people that use them for moving the cursor around. I recommend using
> different bindings.

Which bindings would you suggest?

I was actually a little surprised to see Emacs binds M-(left/right) to
the same functions that C-(left/right) are bound to.  If I had to
guess I would think that more people are used to using the C-
versions, since those also work outside of Emacs.  That, and no one
seems to have had a problem with using <M-left> for
magit-goto-parent-section up til now.  (It might actually make more
sense to have magit-goto-parent-section on an "up" key rather than a
"left" key, IMO.)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Moritz Bunkus  
View profile  
 More options Apr 19 2011, 3:06 am
From: Moritz Bunkus <mor...@bunkus.org>
Date: Tue, 19 Apr 2011 09:06:25 +0200
Local: Tues, Apr 19 2011 3:06 am
Subject: Re: Cross-reference commits

Hey,

On Tuesday 19 April 2011 08:28:49 PJ Weisberg wrote:

> Which bindings would you suggest?

help-mode uses C-c C-f and C-c C-b for forward/backward.

> I was actually a little surprised to see Emacs binds M-(left/right) to
> the same functions that C-(left/right) are bound to.

I have M-(left/right) and C-(left/right) do completely different
things (e.g. winner-mode stuff). My point is that everyone has different
needs, and re-binding common movement keys is pretty bad IMHO. Why not
use keys that do similar things in other modes? Helps human brains
remember them.

Regards,
Mosu

  signature.asc
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
PJ Weisberg  
View profile  
 More options Apr 19 2011, 11:28 am
From: PJ Weisberg <pjweisb...@gmail.com>
Date: Tue, 19 Apr 2011 08:28:50 -0700
Local: Tues, Apr 19 2011 11:28 am
Subject: Re: Cross-reference commits

On Tuesday, April 19, 2011, Moritz Bunkus <mor...@bunkus.org> wrote:
> things (e.g. winner-mode stuff). My point is that everyone has different
> needs, and re-binding common movement keys is pretty bad IMHO.

Ok, that's a good point.

> Why not
> use keys that do similar things in other modes? Helps human brains
> remember them.

That's basically the idea I had when I chose M-(left/right).  Firefox,
Chrome, and I'm pretty sure IE use those keys for forward/back.  I
absentmindedly typed Alt+left in Microsoft Visual Something-or-other
and it did what I wanted (switched to the last file I was viewing).  I
figured if people were trying to find the key to go back, that would
be their first guess.

Well, if no one else thinks M-direction is the right choice I can
change to C-c C-(b/f) (and mention them somewhere in the
documentation, since those seem non-obvious to me).  In any case I
should add those bindings for consistency with Help mode.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
PJ Weisberg  
View profile  
 More options Apr 19 2011, 2:26 pm
From: PJ Weisberg <pjweisb...@gmail.com>
Date: Tue, 19 Apr 2011 11:26:50 -0700
Local: Tues, Apr 19 2011 2:26 pm
Subject: Re: Cross-reference commits

On Tuesday, April 19, 2011, PJ Weisberg <pjweisb...@gmail.com> wrote:
> On Tuesday, April 19, 2011, Moritz Bunkus <mor...@bunkus.org> wrote:
>> things (e.g. winner-mode stuff). My point is that everyone has different
>> needs, and re-binding common movement keys is pretty bad IMHO.

> Ok, that's a good point.

At least it seems so until I consider that Magit already rebinds one
of those two keys, and nobody's complained.  I wonder if it's because
people who have their own bindings for M-(direction) also know how to
disable the mode-specific bindings they don't like.

--

-PJ


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »