From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#68364: Print log buttons fail with vc-log-mergebase Date: Wed, 10 Jan 2024 19:20:05 +0200 Organization: LINKOV.NET Message-ID: <86jzohp0ti.fsf@mail.linkov.net> References: <86h6jlog76.fsf@mail.linkov.net> <94864f5e-9e3a-44dd-a7d7-31c93d2d09c9@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7130"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 68364@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 10 18:22:46 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rNcHu-0001ba-JU for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Jan 2024 18:22:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNcHP-0002DO-2D; Wed, 10 Jan 2024 12:22:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNcHG-00028j-OB for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 12:22:07 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNcHE-0006JI-R1 for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 12:22:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rNcHD-0004uQ-GY for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 12:22:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Jan 2024 17:22:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68364 X-GNU-PR-Package: emacs Original-Received: via spool by 68364-submit@debbugs.gnu.org id=B68364.170490731518822 (code B ref 68364); Wed, 10 Jan 2024 17:22:03 +0000 Original-Received: (at 68364) by debbugs.gnu.org; 10 Jan 2024 17:21:55 +0000 Original-Received: from localhost ([127.0.0.1]:42726 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNcH5-0004tQ-BB for submit@debbugs.gnu.org; Wed, 10 Jan 2024 12:21:55 -0500 Original-Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]:48281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNcH2-0004so-VM for 68364@debbugs.gnu.org; Wed, 10 Jan 2024 12:21:53 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id CBEBBFF806; Wed, 10 Jan 2024 17:21:47 +0000 (UTC) In-Reply-To: <94864f5e-9e3a-44dd-a7d7-31c93d2d09c9@gutov.dev> (Dmitry Gutov's message of "Wed, 10 Jan 2024 15:18:26 +0200") X-GND-Sasl: juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277786 Archived-At: >> Buttons to show more log entries is a nice feature, >> but after the recent change this doesn't work with >> 'C-x v M L' (vc-log-mergebase): >> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p >> "branch-2") >> vc-print-log-setup-buttons("branch-1" t "branch-2" nil) >> Probably it requires a special handling for 'C-x v M L'. > > Does this help? > > Looks like the description of the LIMIT argument wasn't updated in the > vc-print-log-internal's docstring, when it started to be a string > sometimes. The description of the LIMIT argument in vc-print-log-internal looks strange: "Show up to LIMIT entries (non-nil means unlimited)." Maybe it should be "(nil means unlimited)"? > diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el > index b8cc44fc3dc..7d5a5486250 100644 > --- a/lisp/vc/vc.el > +++ b/lisp/vc/vc.el > @@ -2711,7 +2711,7 @@ vc-print-log-setup-buttons > ;; In either case only one revision is wanted, no buttons. > (when (and limit (not (eq 'limit-unsupported pl-return)) > (not (and is-start-revision > - (= limit 1)))) > + (eql limit 1)))) > (let ((entries 0)) > (goto-char (point-min)) > (while (re-search-forward log-view-message-re nil t) Sorry, still fails on another line: (if (< entries limit) But this works: diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index b8cc44fc3dc..d284b19fcf0 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2709,7 +2709,8 @@ vc-print-log-setup-buttons ;; LIMIT=1 is set by vc-annotate-show-log-revision-at-line ;; or by vc-print-root-log with current-prefix-arg=1. ;; In either case only one revision is wanted, no buttons. - (when (and limit (not (eq 'limit-unsupported pl-return)) + (when (and limit (not (stringp limit)) + (not (eq 'limit-unsupported pl-return)) (not (and is-start-revision (= limit 1)))) (let ((entries 0))