bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38044: 27.0.50; There should be an easier way to look at a specific


From: Eli Zaretskii
Subject: bug#38044: 27.0.50; There should be an easier way to look at a specific vc commit
Date: Mon, 02 Dec 2019 17:58:16 +0200

> Cc: stephen.berman@gmx.net, larsi@gnus.org, 38044@debbugs.gnu.org,
>  juri@linkov.net
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Mon, 2 Dec 2019 12:39:47 +0200
> 
> > What do you think about replacing the call to thing-at-point with
> > number-at-point, where we look at the revision ID?
> 
> Probably not:
> 
> - Git revisions are SHA hashes, not numbers. Hg also has commit hashes, 
> though they are less visible.

They are both hex numbers.  But I failed to notice that
number-at-point needs the 0x prefix to detect hex numbers, sorry.  (We
could have a new function that accepted hex numbers without 0x.)

> - I'm pretty sure this command will be just as often used with symbolic 
> refs such as branch names. So I'd rather use (thing-at-point 'symbol t) 
> instead. Or a dedicated "thing" that does not depend on the buffer's 
> syntax (and always includes slashes, hyphens and underscores in addition 
> to alphanumerics).

We are talking about heuristic guesswork to suggest a reasonable
default, not about what forms are accepted.  I thought that suggesting
only numbers, either decimal or hex, as such a guess should be enough,
as I almost never see any other revision IDs in practice.  (I do use
other types of refs with Git, like reflog and stash refs, but those
are local and are extremely unlikely to appear in a discussion.)

But if you don't feel that's a good idea, it's fine with me.  It just
strike me as a mild misfeature that we offer completely unrelated
words as "revision IDs".





reply via email to

[Prev in Thread] Current Thread [Next in Thread]