GNU bug report logs - #25931
25.1; ERT "show messages" error

Previous Next

Package: emacs;

Reported by: Live System User <nyc4bos <at> aol.com>

Date: Thu, 2 Mar 2017 10:29:01 UTC

Severity: minor

Merged with 30743

Found in versions 25.1, 26.0.91

Fixed in version 26.1

Done: Glenn Morris <rgm <at> gnu.org>

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 25931 in the body.
You can then email your comments to 25931 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#25931; Package emacs. (Thu, 02 Mar 2017 10:29:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Live System User <nyc4bos <at> aol.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 02 Mar 2017 10:29:01 GMT) Full text and rfc822 format available.

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

From: Live System User <nyc4bos <at> aol.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1; ERT "show messages" error
Date: Thu, 02 Mar 2017 05:28:38 -0500
Hi,

        When running ERT, I get the following error:

0. emacs -Q &

1. M-x ert

[Run test]

From menubar:

2. ERT Results->Show messages

   I then get a *Backtrace* buffer:
   
Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  ert--stats-test-key(nil)
  ert--stats-test-pos([cl-struct-ert--stats t [[cl-struct-ert-test venv-activate-hooks nil (lambda nil (let ((preactivate nil) (postactivate nil) (venv-preactivate-hook (quote ...)) (venv-postactivate-hook (quote ...))) (let ((venv-location temporary-file-directory)) (unwind-protect (progn ... ... ...) (venv-rmvirtualenv venv-tmp-env))))) [cl-struct-ert-test-passed "Using real prefix '/usr'\nNew python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should (equal preactivate "yes")) :form (equal "yes" "yes") :value t :explanation nil) ((should (equal postactivate "yes")) :form (equal "yes" "yes") :value t :explanation nil))] :passed nil] [cl-struct-ert-test venv-cdvirtualenv-works nil (lambda nil (let ((venv-location temporary-file-directory)) (unwind-protect (progn (venv-mkvirtualenv venv-tmp-env) (let ... ...)) (venv-rmvirtualenv venv-tmp-env)))) [cl-struct-ert-test-passed "New python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should (s-contains\? venv-tmp-env default-directory)) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-test/") :value t))] :passed nil] [cl-struct-ert-test venv-cpvirtualenv-works nil (lambda nil (let ((venv-location temporary-file-directory)) (unwind-protect (progn (venv-mkvirtualenv venv-tmp-env) (unwind-protect ... ...)) (venv-rmvirtualenv venv-tmp-env)))) [cl-struct-ert-test-passed "New python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should (s-contains\? "copy-of-tmp-env" ...)) :form (s-contains\? "copy-of-tmp-env" "copy-of-tmp-env\nemacs-venvwrapper-test") :value t))] :passed nil] [cl-struct-ert-test venv-deactivate-works nil (lambda nil (let ((venv-location temporary-file-directory)) (unwind-protect (progn (venv-mkvirtualenv venv-tmp-env) (venv-deactivate) (let ... ...) (let ... ...) (let ... ...)) (venv-rmvirtualenv venv-tmp-env))) (let ((fn-27 (function not)) (args-28 (list ...))) (let ((value-29 ...)) (let (form-description-31) (if ... nil ...)) value-29)) (let ((fn-32 (function equal)) (args-33 (list nil ...))) (let ((value-34 ...)) (let (form-description-36) (if ... nil ...)) value-34)) (let ((fn-37 (function not)) (args-38 (list ...))) (let ((value-39 ...)) (let (form-description-41) (if ... nil ...)) value-39))) [cl-struct-ert-test-passed "New python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should (equal gud-pdb-command-name "pdb")) :form (equal "pdb" "pdb") :value t :explanation nil) ((should (equal venv-current-name nil)) :form (equal nil nil) :value t :explanation nil) ((should (equal python-shell-virtualenv-path nil)) :form (equal nil nil) :value t :explanation nil) ((should (not ...)) :form (not nil) :value t) ((should (equal nil ...)) :form (equal nil nil) :value t :explanation nil) ((should (not ...)) :form (not nil) :value t))] :passed nil] [cl-struct-ert-test venv-list-virtualenvs-works nil (lambda nil (let ((venv-location temporary-file-directory)) (unwind-protect (progn (venv-mkvirtualenv venv-tmp-env) (let ... ...)) (venv-rmvirtualenv venv-tmp-env)))) [cl-struct-ert-test-passed "New python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should (s-contains\? venv-tmp-env ...)) :form (s-contains\? "emacs-venvwrapper-test" "emacs-venvwrapper-test") :value t))] :passed nil] [cl-struct-ert-test venv-mkvenv-hooks nil (lambda nil (let ((venv-premkvirtualenv-hook (quote ...)) (venv-postmkvirtualenv-hook (quote ...))) (let ((venv-location temporary-file-directory)) (unwind-protect (progn ... ... ... ... ...) (venv-rmvirtualenv venv-tmp-env))))) [cl-struct-ert-test-passed "New python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should (equal preactivated "yes")) :form (equal "yes" "yes") :value t :explanation nil) ((should (equal postactivated "yes")) :form (equal "yes" "yes") :value t :explanation nil) ((should (equal name venv-tmp-env)) :form (equal "emacs-venvwrapper-test" "emacs-venvwrapper-test") :value t :explanation nil))] :passed nil] [cl-struct-ert-test venv-mkvirtualenv-works nil (lambda nil (let ((venv-location temporary-file-directory)) (unwind-protect (progn (venv-mkvirtualenv venv-tmp-env) (let ... ...) (venv-deactivate) (venv-rmvirtualenv venv-tmp-env))))) [cl-struct-ert-test-passed "New python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should (equal venv-current-name venv-tmp-env)) :form (equal "emacs-venvwrapper-test" "emacs-venvwrapper-test") :value t :explanation nil))] :passed nil] [cl-struct-ert-test venv-projectile-auto-workon-works nil (lambda nil (let ((venv-location temporary-file-directory)) (unwind-protect (progn (venv-mkvirtualenv venv-tmp-env) (let ... ...)) (venv-rmvirtualenv venv-tmp-env)))) [cl-struct-ert-test-passed "New python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should (equal gud-pdb-command-name "python -m pdb")) :form (equal "python -m pdb" "python -m pdb") :value t :explanation nil) ((should (s-contains\? venv-tmp-env venv-current-name)) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-test") :value t) ((should (file-name-absolute-p venv-current-dir)) :form (file-name-absolute-p "/tmp/emacs-venvwrapper-test") :value t) ((should (file-directory-p venv-current-dir)) :form (file-directory-p "/tmp/emacs-venvwrapper-test") :value t) ((should (s-contains\? venv-tmp-env python-shell-virtualenv-path)) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-test") :value t) ((should (s-contains\? venv-tmp-env ...)) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-testbin:/home/liveuser/perl5/bin:/home/liveuser/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin") :value t) ((should (s-contains\? venv-tmp-env ...)) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-test") :value t) ((should (s-contains\? venv-tmp-env ...)) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-testbin") :value t))] :passed nil] [cl-struct-ert-test venv-rmvirtualenv-works nil (lambda nil (let ((venv-location temporary-file-directory)) (venv-mkvirtualenv venv-tmp-env) (venv-deactivate) (venv-rmvirtualenv venv-tmp-env) (let ((fn-5 ...) (args-6 ...)) (let (...) (let ... ...) value-7)))) [cl-struct-ert-test-passed "New python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should-error (venv-workon venv-tmp-env)) :form (venv-workon "emacs-venvwrapper-test")))] :passed nil] [cl-struct-ert-test venv-set-location-works nil (lambda nil (let ((expected-venv-location "test location") (original-venv-location venv-location)) (venv-set-location expected-venv-location) (let ((fn-89 ...) (args-90 ...)) (let (...) (let ... ...) value-91)) (setq venv-location original-venv-location))) [cl-struct-ert-test-passed "" (((should (equal venv-location expected-venv-location)) :form (equal "test location" "test location") :value t :explanation nil))] :passed nil] [cl-struct-ert-test venv-workon-errors-for-nonexistance nil (lambda nil (let ((fn-42 (function venv-workon)) (args-43 (list "i-hopefully-do-not-exist"))) (let ((value-44 ...)) (let (form-description-46) (let ... ... ...)) value-44))) [cl-struct-ert-test-passed "" (((should-error (venv-workon "i-hopefully-do-not-exist")) :form (venv-workon "i-hopefully-do-not-exist")))] :passed nil] [cl-struct-ert-test venv-workon-works nil (lambda nil (let ((venv-location temporary-file-directory)) (unwind-protect (progn (venv-mkvirtualenv venv-tmp-env) (venv-deactivate) (venv-workon venv-tmp-env) (assert-venv-activated)) (venv-rmvirtualenv venv-tmp-env)))) [cl-struct-ert-test-passed "New python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should (equal gud-pdb-command-name "python -m pdb")) :form (equal "python -m pdb" "python -m pdb") :value t :explanation nil) ((should (s-contains\? venv-tmp-env venv-current-name)) :form (s-contains\? "emacs-venvwrapper-test" "emacs-venvwrapper-test") :value t) ((should (file-name-absolute-p venv-current-dir)) :form (file-name-absolute-p "/tmp/emacs-venvwrapper-test/") :value t) ((should (file-directory-p venv-current-dir)) :form (file-directory-p "/tmp/emacs-venvwrapper-test/") :value t) ((should (s-contains\? venv-tmp-env python-shell-virtualenv-path)) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-test/") :value t) ((should (s-contains\? venv-tmp-env ...)) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-test/bin:/home/liveuser/perl5/bin:/home/liveuser/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin") :value t) ((should (s-contains\? venv-tmp-env ...)) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-test/") :value t) ((should (s-contains\? venv-tmp-env ...)) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-test/bin") :value t))] :passed nil]] #s(hash-table size 12 test eql rehash-size 1.5 rehash-threshold 0.8 data (venv-activate-hooks 0 venv-cdvirtualenv-works 1 venv-cpvirtualenv-works 2 venv-deactivate-works 3 venv-list-virtualenvs-works 4 venv-mkvenv-hooks 5 venv-mkvirtualenv-works 6 venv-projectile-auto-workon-works 7 venv-rmvirtualenv-works 8 venv-set-location-works 9 venv-workon-errors-for-nonexistance 10 venv-workon-works 11)) [[cl-struct-ert-test-passed "Using real prefix '/usr'\nNew python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should (equal preactivate "yes")) :form (equal "yes" "yes") :value t :explanation nil) ((should (equal postactivate "yes")) :form (equal "yes" "yes") :value t :explanation nil))] [cl-struct-ert-test-passed "New python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should (s-contains\? venv-tmp-env default-directory)) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-test/") :value t))] [cl-struct-ert-test-passed "New python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should (s-contains\? "copy-of-tmp-env" (venv-list-virtualenvs))) :form (s-contains\? "copy-of-tmp-env" "copy-of-tmp-env\nemacs-venvwrapper-test") :value t))] [cl-struct-ert-test-passed "New python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should (equal gud-pdb-command-name "pdb")) :form (equal "pdb" "pdb") :value t :explanation nil) ((should (equal venv-current-name nil)) :form (equal nil nil) :value t :explanation nil) ((should (equal python-shell-virtualenv-path nil)) :form (equal nil nil) :value t :explanation nil) ((should (not (s-contains\? venv-tmp-env ...))) :form (not nil) :value t) ((should (equal nil (getenv "VIRTUAL_ENV"))) :form (equal nil nil) :value t :explanation nil) ((should (not (s-contains\? venv-tmp-env ...))) :form (not nil) :value t))] [cl-struct-ert-test-passed "New python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should (s-contains\? venv-tmp-env (venv-list-virtualenvs))) :form (s-contains\? "emacs-venvwrapper-test" "emacs-venvwrapper-test") :value t))] [cl-struct-ert-test-passed "New python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should (equal preactivated "yes")) :form (equal "yes" "yes") :value t :explanation nil) ((should (equal postactivated "yes")) :form (equal "yes" "yes") :value t :explanation nil) ((should (equal name venv-tmp-env)) :form (equal "emacs-venvwrapper-test" "emacs-venvwrapper-test") :value t :explanation nil))] [cl-struct-ert-test-passed "New python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should (equal venv-current-name venv-tmp-env)) :form (equal "emacs-venvwrapper-test" "emacs-venvwrapper-test") :value t :explanation nil))] [cl-struct-ert-test-passed "New python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should (equal gud-pdb-command-name "python -m pdb")) :form (equal "python -m pdb" "python -m pdb") :value t :explanation nil) ((should (s-contains\? venv-tmp-env venv-current-name)) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-test") :value t) ((should (file-name-absolute-p venv-current-dir)) :form (file-name-absolute-p "/tmp/emacs-venvwrapper-test") :value t) ((should (file-directory-p venv-current-dir)) :form (file-directory-p "/tmp/emacs-venvwrapper-test") :value t) ((should (s-contains\? venv-tmp-env python-shell-virtualenv-path)) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-test") :value t) ((should (s-contains\? venv-tmp-env (getenv "PATH"))) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-testbin:/home/liveuser/perl5/bin:/home/liveuser/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin") :value t) ((should (s-contains\? venv-tmp-env (getenv "VIRTUAL_ENV"))) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-test") :value t) ((should (s-contains\? venv-tmp-env (car exec-path))) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-testbin") :value t))] [cl-struct-ert-test-passed "New python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should-error (venv-workon venv-tmp-env)) :form (venv-workon "emacs-venvwrapper-test")))] [cl-struct-ert-test-passed "" (((should (equal venv-location expected-venv-location)) :form (equal "test location" "test location") :value t :explanation nil))] [cl-struct-ert-test-passed "" (((should-error (venv-workon "i-hopefully-do-not-exist")) :form (venv-workon "i-hopefully-do-not-exist")))] [cl-struct-ert-test-passed "New python executable in /tmp/emacs-venvwrapper-test/bin/python\nInstalling setuptools, pip, wheel...done.\n" (((should (equal gud-pdb-command-name "python -m pdb")) :form (equal "python -m pdb" "python -m pdb") :value t :explanation nil) ((should (s-contains\? venv-tmp-env venv-current-name)) :form (s-contains\? "emacs-venvwrapper-test" "emacs-venvwrapper-test") :value t) ((should (file-name-absolute-p venv-current-dir)) :form (file-name-absolute-p "/tmp/emacs-venvwrapper-test/") :value t) ((should (file-directory-p venv-current-dir)) :form (file-directory-p "/tmp/emacs-venvwrapper-test/") :value t) ((should (s-contains\? venv-tmp-env python-shell-virtualenv-path)) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-test/") :value t) ((should (s-contains\? venv-tmp-env (getenv "PATH"))) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-test/bin:/home/liveuser/perl5/bin:/home/liveuser/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin") :value t) ((should (s-contains\? venv-tmp-env (getenv "VIRTUAL_ENV"))) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-test/") :value t) ((should (s-contains\? venv-tmp-env (car exec-path))) :form (s-contains\? "emacs-venvwrapper-test" "/tmp/emacs-venvwrapper-test/bin") :value t))]] [(22711 58710 803256 669000) (22711 58713 73575 481000) (22711 58715 339119 982000) (22711 58717 690483 466000) (22711 58719 906411 291000) (22711 58722 219434 915000) (22711 58724 434030 144000) (22711 58727 42349 921000) (22711 58729 383759 897000) (22711 58731 625837 219000) (22711 58731 626217 564000) (22711 58731 626499 451000)] [(22711 58713 70138 833000) (22711 58715 336376 492000) (22711 58717 686817 603000) (22711 58719 901417 761000) (22711 58722 216376 971000) (22711 58724 431009 845000) (22711 58727 39124 506000) (22711 58729 380748 422000) (22711 58731 621699 698000) (22711 58731 626183 225000) (22711 58731 626445 632000) (22711 58733 836442 885000)] 12 0 0 0 0 (22711 58710 789501 278000) (22711 58733 853358 70000) nil nil 1488446829.955228] nil)
  ert-results-pop-to-messages-for-test-at-point()
  funcall-interactively(ert-results-pop-to-messages-for-test-at-point)
  call-interactively(ert-results-pop-to-messages-for-test-at-point nil nil)
  command-execute(ert-results-pop-to-messages-for-test-at-point)


   Thanks.



