From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andre Spiegel Newsgroups: gmane.emacs.devel Subject: Re: [patch] add interactive browse of revisions from vc *Annotate* buffers Date: Mon, 19 Jan 2004 14:33:59 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <1074519239.10692.24.camel@localhost> References: <1073937837.2822.180.camel@localhost> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1074521201 10761 80.91.224.253 (19 Jan 2004 14:06:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 19 Jan 2004 14:06:41 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Jan 19 15:06:31 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Aia2x-000570-00 for ; Mon, 19 Jan 2004 15:06:31 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Aia2w-0000Du-01 for ; Mon, 19 Jan 2004 15:06:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AiZtJ-0002fE-Te for emacs-devel@quimby.gnus.org; Mon, 19 Jan 2004 08:56:33 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AiZtE-0002ed-9j for emacs-devel@gnu.org; Mon, 19 Jan 2004 08:56:28 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AiZsh-0002WW-49 for emacs-devel@gnu.org; Mon, 19 Jan 2004 08:56:26 -0500 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AiZr0-0002EY-Mw for emacs-devel@gnu.org; Mon, 19 Jan 2004 08:54:10 -0500 Original-Received: from [193.113.160.15] (helo=mail.o2.co.uk) by mx20.gnu.org with esmtp (Exim 4.24) id 1AiZXg-0006sc-IJ for emacs-devel@gnu.org; Mon, 19 Jan 2004 08:34:12 -0500 Original-Received: from [217.224.229.15] (217.224.229.15) by mail.o2.co.uk (7.0.020) (authenticated as 01792247376@o2online.de) id 400B412E00031A28; Mon, 19 Jan 2004 13:34:16 +0000 Original-To: Benjamin Rutt In-Reply-To: X-Mailer: Ximian Evolution 1.4.5 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19263 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19263 On Sat, 2004-01-17 at 22:34, Benjamin Rutt wrote: > Now that it seems like everyone has reached agreement on the key > bindings, here is the latest patch. Thanks, I'm really looking forward to getting this installed. A few minor points: We already have a backend-specific function vc-BACKEND-previous-version, which currently has a single default implementation, vc-default-previous-version in vc.el. It handles RCS/CVS revision numbers (it's used to provide the defaults for C-u C-x v =). Could you please take a look at that function and resolve the redundancy with vc-cvs-increment/decrement-revision in your code? The reconciled implementation should combine the behaviour of both previous functions. Please also put these functions into vc.el as defaults for all backends, because the RCS-style revision numbers are still common for most backends. I'm a bit puzzled by your function vc-current-line. I must admit that I'm totally clueless in this area, but is there really no simpler way to determine this? Surely, this problem must have occured elsewhere already. Anybody got a hint for us? +(defun vc-current-line () + "Returns the current buffer's line number." + (let ((oldpoint (point)) start) + (save-excursion + (save-restriction + (goto-char (point-min)) + (widen) + (forward-line 0) + (setq start (point)) + (goto-char oldpoint) + (forward-line 0) + (1+ (count-lines (point-min) (point))))))) Last point: The doc strings in your functions do not comply with the Emacs guidelines yet. Every function must have a doc string, and the first line must be a complete sentence of its own (in the imperative voice). Please see the corresponding sections in the Elisp manual.