all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Carlos Pita <carlosjosepita@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 31764@debbugs.gnu.org, Noam Postavsky <npostavs@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	[thread overview]
Message-ID: <CAELgYhd-O8Tfbz2vQvh+xQZk69a-O712ieziAzKijRehpvtn3Q@mail.gmail.com> (raw)
In-Reply-To: <83efhgtq25.fsf@gnu.org>

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))))





  reply	other threads:[~2018-06-09 14:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 19:23 bug#31764: 26.1; Point in VC change log is not centered as documented Carlos Pita
2018-06-08 19:38 ` Eli Zaretskii
2018-06-08 19:57   ` Carlos Pita
2018-06-08 20:12     ` Eli Zaretskii
2018-06-08 20:15       ` Carlos Pita
2018-06-08 21:28         ` Carlos Pita
2018-06-08 21:47           ` Carlos Pita
2018-06-08 22:10             ` Carlos Pita
2018-06-09  0:29       ` Noam Postavsky
2018-06-09  0:57         ` Carlos Pita
2018-06-09  6:46         ` Eli Zaretskii
2018-06-09 14:18           ` Carlos Pita [this message]
2018-06-12  0:10           ` Noam Postavsky
2018-06-12  2:32             ` Eli Zaretskii
2018-06-14 23:20               ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAELgYhd-O8Tfbz2vQvh+xQZk69a-O712ieziAzKijRehpvtn3Q@mail.gmail.com \
    --to=carlosjosepita@gmail.com \
    --cc=31764@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=npostavs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.