GNU bug report logs - #31764
26.1; Point in VC change log is not centered as documented

Previous Next

Package: emacs;

Reported by: Carlos Pita <carlosjosepita <at> gmail.com>

Date: Fri, 8 Jun 2018 19:25:01 UTC

Severity: normal

Tags: fixed, patch

Merged with 44001

Found in version 26.1

Fixed in version 26.2

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 31764 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> gmail.com>
Subject: bug#31764: 26.1; Point in VC change log is not centered as documented
Date: Sat, 9 Jun 2018 11:18:10 -0300
Sadly it doesn't improve matters, Eli.

Below I'm repeating the conclusions of my debugging session in a more
orderly fashion:

1) `C-x v l` is bound to vc-print-log

2) vc-print-log takes an optional working-revision argument. When
called with a prefix argument, working-revision is prompted for.

3) In both cases (prompted or not) the default value for this argument is nil.

4) vc-print-log calls (vc-print-log-internal backend files
working-revision nil limit)

5) Then vc-print-log-internal calls vc-log-internal-common.

6) This last function takes a goto-location-func argument that the
caller is passing as the result of:

       ;; When it's nil, point really shouldn't move (bug#15322).
       (when working-revision
         (lambda (bk)
           (vc-call-backend bk 'show-log-entry working-revision)))

that is, nil by default.

7) vc-log-internal-common only moves the point when goto-location-func
is not nil:

       (when goto-location-func
         (funcall goto-location-func backend)
         (setq vc-sentinel-movepoint (point)))


So I'm really failing to see how this could work at all.

Besides, there is the point that this advice, that changes the nil
default for the working version of the current buffer, makes it work
as documented:

(advice-add 'vc-print-log
        :filter-args (lambda (args)
               (cons (or (car args)
                     (and (buffer-file-name)
                      (vc-working-revision (buffer-file-name))))
                 (cdr args))))




This bug report was last modified 4 years and 214 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.