In GNU Emacs 25.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.20.9)
 of 2016-10-13 built on buildvm-05.phx2.fedoraproject.org
Windowing system distributor 'Fedora Project', version 11.0.11803000
Configured using:
 'configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
 --with-gpm=no --with-xwidgets build_alias=x86_64-redhat-linux-gnu
 host_alias=x86_64-redhat-linux-gnu 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
 -m64 -mtune=generic' LDFLAGS=-Wl,-z,relro
 PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XWIDGETS

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Group

Minor modes in effect:
  cursor-sensor-mode: t
  gnus-undo-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-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
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
250 2.1.0 Ok
250 2.1.5 Ok
354 End data with <CR><LF>.<CR><LF>
Sending email 
Sending email done
250 2.0.0 Ok: queued as F400538000095
221 2.0.0 Bye
Sending...done
Discard changes to this group and exit? (y or n) y
Making completion list... [3 times]

Load-path shadows:
~/.emacs.d/lisp/gdb-mi hides /usr/share/emacs/25.1/lisp/progmodes/gdb-mi

Features:
(shadow emacsbug mailalias smtpmail sendmail thingatpt etags xref
project ring misearch multi-isearch sort gnus-cite smiley ansi-color
mail-extr gnus-async gnus-bcklg gnus-dup qp gnus-ml disp-table
cursor-sensor nndraft nnmh mm-archive jka-compr timezone url-http url-gw
url-cache url-auth url-handlers utf-7 rfc2104 nnfolder network-stream
nsm starttls gnus-agent gnus-srvr gnus-score score-mode nnvirtual
gnus-msg nntp gnus-cache epa-file epa derived nnreddit mm-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util url-parse auth-source cl-seq eieio eieio-core
cl-macs url-vars json map seq byte-opt bytecomp byte-compile cl-extra
cconv gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap cl gv
sieve sieve-mode sieve-manage nnir gnus-sum gnus-group gnus-undo
gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc
parse-time gnus-spec gnus-int gnus-range message dired format-spec
rfc822 mml mml-sec password-cache epg epg-config mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev
gmm-utils mailheader gnus-win gnus gnus-ems wid-edit nnoo nnheader
gnus-util mm-util help-fns help-mode easymenu cl-loaddefs pcase cl-lib
mail-prsvr mail-utils time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core 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 charscript case-table epa-hook jka-cmpr-hook help
simple abbrev 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
dbusbind inotify dynamic-setting system-font-setting font-render-setting
xwidget-internal move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 20710438 836754)
 (symbols 48 246820 59)
 (miscs 40 252 1237)
 (strings 32 1340214 60180)
 (string-bytes 1 88321431)
 (vectors 16 239820)
 (vector-slots 8 3573784 54801)
 (floats 8 447 1932)
 (intervals 56 3090703 8519)
 (buffers 976 53)
 (heap 1024 776098 41763))




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Thu, 02 Mar 2017 20:43:02 GMT) Full text and rfc822 format available.

