unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: limit the number of log entries displayed by C-x v l
Date: Mon, 16 Nov 2009 01:40:40 -0800 (PST)	[thread overview]
Message-ID: <200911160940.nAG9ee0a012894@godzilla.ics.uci.edu> (raw)
In-Reply-To: <200911152055.nAFKtI8E006868@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Sun, 15 Nov 2009 12:55:18 -0800 (PST)")

Dan Nicolaescu <dann@ics.uci.edu> writes:

  > I'll work on adding button(s) to request more entries.

Here's how this can be done.  OK?

Index: vc.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc.el,v
retrieving revision 1.739
diff -u -3 -p -r1.739 vc.el
--- vc.el	15 Nov 2009 20:29:02 -0000	1.739
+++ vc.el	16 Nov 2009 09:34:00 -0000
@@ -1858,6 +1858,10 @@ Not all VC backends support short logs!"
 	  (not (null (if dir-present
 			 (memq 'directory vc-log-short-style)
 		       (memq 'file vc-log-short-style)))))
+
+    ;; Some backends cannot support output limits.
+    (when (memq backend '(RCS CVS SCCS)) (setq limit nil))
+
     (vc-call-backend backend 'print-log files "*vc-change-log*" vc-short-log limit)
     (pop-to-buffer "*vc-change-log*")
     (vc-exec-after
@@ -1867,6 +1871,23 @@ Not all VC backends support short logs!"
 	(set (make-local-variable 'log-view-vc-backend) ',backend)
 	(set (make-local-variable 'log-view-vc-fileset) ',files)
 
+	(when ,limit
+	  (goto-char (point-max))
+	  (widget-create 'push-button
+			 :notify (lambda (&rest ignore)
+				   (vc-print-log-internal
+				    ',backend ',files ',working-revision (* 2 ,limit)))
+			 :help-echo "Show the log again, and double the number of log entries shown"
+			 "Show 2X entries")
+	  (widget-insert "    ")
+	  (widget-create 'push-button
+			 :notify (lambda (&rest ignore)
+				   (vc-print-log-internal
+				    ',backend ',files ',working-revision nil))
+			 :help-echo "Show the log again, showing all entries"
+			 "Show unlimited entries")
+	  (widget-setup))
+
 	(shrink-window-if-larger-than-buffer)
 	;; move point to the log entry for the working revision
 	(vc-call-backend ',backend 'show-log-entry ',working-revision)
Index: log-view.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/log-view.el,v
retrieving revision 1.61
diff -u -3 -p -r1.61 log-view.el
--- log-view.el	5 Oct 2009 15:10:04 -0000	1.61
+++ log-view.el	16 Nov 2009 09:34:01 -0000
@@ -139,6 +139,7 @@
     ("\M-n" . log-view-file-next)
     ("\M-p" . log-view-file-prev))
   "Log-View's keymap."
+  :inherit widget-keymap
   :group 'log-view)
 
 (easy-menu-define log-view-mode-menu log-view-mode-map




  parent reply	other threads:[~2009-11-16  9:40 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-12 23:19 limit the number of log entries displayed by C-x v l Dan Nicolaescu
2009-11-13  1:18 ` Stefan Monnier
2009-11-13  2:21   ` Dan Nicolaescu
2009-11-13  3:19     ` Stefan Monnier
2009-11-13  5:02       ` Dan Nicolaescu
2009-11-13 14:10         ` Stefan Monnier
2009-11-15 20:55           ` Dan Nicolaescu
2009-11-15 21:34             ` Chong Yidong
2009-11-16  9:40             ` Dan Nicolaescu [this message]
2009-11-16 14:22               ` Stefan Monnier
2009-11-16 15:10                 ` Dan Nicolaescu
2009-11-16 15:41                   ` Stefan Monnier
2009-11-16 20:40                     ` Dan Nicolaescu
2009-11-17 13:44           ` Dan Nicolaescu
2009-11-17 19:54             ` Stefan Monnier
2009-11-18 18:19               ` Dan Nicolaescu
2009-11-19  0:52                 ` Stefan Monnier
2009-11-19  7:23                   ` Thierry Volpiatto
2009-11-20  6:59                     ` Dan Nicolaescu
2009-11-20  7:19                       ` Thierry Volpiatto
2009-11-20 14:11                       ` Stefan Monnier
2009-11-20 15:26                         ` Dan Nicolaescu
2009-11-21  4:27                           ` Stephen J. Turnbull
2009-11-22 20:12                             ` Stefan Monnier
2009-11-22 23:02                               ` Štěpán Němec
2009-11-23  2:29                                 ` Stefan Monnier
2009-11-23  3:49                                   ` Bob Rogers
2009-11-23  5:17                                     ` Stefan Monnier
2009-11-22 20:10                           ` Stefan Monnier
2009-12-06 17:43                   ` Dan Nicolaescu
2009-12-07  2:12                     ` Stefan Monnier
2009-11-13  6:59     ` Giorgos Keramidas
2009-11-14 10:10 ` Alfred M. Szmidt
2009-11-14 23:29   ` Richard Stallman
2009-11-14 23:34     ` Andreas Schwab
2009-11-15 22:38       ` Richard Stallman
2009-11-15 22:52         ` Andreas Schwab
2009-11-17  7:56           ` Richard Stallman

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=200911160940.nAG9ee0a012894@godzilla.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 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).