GNU bug report logs - #25737
25.1.91; vc-git-log-{incoming,outgoing} fixes

Previous Next

Package: emacs;

Reported by: Tom Tromey <tom <at> tromey.com>

Date: Wed, 15 Feb 2017 12:40:01 UTC

Severity: minor

Tags: patch

Found in version 25.1.91

Done: Tom Tromey <tom <at> tromey.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 25737 <at> debbugs.gnu.org (full text, mbox):

From: Tom Tromey <tom <at> tromey.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Tom Tromey <tom <at> tromey.com>, 25737 <at> debbugs.gnu.org
Subject: Re: bug#25737: 25.1.91; vc-git-log-{incoming,outgoing} fixes
Date: Thu, 16 Feb 2017 21:01:34 -0700
>>>>> "Dmitry" == Dmitry Gutov <dgutov <at> yandex.ru> writes:

>> First, vc-git-log-incoming and vc-git-log-outgoing can be called with a
>> nil value for remote-location.  In this case nothing shows up in the
>> log.  Changing the code to treat nil the same as the empty string makes
>> the commands show the data I would expect.

Dmitry> Do you know when they get called with ""?

vc-log-outgoing does:

  (interactive
   (when current-prefix-arg
     (list (read-string "Remote location (empty for default): "))))

So a prefix argument followed by pressing enter.

Dmitry> Should we maybe just change the callers to always use one or the other
Dmitry> value?

Seems reasonable, I'll change vc-log-outgoing.

>> Next, these commands move point to the end of the new buffer.  However,
>> that is weird, because then the buffer is shrunk to fit; for me this
>> ends up making it look like I have just a single outgoing patch, even
>> when I have several.

Dmitry> Any ideas why that happens? I can see point ending up at eob when the
Dmitry> call is synchronous, but that doesn't affect the shrinking behavior
Dmitry> much (e.g. I have 13 lines, the window shrinks correctly but hides the
Dmitry> first line because the cursor is after the last line, and it has to be
Dmitry> visible).

Dmitry> I've only tested this in vc-log-incoming, however.

There are two pieces.

As you say, point ends up at eob due to vc-do-command using process-file
in the synchronous case; whereas for the async case, vc-process-filter
uses save-excursion.

The other behavior seems to be a problem in
shrink-window-if-larger-than-buffer.  I can reproduce it easily just
with any buffer by moving point to the end.  I didn't debug this any
further than finding that.

Tom




This bug report was last modified 8 years and 147 days ago.

Previous Next


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