Notification sent to Live System User <nyc4bos <at> aol.com>:
bug acknowledged by developer. (Thu, 02 Mar 2017 20:43:03 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: 25931-done <at> debbugs.gnu.org
Subject: Re: bug#25931: 25.1; ERT "show messages" error
Date: Thu, 02 Mar 2017 15:42:36 -0500
Version: 26.1

commit dacafa8
Date:   Thu Mar 2 15:40:15 2017 -0500

    Ert commands to error if no test at point (bug#25931)
    
    * lisp/emacs-lisp/ert.el (ert-results-mode-menu):
    Deactivate some items if no test at point.
    (ert--results-test-at-point-no-redefinition):
    Add option to signal an error rather than return nil.
    (ert-results-pop-to-backtrace-for-test-at-point)
    (ert-results-pop-to-messages-for-test-at-point)
    (ert-results-pop-to-should-forms-for-test-at-point)
    (ert-results-describe-test-at-point): Error if no test at point.

diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index 785f4ac..cadd66c 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -2079,14 +2079,23 @@ and how to display message."
   '("ERT Results"
     ["Re-run all tests" ert-results-rerun-all-tests]
     "--"
-    ["Re-run test" ert-results-rerun-test-at-point]
-    ["Debug test" ert-results-rerun-test-at-point-debugging-errors]
-    ["Show test definition" ert-results-find-test-at-point-other-window]
+    ;; FIXME?  Why are there (at least) 3 different ways to decide if
+    ;; there is a test at point?
+    ["Re-run test" ert-results-rerun-test-at-point
+     :active (car (ert--results-test-at-point-allow-redefinition))]
+    ["Debug test" ert-results-rerun-test-at-point-debugging-errors
+     :active (car (ert--results-test-at-point-allow-redefinition))]
+    ["Show test definition" ert-results-find-test-at-point-other-window
+     :active (ert-test-at-point)]
     "--"
-    ["Show backtrace" ert-results-pop-to-backtrace-for-test-at-point]
-    ["Show messages" ert-results-pop-to-messages-for-test-at-point]
-    ["Show `should' forms" ert-results-pop-to-should-forms-for-test-at-point]
-    ["Describe test" ert-results-describe-test-at-point]
+    ["Show backtrace" ert-results-pop-to-backtrace-for-test-at-point
+     :active (ert--results-test-at-point-no-redefinition)]
+    ["Show messages" ert-results-pop-to-messages-for-test-at-point
+     :active (ert--results-test-at-point-no-redefinition)]
+    ["Show `should' forms" ert-results-pop-to-should-forms-for-test-at-point
+     :active (ert--results-test-at-point-no-redefinition)]
+    ["Describe test" ert-results-describe-test-at-point
+     :active (ert--results-test-at-point-no-redefinition)]
     "--"
     ["Delete test" ert-delete-test]
     "--"
@@ -2237,22 +2246,24 @@ To be used in the ERT results buffer."
         (and (ert-test-boundp sym)
              sym))))
 
