From unknown Fri Aug 15 14:48:52 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#8366 <8366@debbugs.gnu.org> To: bug#8366 <8366@debbugs.gnu.org> Subject: Status: wish: include vc-annotate-goto-line Reply-To: bug#8366 <8366@debbugs.gnu.org> Date: Fri, 15 Aug 2025 21:48:52 +0000 retitle 8366 wish: include vc-annotate-goto-line reassign 8366 emacs submitter 8366 Uwe Brauer severity 8366 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 28 12:10:07 2011 Received: (at submit) by debbugs.gnu.org; 28 Mar 2011 16:10:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4F14-0000gl-EC for submit@debbugs.gnu.org; Mon, 28 Mar 2011 12:10:07 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4E7e-0007ry-Dw for submit@debbugs.gnu.org; Mon, 28 Mar 2011 11:12:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4E7Y-00069R-0o for submit@debbugs.gnu.org; Mon, 28 Mar 2011 11:12:45 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:52403) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4E7X-00069E-Km for submit@debbugs.gnu.org; Mon, 28 Mar 2011 11:12:43 -0400 Received: from [140.186.70.92] (port=33289 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4E7V-0007lv-0P for bug-gnu-emacs@gnu.org; Mon, 28 Mar 2011 11:12:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4E7P-00068I-Md for bug-gnu-emacs@gnu.org; Mon, 28 Mar 2011 11:12:37 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:41597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4E7P-00068C-DP for bug-gnu-emacs@gnu.org; Mon, 28 Mar 2011 11:12:35 -0400 Received: by wyf19 with SMTP id 19so3459728wyf.0 for ; Mon, 28 Mar 2011 08:12:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:x-mailer:x-hashcash:to:subject:reply-to :from:date:message-id:user-agent:mime-version:content-type; bh=9ZMvVFd8oVPpjU4JNb8yFBtBvA7UeLIP1uRK1JHQ+z0=; b=JrfQ8w9PurulrJblDdEMZ+y/HtpNVpW+EopYfenkI19+9qg+cuaH7dNL683ye5xmzF rE9HC5Bo3xLjeaD905D9dA4wWh6zo9M8yLbc82/Y7Cmq5Y5Z2E/hiqhwHc4ac5kxaPUU +knxLXhdqioE5vFmT1xZpUiRqHMgZbDvjO3dE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:x-mailer:x-hashcash:to:subject:reply-to:from:date:message-id :user-agent:mime-version:content-type; b=Csi23hhN9GRnR6/dgfvBrOggv0Vq868L7nv8rK0gRQxikB2qMIefu7GZOaCA38u+qo KBu7depmMdCGU/fbSuydzlSECzM5IO8Vuq7jDcsYhBQDpV0r2czgrg+HldwZRS2JkKSF OATiM3FjBzOydCR0qXmVOcHGrQjOQPNkyR+Pg= Received: by 10.216.62.77 with SMTP id x55mr3890903wec.59.1301325154230; Mon, 28 Mar 2011 08:12:34 -0700 (PDT) Received: from gilgamesch.quim.ucm.es (maportatil12.quim.ucm.es [147.96.6.137]) by mx.google.com with ESMTPS id t72sm1530691wei.44.2011.03.28.08.12.32 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Mar 2011 08:12:33 -0700 (PDT) X-Mailer: 21.4 (patch 21) "Educational Television" XEmacs Lucid (via feedmail 11-beta-1 I) X-Hashcash: 1:20:110328:bug-gnu-emacs@gnu.org::moHFSWMV20nkU1zs:00000000000000000000000000000000000000001F6i To: bug-gnu-emacs@gnu.org Subject: wish: include vc-annotate-goto-line From: Uwe Brauer Date: Mon, 28 Mar 2011 17:12:42 +0200 Message-ID: <8762r3nus5.fsf@gilgamesch.quim.ucm.es> User-Agent: Gnus/5.110011 (No Gnus v0.11) XEmacs/21.4.21 (linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 199.232.76.165 X-Spam-Score: -5.7 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 28 Mar 2011 12:10:04 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Uwe Brauer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.8 (-----) Hello some days ago Juanma Barranquero wrote a very useful function which allows you to jump from the vc-annotate buffer to the corresponding point in the file which is under vc. I strongly suggesto to include this function. (defun vc-annotate-goto-line () (interactive) (unless (eq major-mode 'vc-annotate-mode) (error "vc-annotate-goto-line must be used on a VC-Annotate buffer")) (let* ((name (buffer-name)) (base (and (string-match "Annotate \\(.*\\) (rev" name) (match-string 1 name))) (line (save-restriction (widen) (line-number-at-pos)))) (with-current-buffer (get-buffer base) (pop-to-buffer (current-buffer)) (save-restriction (widen) (goto-char (point-min)) (forward-line (1- line)) (recenter))))) Uwe Brauer In GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2010-03-26 on palmer, modified by Ubuntu Windowing system distributor `The X.Org Foundation', version 11.0.10600000 configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs22:/etc/emacs:/usr/local/share/emacs/22.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.2/leim' '--with-x=yes' '--with-x-toolkit=athena' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 locale-coding-system: utf-8 default-enable-multibyte-characters: t Major mode: Apropos Minor modes in effect: tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent input: y e s C-g C-x C-q C-x v v y y e s y e s C-x 2 C-x C-f C-g C-x o C-x o C-x 1 C-x C-f g f C-x 2 C-x C-f x e / s i v s f s f C-SPC C-w C-y C-x o C-y C-x C-e C-x o C-e C-x C-e C-x C-f g C-x 1 f C-x C-s C-x k g f C-x v v C-c C-a C-c C-a C-c C-c M-x e m a c s SPC s u C-h a b u g C-x o C-s s u b m i t C-s C-s C-s C-s C-s C-s C-s C-s e m a c s - b C-s C-x o M-x r e p o r t SPC e m w i s h : SPC i n c l u c d e SPC C-g C-x C-x o C-x o C-x o C-g C-x C-f s i v c v v c a C-M-k C-y C-x o x M-x r e p o r Recent messages: Loading apropos...done Type C-x 1 to remove help window. Mark saved where search started Mark set [2 times] Mark saved where search started Loading emacsbug...done Quit exchange-point-and-mark: No mark set in this buffer Quit Mark set byte-code: Buffer is read-only: # From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 28 20:31:25 2011 Received: (at 8366) by debbugs.gnu.org; 29 Mar 2011 00:31:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4MqC-0004qC-OK for submit@debbugs.gnu.org; Mon, 28 Mar 2011 20:31:24 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4MqB-0004pc-0j for 8366@debbugs.gnu.org; Mon, 28 Mar 2011 20:31:23 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id p2T0WSZS028583; Mon, 28 Mar 2011 20:32:29 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 6D5FA6653A; Mon, 28 Mar 2011 13:49:48 -0400 (EDT) From: Stefan Monnier To: Uwe Brauer Subject: Re: bug#8366: wish: include vc-annotate-goto-line Message-ID: References: <8762r3nus5.fsf@gilgamesch.quim.ucm.es> Date: Mon, 28 Mar 2011 13:49:48 -0400 In-Reply-To: <8762r3nus5.fsf@gilgamesch.quim.ucm.es> (Uwe Brauer's message of "Mon, 28 Mar 2011 17:12:42 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3810=0 X-NAI-Spam-Version: 2.2.0.9286 : core <3810> : streams <614374> : uri <837526> X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 8366 Cc: 8366@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.5 (-) > I strongly suggesto to include this function. Juanma, feel free to install such a feature. > (defun vc-annotate-goto-line () > (interactive) > (unless (eq major-mode 'vc-annotate-mode) > (error "vc-annotate-goto-line must be used on a VC-Annotate buffer")) > (let* ((name (buffer-name)) > (base (and (string-match "Annotate \\(.*\\) (rev" name) AFAIK there should be a better way to find the file. E.g. vc-parent-buffer. > (match-string 1 name))) > (line (save-restriction > (widen) > (line-number-at-pos)))) > (with-current-buffer (get-buffer base) > (pop-to-buffer (current-buffer)) > (save-restriction > (widen) > (goto-char (point-min)) > (forward-line (1- line)) > (recenter))))) Annotate buffer may display a different version that the one of the checked out file. E.g. because you have local uncommitted changes, or because you asked for the annotations of an older revision. So line numbers may not fully match. In general, there's no much we can do about it, but we should probably try a bit harder than the above, e.g. by looking for the closest line with the same text as the line we're looking for. Better would be to ask for a diff between the annotated revision and the current file and use it to find out the line-offset to use (for those cases where this method works). Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 28 20:44:37 2011 Received: (at 8366) by debbugs.gnu.org; 29 Mar 2011 00:44:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4N2y-0005A6-QB for submit@debbugs.gnu.org; Mon, 28 Mar 2011 20:44:37 -0400 Received: from mail-gx0-f172.google.com ([209.85.161.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4N2w-00059t-KY for 8366@debbugs.gnu.org; Mon, 28 Mar 2011 20:44:35 -0400 Received: by gxk19 with SMTP id 19so1358558gxk.3 for <8366@debbugs.gnu.org>; Mon, 28 Mar 2011 17:44:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=OqC3NvJpqZwa+7ABr/1YOjcURm+//hGocyaYajUrlNQ=; b=oY7qPuy39sQg7lZrlXvPmGZziH77ATVW9k6x2msKYjXP13J7htFJwRgopFu60mW4sy OR6W9VX272XTbxAUGW9yuJM5OA7z/+IIjQyah5wHjjrBhmDRzl4Ik0cErkeKTK8gPnP+ acNTFy6O7QMr7VlKtbAdo3a+OYGXIF/eK6iNo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=GMO/pQD1Hk0SbWz4e7BbP2uqXYSmuyExH/QbQjHHusTFmaJsr3ID185+DAzZlMcT7u L8A+Ev1Jm+Qqgx2rlcBgAluUlrgXHmit1Svm3oIPfTki5lBqaX99OSCOZFm0zvXRtvmI cXzE4JxjU/kM0VXTy//D3xACb9GFVGH/9D1Dc= Received: by 10.236.95.135 with SMTP id p7mr6502771yhf.184.1301359469120; Mon, 28 Mar 2011 17:44:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.147.182.17 with HTTP; Mon, 28 Mar 2011 17:43:49 -0700 (PDT) In-Reply-To: References: <8762r3nus5.fsf@gilgamesch.quim.ucm.es> From: Juanma Barranquero Date: Tue, 29 Mar 2011 02:43:49 +0200 Message-ID: Subject: Re: bug#8366: wish: include vc-annotate-goto-line To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 8366 Cc: Uwe Brauer , 8366@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) On Mon, Mar 28, 2011 at 19:49, Stefan Monnier wr= ote: > Juanma, feel free to install such a feature. Hmm, no. It's just half-cooked; I threw it together in a few minutes to help the OP. > AFAIK there should be a better way to find the file. > E.g. vc-parent-buffer. Fist time I've heard of it ;-) > Annotate buffer may display a different version that the one of the > checked out file. =C2=A0E.g. because you have local uncommitted changes, = or > because you asked for the annotations of an older revision. =C2=A0So line > numbers may not fully match. =C2=A0In general, there's no much we can do > about it, but we should probably try a bit harder than the above, > e.g. by looking for the closest line with the same text as the line > we're looking for. =C2=A0Better would be to ask for a diff between the > annotated revision and the current file and use it to find out the > line-offset to use (for those cases where this method works). Even if the buffer contains the same version, there's the matter of visual-line-mode, truncate-lines, etc. which can affect line count. So yes, for a robust answer looking at the context seems essential. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 28 23:32:49 2011 Received: (at 8366) by debbugs.gnu.org; 29 Mar 2011 03:32:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4Pfk-0001tV-Ev for submit@debbugs.gnu.org; Mon, 28 Mar 2011 23:32:48 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4Pfi-0001t9-OU for 8366@debbugs.gnu.org; Mon, 28 Mar 2011 23:32:46 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAFNSkU1MCqRC/2dsb2JhbAClSHiIdrwWhWoElgY X-IronPort-AV: E=Sophos;i="4.63,259,1299474000"; d="scan'208";a="98452099" Received: from 76-10-164-66.dsl.teksavvy.com (HELO ceviche.home) ([76.10.164.66]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 28 Mar 2011 23:32:41 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 02C3B660C7; Mon, 28 Mar 2011 23:32:41 -0400 (EDT) From: Stefan Monnier To: Juanma Barranquero Subject: Re: bug#8366: wish: include vc-annotate-goto-line Message-ID: References: <8762r3nus5.fsf@gilgamesch.quim.ucm.es> Date: Mon, 28 Mar 2011 23:32:40 -0400 In-Reply-To: (Juanma Barranquero's message of "Tue, 29 Mar 2011 02:43:49 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 8366 Cc: Uwe Brauer , 8366@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > Even if the buffer contains the same version, there's the matter of > visual-line-mode, truncate-lines, etc. which can affect line count. count-lines and goto-line only pays attention to hard newlines and are unaffected by display settings, so that shouldn't be an issue. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 29 05:16:27 2011 Received: (at 8366) by debbugs.gnu.org; 29 Mar 2011 09:16:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4V2J-00010c-9u for submit@debbugs.gnu.org; Tue, 29 Mar 2011 05:16:27 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Q4V2G-00010P-Rl for 8366@debbugs.gnu.org; Tue, 29 Mar 2011 05:16:25 -0400 Received: (qmail invoked by alias); 29 Mar 2011 09:16:18 -0000 Received: from 62-47-60-40.adsl.highway.telekom.at (EHLO [62.47.60.40]) [62.47.60.40] by mail.gmx.net (mp009) with SMTP; 29 Mar 2011 11:16:18 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/SlWNpKaTSOUQk1iv+/uvts1pfI7r26gWf4g1SA8 qtDTeaZJLNvFk5 Message-ID: <4D919CA7.5060108@gmx.at> Date: Tue, 29 Mar 2011 10:47:35 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#8366: wish: include vc-annotate-goto-line References: <8762r3nus5.fsf@gilgamesch.quim.ucm.es> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 8366 Cc: Uwe Brauer , 8366@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) > Annotate buffer may display a different version that the one of the > checked out file. E.g. because you have local uncommitted changes, or > because you asked for the annotations of an older revision. So line > numbers may not fully match. In general, there's no much we can do > about it, but we should probably try a bit harder than the above, > e.g. by looking for the closest line with the same text as the line > we're looking for. Better would be to ask for a diff between the > annotated revision and the current file and use it to find out the > line-offset to use (for those cases where this method works). I'm often in need for a general, customizable function for finding the best match of some text in two different buffers. For example, to get from a texinfo to an info buffer and vice-versa. Any advances in that direction would be very appreciated. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 29 09:52:14 2011 Received: (at 8366) by debbugs.gnu.org; 29 Mar 2011 13:52:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4ZL4-0007q4-BM for submit@debbugs.gnu.org; Tue, 29 Mar 2011 09:52:14 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4ZL2-0007pc-1T for 8366@debbugs.gnu.org; Tue, 29 Mar 2011 09:52:04 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAIzikU1MCqRC/2dsb2JhbAClTHiIebwnhWoElhA X-IronPort-AV: E=Sophos;i="4.63,262,1299474000"; d="scan'208";a="98499314" Received: from 76-10-164-66.dsl.teksavvy.com (HELO pastel.home) ([76.10.164.66]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 29 Mar 2011 09:51:58 -0400 Received: by pastel.home (Postfix, from userid 20848) id 23A2158EBD; Tue, 29 Mar 2011 09:51:58 -0400 (EDT) From: Stefan Monnier To: martin rudalics Subject: Re: bug#8366: wish: include vc-annotate-goto-line Message-ID: References: <8762r3nus5.fsf@gilgamesch.quim.ucm.es> <4D919CA7.5060108@gmx.at> Date: Tue, 29 Mar 2011 09:51:58 -0400 In-Reply-To: <4D919CA7.5060108@gmx.at> (martin rudalics's message of "Tue, 29 Mar 2011 10:47:35 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 8366 Cc: Uwe Brauer , 8366@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > I'm often in need for a general, customizable function for finding the > best match of some text in two different buffers. For example, to get > from a texinfo to an info buffer and vice-versa. Any advances in that > direction would be very appreciated. Damn! And I thought you had this stashed in your window-pub branch! Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 29 11:18:25 2011 Received: (at 8366) by debbugs.gnu.org; 29 Mar 2011 15:18:26 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4agb-0001SU-0T for submit@debbugs.gnu.org; Tue, 29 Mar 2011 11:18:25 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Q4agX-0001SG-NU for 8366@debbugs.gnu.org; Tue, 29 Mar 2011 11:18:23 -0400 Received: (qmail invoked by alias); 29 Mar 2011 15:18:15 -0000 Received: from 62-47-45-250.adsl.highway.telekom.at (EHLO [62.47.45.250]) [62.47.45.250] by mail.gmx.net (mp065) with SMTP; 29 Mar 2011 17:18:15 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19cZBMlwgpcZPBBau2Ms0SqcQJESSBiMZq5jxPg71 l7KJZtTPnuGA/W Message-ID: <4D91F835.4040403@gmx.at> Date: Tue, 29 Mar 2011 17:18:13 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#8366: wish: include vc-annotate-goto-line References: <8762r3nus5.fsf@gilgamesch.quim.ucm.es> <4D919CA7.5060108@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 8366 Cc: Uwe Brauer , 8366@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) >> I'm often in need for a general, customizable function for finding the >> best match of some text in two different buffers. For example, to get >> from a texinfo to an info buffer and vice-versa. Any advances in that >> direction would be very appreciated. > > Damn! And I thought you had this stashed in your window-pub branch! I've stashed it somewhere else. But it's far from perfect :-( martin From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 24 15:43:44 2011 Received: (at 8366) by debbugs.gnu.org; 24 Apr 2011 19:43:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QE5Db-0004MC-Ne for submit@debbugs.gnu.org; Sun, 24 Apr 2011 15:43:43 -0400 Received: from vm-emlprdomr-06.its.yale.edu ([130.132.50.147]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QE5DZ-0004Lw-9k for 8366@debbugs.gnu.org; Sun, 24 Apr 2011 15:43:42 -0400 Received: from furball (dhcp128036225098.central.yale.edu [128.36.225.98]) (authenticated bits=0) by vm-emlprdomr-06.its.yale.edu (8.14.4/8.14.4) with ESMTP id p3OJhZvh007390 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 24 Apr 2011 15:43:35 -0400 Received: by furball (Postfix, from userid 1000) id ED3AA16055B; Sun, 24 Apr 2011 15:43:34 -0400 (EDT) From: Chong Yidong To: Juanma Barranquero Subject: Re: bug#8366: wish: include vc-annotate-goto-line References: <8762r3nus5.fsf@gilgamesch.quim.ucm.es> Date: Sun, 24 Apr 2011 15:43:34 -0400 In-Reply-To: (Juanma Barranquero's message of "Tue, 29 Mar 2011 02:43:49 +0200") Message-ID: <8739l7wi3d.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.71 on 130.132.50.147 X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 8366 Cc: Uwe Brauer , Stefan Monnier , 8366@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Juanma Barranquero writes: >> Juanma, feel free to install such a feature. > > Hmm, no. It's just half-cooked; I threw it together in a few minutes > to help the OP. > >> Annotate buffer may display a different version that the one of the >> checked out file. E.g. because you have local uncommitted changes, or >> because you asked for the annotations of an older revision. So line >> numbers may not fully match. In general, there's no much we can do >> about it, but we should probably try a bit harder than the above, >> e.g. by looking for the closest line with the same text as the line >> we're looking for. Better would be to ask for a diff between the >> annotated revision and the current file and use it to find out the >> line-offset to use (for those cases where this method works). > > Even if the buffer contains the same version, there's the matter of > visual-line-mode, truncate-lines, etc. which can affect line count. So > yes, for a robust answer looking at the context seems essential. A non-robust implementation is better than nothing, so I committed the command to the trunk, starting from your version, and revising it to use vc-parent-buffer and emitting warning messages if the parent file/buffer is modified or out of date. As for the "look for the closest line with the same text" functionality, my feeling is that this is a mug's game when version control is involved. If you or anyone else wants to take a stab at it, feel free. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 31 11:47:12 2022 Received: (at 8366) by debbugs.gnu.org; 31 Jan 2022 16:47:12 +0000 Received: from localhost ([127.0.0.1]:40474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEZpg-00010z-BM for submit@debbugs.gnu.org; Mon, 31 Jan 2022 11:47:12 -0500 Received: from quimby.gnus.org ([95.216.78.240]:47800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEZpb-0000sq-Ka for 8366@debbugs.gnu.org; Mon, 31 Jan 2022 11:47:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=/BKpuJjY5I3GAB7XqbQoXHHk4oR+Sd3ZaOVoCRl01Es=; b=stnrayJNRIbGm7SOzOpWVEhzUx PmDYujCOjZZ22tgIZdNhVeTrKkOBmvq6CN2iHKJ+7ql0Piso/hvA+hy9+4teCg0A3w9C+mNokrbm9 VQ7IRMZwAzvdvlJBSIq8u+oCc1nG6+Q0HSxVHHwnvNxB2GZDsZQecANG//5VXyHbJmWU=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nEZpS-0004aZ-Ah; Mon, 31 Jan 2022 17:47:01 +0100 From: Lars Ingebrigtsen To: Uwe Brauer Subject: Re: bug#8366: wish: include vc-annotate-goto-line References: <8762r3nus5.fsf@gilgamesch.quim.ucm.es> X-Now-Playing: Nina Simone's _Little Girl Blue_: "Good Bait" Date: Mon, 31 Jan 2022 17:46:56 +0100 In-Reply-To: <8762r3nus5.fsf@gilgamesch.quim.ucm.es> (Uwe Brauer's message of "Mon, 28 Mar 2011 17:12:42 +0200") Message-ID: <87zgnbzwcf.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Uwe Brauer writes: > some days ago Juanma Barranquero wrote a very useful function which allows > you to jump from the vc-annotate buffer to the corresponding point in the > file which is under vc. > > I strongly sugges [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 8366 Cc: 8366@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Uwe Brauer writes: > some days ago Juanma Barranquero wrote a very useful function which allows > you to jump from the vc-annotate buffer to the corresponding point in the > file which is under vc. > > I strongly suggesto to include this function. > > (defun vc-annotate-goto-line () > (interactive) This was apparently added a week later: commit 3ba7869ce8386d79d21f8e6f7d3c23088f9838ce Author: Chong Yidong AuthorDate: Sun Apr 24 15:37:47 2011 -0400 Add vc-annotate-goto-line. * vc/vc-annotate.el (vc-annotate-goto-line): New command. Based on a previous implementation by Juanma Barranquero (Bug#8366). So I'm therefore closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 31 11:47:17 2022 Received: (at control) by debbugs.gnu.org; 31 Jan 2022 16:47:18 +0000 Received: from localhost ([127.0.0.1]:40476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEZpl-00015b-JI for submit@debbugs.gnu.org; Mon, 31 Jan 2022 11:47:17 -0500 Received: from quimby.gnus.org ([95.216.78.240]:47814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEZpf-0000w2-Bk for control@debbugs.gnu.org; Mon, 31 Jan 2022 11:47:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=W6Pk0lEMvzvv1G1N7zNtx5Hpqp60P8wsd214hMYU+uQ=; b=XkqNZsAhY0HNX6IyLDiLOYIckn b86Am4qGgRqfx3JekegitgRJNqmMt508PXktdnwBdTWHohqjZAk7jfrclZ9c/UsBNh8m2AUmDkoXw Yo/FpDJ5JJNG6n+22LXG7GuRULc+rwafzzcVkSa/6/NLJJfc34y1vrybqX77e2D9tV8U=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nEZpX-0004aj-EM for control@debbugs.gnu.org; Mon, 31 Jan 2022 17:47:05 +0100 Date: Mon, 31 Jan 2022 17:47:03 +0100 Message-Id: <87y22vzwc8.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #8366 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 8366 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 8366 quit From unknown Fri Aug 15 14:48:52 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 01 Mar 2022 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator