unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* pointless buttons at end of VC log buffers
@ 2010-02-16  4:42 Miles Bader
  2010-02-16  5:38 ` Óscar Fuentes
  0 siblings, 1 reply; 7+ messages in thread
From: Miles Bader @ 2010-02-16  4:42 UTC (permalink / raw)
  To: emacs-devel

If I do a vc log command (e.g., "C-x v L"), i get the log in a
"*vc-change-log*" buffer, and at the veryyy end of the buffer, I see:

   [Show 2X entries]    [Show unlimited entries]

However these buttons seem useless, as the buffer already contains all
log entries (about 1200)!

* It seems like it should only show these buttons if the log listing
gets interrupted for some reason.

Also, the formatting is a bit off, as the above buttons are not preceded
by a newline... they're glommed onto end of the last line of the log
listing.

* So, some code should make sure there's a newline before the buttons --
 indeed, it should probably add an entire blank line between the last
 log line and the buttons so they stand out more (I didn't even notice
 them for a while...).

Thanks,

-miles

-- 
Laughter, n. An interior convulsion, producing a distortion of the features
and accompanied by inarticulate noises. It is infectious and, though
intermittent, incurable.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pointless buttons at end of VC log buffers
  2010-02-16  4:42 pointless buttons at end of VC log buffers Miles Bader
@ 2010-02-16  5:38 ` Óscar Fuentes
  2010-02-16  8:43   ` Miles Bader
  0 siblings, 1 reply; 7+ messages in thread
From: Óscar Fuentes @ 2010-02-16  5:38 UTC (permalink / raw)
  To: emacs-devel

Miles Bader <miles.bader@necel.com> writes:

> If I do a vc log command (e.g., "C-x v L"), i get the log in a
> "*vc-change-log*" buffer, and at the veryyy end of the buffer, I see:
>
>    [Show 2X entries]    [Show unlimited entries]
>
> However these buttons seem useless, as the buffer already contains all
> log entries (about 1200)!
>
> * It seems like it should only show these buttons if the log listing
> gets interrupted for some reason.

For this, VC-log needs to count how many revisions it is showing and
compare with the number of revisions on the branch. Looks like too much
work. OTOH, on some backends (i.e. git) it is difficult to differentiate
the first (oldest) revision from any other on the log listing, as it
lacks revision numbers.

> Also, the formatting is a bit off, as the above buttons are not preceded
> by a newline... they're glommed onto end of the last line of the log
> listing.
>
> * So, some code should make sure there's a newline before the buttons --
>  indeed, it should probably add an entire blank line between the last
>  log line and the buttons so they stand out more (I didn't even notice
>  them for a while...).

It seems that git does not append a newline to the last revision. The
buttons look fine for Subversion and Bazaar, although a blank line
before them would be aesthetically pleasant.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pointless buttons at end of VC log buffers
  2010-02-16  5:38 ` Óscar Fuentes
@ 2010-02-16  8:43   ` Miles Bader
  2010-02-16 13:15     ` Óscar Fuentes
  0 siblings, 1 reply; 7+ messages in thread
From: Miles Bader @ 2010-02-16  8:43 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: emacs-devel

Óscar Fuentes <ofv@wanadoo.es> writes:
>> * It seems like it should only show these buttons if the log listing
>> gets interrupted for some reason.
>
> For this, VC-log needs to count how many revisions it is showing and
> compare with the number of revisions on the branch. Looks like too much
> work. OTOH, on some backends (i.e. git) it is difficult to differentiate
> the first (oldest) revision from any other on the log listing, as it
> lacks revision numbers.

I don't understand this....

The underlying log command outputs all revisions by default, so if it
didn't output all of them, that must have explicitly been requested by
emacs, so emacs should know about it.

[Also, is it supposed to be operating incrementally?  At least with git,
it just pauses for a while and then outputs the entire log at once.]

-Miles

-- 
Logic, n. The art of thinking and reasoning in strict accordance with the
limitations and incapacities of the human misunderstanding.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pointless buttons at end of VC log buffers
  2010-02-16  8:43   ` Miles Bader
@ 2010-02-16 13:15     ` Óscar Fuentes
  2010-02-16 13:54       ` Miles Bader
  0 siblings, 1 reply; 7+ messages in thread
From: Óscar Fuentes @ 2010-02-16 13:15 UTC (permalink / raw)
  To: emacs-devel

Miles Bader <miles@gnu.org> writes:

> Óscar Fuentes <ofv@wanadoo.es> writes:
>>> * It seems like it should only show these buttons if the log listing
>>> gets interrupted for some reason.
>>
>> For this, VC-log needs to count how many revisions it is showing and
>> compare with the number of revisions on the branch. Looks like too much
>> work. OTOH, on some backends (i.e. git) it is difficult to differentiate
>> the first (oldest) revision from any other on the log listing, as it
>> lacks revision numbers.
>
> I don't understand this....
>
> The underlying log command outputs all revisions by default, so if it
> didn't output all of them, that must have explicitly been requested by
> emacs, so emacs should know about it.

By default, Emacs asks to the underlying log command to output
`vc-log-show-limit' items, which right now defaults to 2000. However, if
there are less revisions, Emacs would need to detect this circumstance
somehow for knowing that the buttons are of no use.

> [Also, is it supposed to be operating incrementally?  At least with git,
> it just pauses for a while and then outputs the entire log at once.]

AFAIK, it runs asynchronously.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pointless buttons at end of VC log buffers
  2010-02-16 13:15     ` Óscar Fuentes
@ 2010-02-16 13:54       ` Miles Bader
  2010-02-16 16:49         ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Miles Bader @ 2010-02-16 13:54 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: emacs-devel

Óscar Fuentes <ofv@wanadoo.es> writes:
> By default, Emacs asks to the underlying log command to output
> `vc-log-show-limit' items, which right now defaults to 2000. However, if
> there are less revisions, Emacs would need to detect this circumstance
> somehow for knowing that the buttons are of no use.

Hmm, it seems quite feasible to detect the number, though it might be
backend-specific.

[With git: either count the lines, if doing a short log, or count the
occurances of "^commit" if doing a standard log]

-Miles

-- 
Defenceless, adj. Unable to attack.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pointless buttons at end of VC log buffers
  2010-02-16 13:54       ` Miles Bader
@ 2010-02-16 16:49         ` Stefan Monnier
  2010-02-17 22:36           ` Miles Bader
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2010-02-16 16:49 UTC (permalink / raw)
  To: Miles Bader; +Cc: Óscar Fuentes, emacs-devel

>> By default, Emacs asks to the underlying log command to output
>> `vc-log-show-limit' items, which right now defaults to 2000. However, if
>> there are less revisions, Emacs would need to detect this circumstance
>> somehow for knowing that the buttons are of no use.
> Hmm, it seems quite feasible to detect the number, though it might be
> backend-specific.

Yes, the info whether the list is complete or not should be returned by
the backend (so it can either count the lines or do whatever else works).


        Stefan




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pointless buttons at end of VC log buffers
  2010-02-16 16:49         ` Stefan Monnier
@ 2010-02-17 22:36           ` Miles Bader
  0 siblings, 0 replies; 7+ messages in thread
From: Miles Bader @ 2010-02-17 22:36 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Óscar Fuentes, emacs-devel

BTW, the following patch should add the missing newline for git (a
further blank line added in the generic part would also make things prettier):


diff --git a/lisp/vc-git.el b/lisp/vc-git.el
index 0d8e630..ad99e2e 100644
--- a/lisp/vc-git.el
+++ b/lisp/vc-git.el
@@ -551,7 +551,7 @@ If nil, use the value of `vc-diff-switches'.  If t, use no switches."
 		'("log" "--no-color")
 		(when shortlog
 		  '("--graph" "--decorate"
-		    "--date=short" "--pretty=format:%d%h  %ad  %s" "--abbrev-commit"))
+		    "--date=short" "--pretty=tformat:%d%h  %ad  %s" "--abbrev-commit"))
 		(when limit (list "-n" (format "%s" limit)))
 		(when start-revision (list start-revision))
 		'("--")))))))


Thanks,

-Miles

-- 
One of the lessons of history is that nothing is often a good thing to
do, and always a clever thing to say.  -- Will Durant




^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-02-17 22:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-16  4:42 pointless buttons at end of VC log buffers Miles Bader
2010-02-16  5:38 ` Óscar Fuentes
2010-02-16  8:43   ` Miles Bader
2010-02-16 13:15     ` Óscar Fuentes
2010-02-16 13:54       ` Miles Bader
2010-02-16 16:49         ` Stefan Monnier
2010-02-17 22:36           ` Miles Bader

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).