emacs-devel
[Top][All Lists]
Advanced

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

Re: Hyperlinks in *vc-change-log*


From: Stefan Monnier
Subject: Re: Hyperlinks in *vc-change-log*
Date: Fri, 11 Apr 2008 12:36:59 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>> Doesn't seem like a bad idea.  But it should be generalized to show not
>> only files but also diffs.

> I'm not sure what you mean by this. When I follow a hyperlink labelled
> with a given commit ID, I would expect to see the file revision of the
> file as it was in that commit.

Depends on your point of view: some people/VCS consider each "id" as
referring to a particular revision, others consider it as referring to
a particular changeset (i.e. patch/diff).  While most VCS take one point
of view as "fundamental", they all provide ways to get the other view.

> I'm guessing this means that it would also be handy to be able to see a
> diff between the given revision and the previous one,

Yes.

> or perhaps the given revision and the current one.

We could add that as well.

> But I'm not sure how that would work in terms of the UI.  This is all
> implemented using buttons, so I am only tying functionality to text
> that already exists in the buffer.  Perhaps another binding could be
> used?  RET to visit a revision, and C-RET to view the diff between that
> revision and the last?

I was thinking of a menu.  From the keyboard we already have bindings
for those operations, IIRC (at least `d' for the diff).

>> For multifile logs, the best option would be to popup a menu of files.
>> BTW this is specific to the display of files.  For `diffs', this problem
>> wouldn't occur.  

> That makes perfect sense; good idea. I would expect a keyboard
> invocation of the hyperlink would cause the choice to be given in the
> minibuffer, while a mouse invocation would cause a contextual menu much
> like the one you see with C-mouse-1. Is there any way to create such a
> menu in a unified fashion? I am only familiar with the minibuffer route.

I don't think we do exactly, but we have code that does that in various
places: tmm-menubar and imenu.el at least.  You may want to steal some
of their code and (better yet) merge that code into a generic function
that we could install in subr.el or somesuch.


        Stefan




reply via email to

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