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: Wed, 09 Apr 2008 15:59:00 -0400 Message-ID: References: <87fxtvng9t.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 1207771171 28474 80.91.229.12 (9 Apr 2008 19:59:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Apr 2008 19:59:31 +0000 (UTC) Cc: emacs-devel@gnu.org To: Phil Hagelberg Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 09 22:00:04 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 1JjgSY-0003t0-Jw for ged-emacs-devel@m.gmane.org; Wed, 09 Apr 2008 21:59:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JjgRv-0000jw-0z for ged-emacs-devel@m.gmane.org; Wed, 09 Apr 2008 15:59:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JjgRo-0000ge-4O for emacs-devel@gnu.org; Wed, 09 Apr 2008 15:59:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JjgRj-0000e4-Cc for emacs-devel@gnu.org; Wed, 09 Apr 2008 15:59:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JjgRj-0000e1-7o for emacs-devel@gnu.org; Wed, 09 Apr 2008 15:59:03 -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 1JjgRi-0003yL-I5 for emacs-devel@gnu.org; Wed, 09 Apr 2008 15:59:02 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlMFAB69/EfO+KV8/2dsb2JhbACBXKo7 X-IronPort-AV: E=Sophos;i="4.25,630,1199682000"; d="scan'208";a="18234002" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 09 Apr 2008 15:59:00 -0400 Original-Received: from pastel.home ([206.248.165.124]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id PXQ23400; Wed, 09 Apr 2008 15:59:00 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 0C64C8958; Wed, 9 Apr 2008 15:59:00 -0400 (EDT) In-Reply-To: <87fxtvng9t.fsf@hagelb.org> (Phil Hagelberg's message of "Wed, 09 Apr 2008 09:29:18 -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:94806 Archived-At: > I've written up some code that I find quite useful for working with > VC. The code below adds buttons to each commit entry in *vc-change-log* > buffers, essentially making them hyperlinks to the revision mentioned > using vc-find-revision. Doesn't seem like a bad idea. But it should be generalized to show not only files but also diffs. > * The button actions use closures and thus require the cl library. As I > understand it, this dependency would have to be removed for it to be > included in Emacs. I consider this to be somewhat disappointing as it > will add complexity to the code, but I respect this choice of the > maintainers. Not a problem, you misunderstood the requirement. > * It only supports three VC backends: SVN, CVS, and Git. This is simply > because I don't have much experience with other VC systems; it would > be trivial to add support for more by adding appropriate entries to > vc-button-regexp-alist to match what a commit looks like in each > backend. The code should not be thought of as a feature of VC but of log-view.el. > * Right now it only works with *vc-change-log* buffers that correspond > to a single file. I am not sure what the action makes sense for > buffers that correspond to a fileset; I have mostly used VC logs in > the context of single files. 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. > * It currently uses hooks. If it were incorporated into Emacs, it could > probably be added directly to an existing function. Yes, it should probably be merged directly into log-view's font-lock regexps or something like that. Stefan