From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Hyperlinks in *vc-change-log* Date: Fri, 11 Apr 2008 12:36:59 -0400 Message-ID: References: <87fxtvng9t.fsf@hagelb.org> <874pa9djro.fsf@hagelb.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1207931840 22031 80.91.229.12 (11 Apr 2008 16:37:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Apr 2008 16:37:20 +0000 (UTC) Cc: emacs-devel@gnu.org To: Phil Hagelberg Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 11 18:37:53 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JkMG7-0007xi-Do for ged-emacs-devel@m.gmane.org; Fri, 11 Apr 2008 18:37:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JkMFT-0006Bs-Gq for ged-emacs-devel@m.gmane.org; Fri, 11 Apr 2008 12:37:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JkMFO-0006Aq-DW for emacs-devel@gnu.org; Fri, 11 Apr 2008 12:37:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JkMFJ-000691-Pl for emacs-devel@gnu.org; Fri, 11 Apr 2008 12:37:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JkMFJ-00068v-JI for emacs-devel@gnu.org; Fri, 11 Apr 2008 12:37:01 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182] helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JkMFJ-00037g-7k for emacs-devel@gnu.org; Fri, 11 Apr 2008 12:37:01 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjoFAHUw/0fO+KV8/2dsb2JhbACBXalf X-IronPort-AV: E=Sophos;i="4.25,642,1199682000"; d="scan'208";a="18358812" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 11 Apr 2008 12:37:00 -0400 Original-Received: from pastel.home ([206.248.165.124]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id RUW26000; Fri, 11 Apr 2008 12:37:00 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id E23B08487; Fri, 11 Apr 2008 12:36:59 -0400 (EDT) In-Reply-To: <874pa9djro.fsf@hagelb.org> (Phil Hagelberg's message of "Thu, 10 Apr 2008 22:48:27 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:94977 Archived-At: >> 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