From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Hanchrow Newsgroups: gmane.emacs.bugs Subject: bug#6481: 23.2.50; vc-annotate-show-log-revision-at-line yields empty buffer Date: Sun, 20 Jun 2010 15:54:51 -0700 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1277074747 17301 80.91.229.12 (20 Jun 2010 22:59:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 20 Jun 2010 22:59:07 +0000 (UTC) Cc: Dan Nicolaescu To: 6481@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 21 00:59:02 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OQTTh-0003RC-SM for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Jun 2010 00:59:02 +0200 Original-Received: from localhost ([127.0.0.1]:33432 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQTTh-0007XA-8V for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Jun 2010 18:59:01 -0400 Original-Received: from [140.186.70.92] (port=43567 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQTTa-0007Ul-5o for bug-gnu-emacs@gnu.org; Sun, 20 Jun 2010 18:58:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OQTTY-00034u-Qp for bug-gnu-emacs@gnu.org; Sun, 20 Jun 2010 18:58:54 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54688) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQTTY-00034p-P2 for bug-gnu-emacs@gnu.org; Sun, 20 Jun 2010 18:58:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OQTQo-0006T6-DV; Sun, 20 Jun 2010 18:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eric Hanchrow Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Jun 2010 22:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6481 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.127707450424854 (code B ref -1); Sun, 20 Jun 2010 22:56:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Jun 2010 22:55:04 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQTPr-0006Sp-La for submit@debbugs.gnu.org; Sun, 20 Jun 2010 18:55:04 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQTPo-0006SR-MZ for submit@debbugs.gnu.org; Sun, 20 Jun 2010 18:55:02 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:41818) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OQTPk-0005ui-Ms for submit@debbugs.gnu.org; Sun, 20 Jun 2010 18:54:56 -0400 Original-Received: from [140.186.70.92] (port=34774 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQTPi-0006fn-UU for bug-gnu-emacs@gnu.org; Sun, 20 Jun 2010 18:54:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OQTPh-0002am-9t for bug-gnu-emacs@gnu.org; Sun, 20 Jun 2010 18:54:54 -0400 Original-Received: from mail-gy0-f169.google.com ([209.85.160.169]:46482) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQTPh-0002aI-6f for bug-gnu-emacs@gnu.org; Sun, 20 Jun 2010 18:54:53 -0400 Original-Received: by gyg4 with SMTP id 4so2443644gyg.0 for ; Sun, 20 Jun 2010 15:54:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:cc:content-type; bh=qGhJwnQfDPjfhv9Wj5RUVb9/zsYfiTj3KrpDvIvM8q8=; b=vjW4r+zAevCNyxnakt+HtkFB5C79B+9EZVhw+0vynxShwjqSdovNfYEhazNXrBWvzg qT3u6keOukA0LJDrFfMCozJF9/fX2U62vsIwlkIR8/QQK2uY81gWMUzD1CCqCCxLuN1X uNvLAAjaFDTunfg8Ys3wERt3ozhZU5KJTx2hM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=u2YeSboDhRJzQ62PL+eR71aWlAiPR7B2jo3DGY+RzD0gbs95dcfZpJHB20FkfDoyHd UXOLGhA6lQWbiYpxOVA5Mr5YF6KNWoZOB3abFjIQjRrbKG6Xb/c+XS9LkSJ/epuhgrCV 9KXUHclPdygJPyrIaII+rdzZe23NFCM77rA8g= Original-Received: by 10.91.50.34 with SMTP id c34mr2425787agk.44.1277074491839; Sun, 20 Jun 2010 15:54:51 -0700 (PDT) Original-Received: by 10.90.71.15 with HTTP; Sun, 20 Jun 2010 15:54:51 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 20 Jun 2010 18:56:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37919 Archived-At: I visited a file in a git working copy, and typed C-x v g to see the "blame". In the resulting buffer, I typed "l". I saw (after a few seconds) a *vc-change-log* buffer that was empty. Naturally, I expected that buffer to contain a single log message from git, corresponding to the commit ID on the line on which I typed "l". I think the problem is that the annotated buffer looks like this: ad470f08 lisp/vc-git.el (Dan Nicolaescu 2007-07-22 19:46:04 +0000 1) ;;; vc-git.el --- VC backend for the git version control system ad470f08 lisp/vc-git.el (Dan Nicolaescu 2007-07-22 19:46:04 +0000 2) ... and that the regexp in vc-git-annotate-extract-revision-at-line matches from the end of the commit ID, all the way up to (but not including) the first left-paren. So the file name being returned from that function is "lisp/vc-git.el ", including the trailing spaces. The following patch fixes it for me: diff --git a/lisp/vc-git.el b/lisp/vc-git.el index dec5479..a295106 100644 --- a/lisp/vc-git.el +++ b/lisp/vc-git.el @@ -706,8 +706,14 @@ or BRANCH^ (where \"^\" can be repeated)." (when (looking-at "\\([0-9a-f^][0-9a-f]+\\) \\(\\([^(]+\\) \\)?") (let ((revision (match-string-no-properties 1))) (if (match-beginning 2) - (cons revision (expand-file-name (match-string-no-properties 3) - (vc-git-root default-directory))) + (let* ((extracted (match-string-no-properties 3)) + (trimmed + (replace-regexp-in-string + (rx (one-or-more (any space)) eos) + "" + extracted))) + (cons revision (expand-file-name trimmed + (vc-git-root default-directory)))) revision))))) ;;; TAG SYSTEM In GNU Emacs 23.2.50.2 (i686-pc-linux-gnu) of 2010-06-04 on debian configured using `configure '--without-x'' 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: nil value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: diff-auto-refine-mode: t shell-dirtrack-mode: t erc-list-mode: t erc-menu-mode: t erc-ring-mode: t erc-pcomplete-mode: t erc-track-mode: t erc-track-minor-mode: t erc-match-mode: t erc-netsplit-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-autojoin-mode: t erc-log-mode: t erc-services-mode: t erc-networks-mode: t eldoc-mode: t global-auto-revert-mode: t ido-everywhere: t display-time-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: h e s SPC f o r SPC ( a b b r e v i a t e - f i l e - n a m e SPC d e f a u l t - d i r e c t o r y ) C-k C-c C-u C-x u ESC C-p C-k h t t p : / / t h e p i o n e e r w o m a n . c o m / c o o k i n g / 2 0 1 0 / 0 1 / p e r f e c t - p o t a t o e s - a u - g r a t i n / RET C-c C-@ C-c C-@ a s SPC i t SPC h a p p e n s , SPC y e s RET C-c C-@ C-c C-@ C-c C-@ l e t ' s SPC h a v e SPC t h e SPC b o t s SPC t DEL d o SPC i t SPC f o r SPC u s RET ESC x w o m a n RET c u r l RET C-s - F C-s C-a ESC 0 C-l q C-c C-@ C-c C-@ o p s ! RET C-c C-@ C-x b v c - RET C-h i t C-s t r i m C-s C-s C-a C-x b s h e RET ESC x r e p o r t - e m TAB RET C-g C-x 2 C-x b C-s RET C-x b a n n RET C-h c l C-x b RET ESC < C-s - s h o w - l C-w - r DEL C-s C-a ESC x ESC p RET Recent messages: Mark saved where search started Source file `/usr/local/src/emacs/lisp/mail/emacsbug.el' newer than byte-compiled file Quit l runs the command vc-annotate-show-log-revision-at-line Mark set Mark saved where search started Scanning for dabbrevs...99% dabbrev-expand: No dynamic expansion for `vc-show-log' found Scanning for dabbrevs...99% dabbrev-expand: No dynamic expansion for `vc-show-log-re' found Load-path shadows: ~/.emacs.d/custom hides /usr/local/src/emacs/lisp/custom /usr/local/src/emacs/lisp/s-region hides /usr/local/src/emacs/lisp/obsolete/s-region Features: (shadow sort mail-extr message sendmail ecomplete rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader mm-util mail-prsvr gmm-utils mailheader canlock hashcash emacsbug vc-annotate rect tabify org-table org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-exp org-exp-blocks org-agenda org-info org-gnus org-bibtex org-bbdb org byte-opt bytecomp byte-compile org-footnote org-src org-list org-faces org-compat org-macs noutline outline erc-dcc novice em-unix em-term term ehelp em-script em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl em-basic esh-opt em-banner em-alias esh-var esh-io esh-cmd esh-ext esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util etags tmm electric two-column wdired make-mode ffap iso-transl disp-table jka-compr cus-start cus-load icomplete apropos vc-bzr sha1 hex-util vc-sccs vc-cvs vc-rcs vc-dir ewoc cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs debug mule-util info log-edit smerge-mode add-log log-view pcvs-util diff-mode easy-mmode vc conf-mode newcomment vc-git cmuscheme scheme help-mode view epa-file tramp-imap tramp-gw tramp-fish tramp-smb tramp-cache tramp-ftp tramp-cmds tramp auth-source gnus-util netrc shell password-cache tramp-compat trampver multi-isearch rmail mail-utils dabbrev warnings erc-menu erc-ring erc-pcomplete time-date pcomplete erc-track erc-match erc-netsplit erc-goodies erc-button erc-fill erc-stamp wid-edit erc-truncate erc-spelling flyspell ispell erc-join erc-log erc-services erc-networks erc erc-backend erc-compat format-spec thingatpt pp package reporter woman easymenu man assoc vc-dispatcher vc-svn eldoc midnight uniquify advice help-fns advice-preload epa epg epg-config derived autorevert ansi-color server grep compile comint ring tool-bar cl cl-19 find-func ibuf-ext ibuf-macs ibuffer ido dired-x dired-aux dired regexp-opt edmacro kmacro rx autoinsert time image ediff-hook vc-hooks lisp-float-type lisp-mode register page menu-bar rfn-eshadow timer jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind multi-tty emacs) -- If there were a little guy running around inside the computer executing our programs, he would probably have as long and plaintive a tale to tell about his job as a federal government employee. -- Paul Graham