-(defun ert--results-test-at-point-no-redefinition ()
+(defun ert--results-test-at-point-no-redefinition (&optional error)
   "Return the test at point, or nil.
-
+If optional argument ERROR is non-nil, signal an error rather than return nil.
 To be used in the ERT results buffer."
   (cl-assert (eql major-mode 'ert-results-mode))
-  (if (ert--results-test-node-or-null-at-point)
-      (let* ((node (ert--results-test-node-at-point))
-             (test (ert--ewoc-entry-test (ewoc-data node))))
-        test)
-    (let ((progress-bar-begin ert--results-progress-bar-button-begin))
-      (when (and (<= progress-bar-begin (point))
-                 (< (point) (button-end (button-at progress-bar-begin))))
-        (let* ((test-index (- (point) progress-bar-begin))
-               (test (aref (ert--stats-tests ert--results-stats)
+  (or
+   (if (ert--results-test-node-or-null-at-point)
+       (let* ((node (ert--results-test-node-at-point))
+              (test (ert--ewoc-entry-test (ewoc-data node))))
+         test)
+     (let ((progress-bar-begin ert--results-progress-bar-button-begin))
+       (when (and (<= progress-bar-begin (point))
+                  (< (point) (button-end (button-at progress-bar-begin))))
+         (let* ((test-index (- (point) progress-bar-begin))
+                (test (aref (ert--stats-tests ert--results-stats)
                            test-index)))
-          test)))))
+           test))))
+   (if error (user-error "No test at point"))))
 
 (defun ert--results-test-at-point-allow-redefinition ()
   "Look up the test at point, and check whether it has been redefined.
@@ -2377,7 +2388,7 @@ To be used in the ERT results buffer."
 
 To be used in the ERT results buffer."
   (interactive)
-  (let* ((test (ert--results-test-at-point-no-redefinition))
+  (let* ((test (ert--results-test-at-point-no-redefinition t))
          (stats ert--results-stats)
          (pos (ert--stats-test-pos stats test))
          (result (aref (ert--stats-test-results stats) pos)))
@@ -2406,7 +2417,7 @@ To be used in the ERT results buffer."
 
 To be used in the ERT results buffer."
   (interactive)
-  (let* ((test (ert--results-test-at-point-no-redefinition))
+  (let* ((test (ert--results-test-at-point-no-redefinition t))
          (stats ert--results-stats)
          (pos (ert--stats-test-pos stats test))
          (result (aref (ert--stats-test-results stats) pos)))
@@ -2427,7 +2438,7 @@ To be used in the ERT results buffer."
 
 To be used in the ERT results buffer."
   (interactive)
-  (let* ((test (ert--results-test-at-point-no-redefinition))
+  (let* ((test (ert--results-test-at-point-no-redefinition t))
          (stats ert--results-stats)
          (pos (ert--stats-test-pos stats test))
          (result (aref (ert--stats-test-results stats) pos)))
@@ -2554,7 +2565,7 @@ To be used in the ERT results buffer."
 
 To be used in the ERT results buffer."
   (interactive)
-  (ert-describe-test (ert--results-test-at-point-no-redefinition)))
+  (ert-describe-test (ert--results-test-at-point-no-redefinition t)))
 
 
 ;;; Actions on load/unload.




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

bug unarchived. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 21 Mar 2018 16:39:02 GMT) Full text and rfc822 format available.

Forcibly Merged 25931 30743. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 21 Mar 2018 16:39:02 GMT) Full text and rfc822 format available.

Removed tag(s) moreinfo. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 21 Mar 2018 16:39:02 GMT) Full text and rfc822 format available.

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

This bug report was last modified 6 years and 201 days ago.

Previous Next


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