From a937396e7626a2a217e747aa1320d669f2323032 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sat, 14 Feb 2026 02:46:32 +0200 Subject: [PATCH] vc-log-show-limit: Change default to 500, and the button to 4X * lisp/vc/vc.el (vc-log-show-limit): Change the default to 500 (bug#80037). (vc-print-log-setup-buttons): Have the first button prompt and propose 4X the current limit as the default. (vc-print-fileset-branch-log): Update the reference to the changed button text. * lisp/vc/log-view.el (log-view-end-of-defun-1): Same. * doc/emacs/maintaining.texi (VC Change Log): Also here. --- doc/emacs/maintaining.texi | 2 +- lisp/vc/log-view.el | 2 +- lisp/vc/vc.el | 14 ++++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 1d54af130a9..0d9a0de8221 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1327,7 +1327,7 @@ Because fetching many log entries can be slow, the default. The variable @code{vc-log-show-limit} specifies this limit; if you set the value to zero, that removes the limit. You can also increase the number of revisions shown in an existing -@file{*vc-change-log*} buffer by clicking on the @samp{Show 2X +@file{*vc-change-log*} buffer by clicking on the @samp{Show 4X entries} or @samp{Show unlimited entries} buttons at the end of the buffer. However, RCS, SCCS, CVS, and SRC do not support this feature. diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el index 27c62847b50..0e9fa5f5085 100644 --- a/lisp/vc/log-view.el +++ b/lisp/vc/log-view.el @@ -599,7 +599,7 @@ It assumes that a log entry starts with a line matching (goto-char (match-beginning 0)))) ;; Don't advance past the end buttons inserted by ;; `vc-print-log-setup-buttons'. - ((looking-back "Show 2X entries Show unlimited entries" + ((looking-back "Show 4X entries Show unlimited entries" (line-beginning-position)) (setq looping nil) (forward-line -1)) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 88324a2a444..5809b5b15ae 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1023,7 +1023,7 @@ for the backend you use." (repeat :tag "Argument List" :value ("") string)) :version "25.1") -(defcustom vc-log-show-limit 2000 +(defcustom vc-log-show-limit 500 "Limit the number of items shown by the VC log commands. Zero means unlimited. Not all VC backends are able to support this feature." @@ -4046,11 +4046,12 @@ or if PL-RETURN is `limit-unsupported'." (goto-char (point-max)) (insert "\n") (insert-text-button - "Show 2X entries" + "Show 4X entries" 'action (lambda (&rest _ignore) - (vc-print-log-internal - log-view-vc-backend log-view-vc-fileset - working-revision nil (* 2 limit))) + (let ((new-limit (read-number "How many: " (* 4 limit)))) + (vc-print-log-internal + log-view-vc-backend log-view-vc-fileset + working-revision nil new-limit))) 'help-echo "Show the log again, and double the number of log entries shown") (insert " ") @@ -4354,7 +4355,8 @@ can specify a revision ID instead of a branch name to produce a log starting at that revision. Tags and remote references also work." ;; Currently the prefix argument is conserved. Possibly it could be ;; used to prompt for a LIMIT argument like \\`C-x v l' has. Though - ;; now we have "Show 2X entries" and "Show unlimited entries" that + ;; now we have "Show 4X entries" and "Show unlimited entries" that + ;; might be a waste of the prefix argument to this command. --spwhitton (interactive (list (vc--read-branch-to-log t))) (let ((fileset (vc-deduce-fileset t)))