GNU bug report logs - #25506
26.0.50; Buffer-menu-bury gets (void-variable tabulated-list--near-rows)

Previous Next

Package: emacs;

Reported by: Bob Rogers <rogers <at> modulargenetics.com>

Date: Sat, 21 Jan 2017 20:18:02 UTC

Severity: normal

Found in version 26.0.50

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25506 in the body.
You can then email your comments to 25506 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25506; Package emacs. (Sat, 21 Jan 2017 20:18:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bob Rogers <rogers <at> modulargenetics.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 21 Jan 2017 20:18:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bob Rogers <rogers <at> modulargenetics.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50;
 Buffer-menu-bury gets (void-variable tabulated-list--near-rows)
Date: Sat, 21 Jan 2017 15:17:34 -0500
   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.

   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.

					-- Bob Rogers
					   http://www.rgrjr.com/

------------------------------------------------------------------------
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 77b325f..27a00b9 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -595,7 +595,10 @@ Buffer-menu-bury
 	   (save-excursion
 	     (let ((elt (tabulated-list-delete-entry)))
 	       (goto-char (point-max))
-	       (apply 'tabulated-list-print-entry elt)))
+               (let ((tabulated-list--near-rows
+                       (list
+                         (tabulated-list-get-entry (point-at-bol 0)))))
+                 (apply 'tabulated-list-print-entry elt))))
 	   (message "Buffer buried."))
 	  (t
 	   (tabulated-list-delete-entry)
------------------------------------------------------------------------
In GNU Emacs 26.0.50.1 (x86_64-suse-linux-gnu, GTK+ Version 2.24.31)
 of 2017-01-21 built on orion
Repository revision: 07d15164271270d09464863d7ec2bfce62d65085
Windowing system distributor 'The X.Org Foundation', version 11.0.11601000
System Description:	openSUSE 13.2 (Harlequin) (x86_64)

Recent messages:
Read-Only mode disabled in current buffer
Mark set
Buffer-menu-bury
Buffer buried. [6 times]
Mark set
Auto-saving...
Undo! [14 times]
user-error: No further undo information
Buffer buried. [2 times]
Making completion list... [2 times]

Configured using:
 'configure --without-dbus --without-gsettings --without-gconf'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY GNUTLS FREETYPE XFT ZLIB
TOOLKIT_SCROLL_BARS GTK2 X11

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  diff-auto-refine-mode: t
  global-eldoc-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Load-path shadows:
/usr/share/emacs/site-lisp/suse-start-vm hides /usr/share/emacs/site-lisp/vm/suse-start-vm
/usr/share/emacs/site-lisp/site-start hides /usr/local/share/emacs/site-lisp/site-start
/home/rogers/emacs/imported/loaddefs hides /usr/local/share/emacs/26.0.50/lisp/loaddefs

Features:
(shadow sort mail-extr emacsbug message subr-x puny seq rgr-dired dired
dired-loaddefs format-spec rfc822 mml mml-sec epa derived epg epg-config
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils warnings cl-indent misearch
multi-isearch jka-compr vc-git diff-mode easy-mmode debug rgr-diff-hacks
diff rgr-lisp-hacks rgr-elisp-hacks ilisp-possibilities
rgr-abbrev-completion rgr-mouse browse-url ilisp-mouse rgr-x11-hacks
ffap-local-url-patch ffap thingatpt url-parse auth-source password-cache
url-vars rgr-ffap rgr-hacks etags xref cl-seq project eieio byte-opt
bytecomp byte-compile cl-extra help-mode easymenu cconv eieio-core
cl-macs gv eieio-loaddefs cl-loaddefs pcase cl-lib ring time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript case-table
epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote inotify dynamic-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 122441 7102)
 (symbols 48 22686 1)
 (miscs 40 121 311)
 (strings 32 25910 4873)
 (string-bytes 1 813969)
 (vectors 16 17060)
 (vector-slots 8 497386 2281)
 (floats 8 257 266)
 (intervals 56 1147 247)
 (buffers 976 17)
 (heap 1024 25223 1302))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25506; Package emacs. (Sun, 22 Jan 2017 05:29:01 GMT) Full text and rfc822 format available.

Message #8 received at 25506 <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <tino.calancha <at> gmail.com>
To: Bob Rogers <rogers <at> modulargenetics.com>
Cc: 25506 <at> debbugs.gnu.org
Subject: Re: bug#25506: 26.0.50;
 Buffer-menu-bury gets (void-variable tabulated-list--near-rows)
Date: Sun, 22 Jan 2017 14:28:20 +0900
Bob Rogers <rogers <at> modulargenetics.com> 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 <tino.calancha <at> gmail.com>
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
-- 
2.11.0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
In GNU Emacs 26.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.6)
 of 2017-01-
Repository revision: ad29e145b16cf2966e3a9df884cbc234f1ae3e51





Reply sent to Tino Calancha <tino.calancha <at> gmail.com>:
You have taken responsibility. (Sun, 22 Jan 2017 05:34:01 GMT) Full text and rfc822 format available.

Notification sent to Bob Rogers <rogers <at> modulargenetics.com>:
bug acknowledged by developer. (Sun, 22 Jan 2017 05:34:01 GMT) Full text and rfc822 format available.

Message #13 received at 25506-done <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <tino.calancha <at> gmail.com>
To: 25506-done <at> debbugs.gnu.org
Subject: Re: bug#25506: 26.0.50;
 Buffer-menu-bury gets (void-variable tabulated-list--near-rows)
Date: Sun, 22 Jan 2017 14:33:31 +0900
Tino Calancha <tino.calancha <at> gmail.com> writes:

> Bob Rogers <rogers <at> modulargenetics.com> 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 <tino.calancha <at> gmail.com>
> 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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 19 Feb 2017 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 122 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.