From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#25506: 26.0.50; Buffer-menu-bury gets (void-variable tabulated-list--near-rows) Date: Sun, 22 Jan 2017 14:33:31 +0900 Message-ID: <87y3y3y7ys.fsf@gmail.com> References: <22659.49630.215179.756533@gargle.gargle.HOWL> <87h94rmznv.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1485063271 3596 195.159.176.226 (22 Jan 2017 05:34:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 22 Jan 2017 05:34:31 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: 25506-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 22 06:34:27 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cVAnH-0008V1-F1 for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Jan 2017 06:34:23 +0100 Original-Received: from localhost ([::1]:34523 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVAnK-0001CE-W9 for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Jan 2017 00:34:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVAmz-00015M-DZ for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2017 00:34:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cVAmw-0003bS-Ac for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2017 00:34:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39713) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cVAmw-0003bK-6Y for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2017 00:34:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cVAmv-0005ZY-TJ for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2017 00:34:01 -0500 Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Jan 2017 05:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 25506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 25506@debbugs.gnu.org, tino.calancha@gmail.com, rogers@modulargenetics.com Original-Received: via spool by 25506-done@debbugs.gnu.org id=D25506.148506322321385 (code D ref 25506); Sun, 22 Jan 2017 05:34:01 +0000 Original-Received: (at 25506-done) by debbugs.gnu.org; 22 Jan 2017 05:33:43 +0000 Original-Received: from localhost ([127.0.0.1]:37910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cVAmd-0005Yr-1V for submit@debbugs.gnu.org; Sun, 22 Jan 2017 00:33:43 -0500 Original-Received: from mail-pg0-f41.google.com ([74.125.83.41]:35754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cVAmb-0005Ye-Nh for 25506-done@debbugs.gnu.org; Sun, 22 Jan 2017 00:33:42 -0500 Original-Received: by mail-pg0-f41.google.com with SMTP id 194so35192145pgd.2 for <25506-done@debbugs.gnu.org>; Sat, 21 Jan 2017 21:33:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=NR1NV4D5bX3vO0E8LnHPi2wyhQAAehqMwXfwWrCC2Jo=; b=eTwR8wEdKwfVJGQaMwZ9sgE07xh/a4gunBqHOKgfrt0ZbKRU/y1Sn2VoNc3uFfII3K oBgUNjSGjQvZFS3G0XRYiH9UaMt82Plbm4FFmiYHcXGn8nFFNukHBhYkBLXZfKDNNbvz oa7OSgVThdWEToy+ljthiQrU9Mwcy80vtV+QYRkkhS3gGPAHbZkvJCVmL71SEeMvgRts JLwcU8LIfczoEZtfElQF/hskgHxK2ArZCNVYWPd/nbfDUaGeQ8gsxrUU6InjVmiHCXWP stfQDCDN8qxE3S7Xa+Y4J+rclNQA7rfjUKELjuyWwInAR4IGI4CC3EUV5ffA9GFpOapc Z4aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=NR1NV4D5bX3vO0E8LnHPi2wyhQAAehqMwXfwWrCC2Jo=; b=Ay5eZnstH5aWy6yupLDWZEm2dzvsJIUWTuSPbq8yvKgn811rnK1jDubaBudockWj9V KtzxmEHCPm6cUAc0rMeLxuIf1gMKDjRH9SM1x71NTyAWN+8cVUsSvSN9Y5XtBHNdQi4U Ub6Pi3EqHyARyqtFqzYx7pkCn1cwVBL4bHmNXuksjnmf+Nc6RICKJkwvTFH70z9fJnB3 t6emNPcobZhvxGGbPbn4Tod7oxXT0q5giE0GZaUp15Sqh4NnmBA/NjqA3b6nteTGDnXL vhwhN3pDBnlvrS6DAtVSwWzUFGD05H0QziIqJ5ERU2icoQm5jimquEcP0iPn0Mjq4Cgq ytRQ== X-Gm-Message-State: AIkVDXIA0x5Rr9z5cYXIodNv4szm+PbfqE3sqK6tmj6NSNU3zgwS9YEBvM/Ok7U+RoSlPw== X-Received: by 10.98.211.220 with SMTP id z89mr24991547pfk.3.1485063215969; Sat, 21 Jan 2017 21:33:35 -0800 (PST) Original-Received: from calancha-pc (33.94.100.220.dy.bbexcite.jp. [220.100.94.33]) by smtp.gmail.com with ESMTPSA id n70sm27365087pfg.34.2017.01.21.21.33.34 for <25506-done@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 21 Jan 2017 21:33:35 -0800 (PST) In-Reply-To: <87h94rmznv.fsf@gmail.com> (Tino Calancha's message of "Sun, 22 Jan 2017 14:28:20 +0900") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:128309 Archived-At: Tino Calancha writes: > Bob Rogers writes: > >> This has been happening for a while now in master, but not in the >> 25.1 release. To reproduce: >> >> 1. emacs -Q >> >> 2. "C-x C-b" (which shows the buffer menu with *scratch* and >> *Messages* in a new window), and "C-x o" (which moves the cursor into >> this window in front of *scratch*). >> >> 3. "b" to invoke Buffer-menu-bury. The line with the *scratch* >> buffer should move below *Messages*; instead, it is erased and only >> partly redrawn in the new location, and the error message "Symbol s >> value as variable is void: tabulated-list--near-rows" is displayed. > Thank you very much for report this bug! > Such `tabulated-list--near-rows' must be bound before > a call to `tabulated-list-print-col', because the latter use the former > via `tabulated-list--col-local-max-widths'. >> The patch below restores the expected behavior, but it's a kludge to >> require buff-menu.el to know so much about tabulated-list.el innards. > I agree with you. The variable `tabulated-list--near-rows' is intended > just for internal use in tabulated-list.el. > I am going to apply the following patch: > > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >>>From ade0652cc2a7103cd910accda8165ff8ee7c719f Mon Sep 17 00:00:00 2001 > From: Tino Calancha > Date: Sun, 22 Jan 2017 14:23:45 +0900 > Subject: [PATCH] Prevent to use tabulated-list--near-rows unbound > > * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-entry): > Make sure 'tabulated-list--near-rows' is bound before use it (Bug#25506). > --- > lisp/emacs-lisp/tabulated-list.el | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el > index eadf79ffd4..b6b49b1bfa 100644 > --- a/lisp/emacs-lisp/tabulated-list.el > +++ b/lisp/emacs-lisp/tabulated-list.el > @@ -412,8 +412,13 @@ tabulated-list-print-entry > (inhibit-read-only t)) > (if (> tabulated-list-padding 0) > (insert (make-string x ?\s))) > - (dotimes (n ncols) > - (setq x (tabulated-list-print-col n (aref cols n) x))) > + (let ((tabulated-list--near-rows ; Bind it if not bound yet (Bug#25506). > + (or (bound-and-true-p tabulated-list--near-rows) > + (list (or (tabulated-list-get-entry (point-at-bol 0)) > + cols) > + cols)))) > + (dotimes (n ncols) > + (setq x (tabulated-list-print-col n (aref cols n) x)))) > (insert ?\n) > ;; Ever so slightly faster than calling `put-text-property' twice. > (add-text-properties Pushed to master branch as commit ade0652cc2a7103cd910accda8165ff8ee7c719f