Malabarba / paradox

Project for modernizing Emacs' Package Menu. With package ratings, usage statistics, customizability, and more.
GNU General Public License v2.0
560 stars 36 forks source link

Listing packages errors out #88

Closed wasamasa closed 9 years ago

wasamasa commented 9 years ago
Debugger entered--Lisp error: (invalid-function (cell (assq :stars (package-desc-extras pkg-desc))))
  (cell (assq :stars (package-desc-extras pkg-desc)))()
  paradox--print-info(([cl-struct-package-desc ace-window (0 9 0) "Quickly switch windows." ((avy (0 2 0))) single "gnu" nil ((:url . "https://github.com/abo-abo/ace-window") (:keywords "window" "location")) nil] . "available"))
  apply(paradox--print-info ([cl-struct-package-desc ace-window (0 9 0) "Quickly switch windows." ((avy (0 2 0))) single "gnu" nil ((:url . "https://github.com/abo-abo/ace-window") (:keywords "window" "location")) nil] . "available"))
  package-menu--print-info(([cl-struct-package-desc ace-window (0 9 0) "Quickly switch windows." ((avy (0 2 0))) single "gnu" nil ((:url . "https://github.com/abo-abo/ace-window") (:keywords "window" "location")) nil] . "available"))
  mapcar(package-menu--print-info (([cl-struct-package-desc ace-window (0 9 0) "Quickly switch windows." ((avy (0 2 0))) single "gnu" nil ((:url . "https://github.com/abo-abo/ace-window") (:keywords "window" "location")) nil] . "available") ([cl-struct-package-desc ack (1 3) "Interface to ack-like source code search tools" nil tar "gnu" nil ((:keywords "tools" "processes" "convenience") (:url . "https://github.com/leoliu/ack-el")) nil] . "available") ([cl-struct-package-desc ada-mode (5 1 8) "major-mode for editing Ada sources" ((wisi (1 1 1)) (cl-lib (0 4)) (emacs (24 2))) tar "gnu" nil ((:keywords "languages" "ada") (:url . "http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html")) nil] . "available") ([cl-struct-package-desc ada-ref-man (2012 0) "Ada Reference Manual 2012" nil tar "gnu" nil ((:keywords "languages" "ada") (:url . "http://stephe-leake.org/ada/arm.html")) nil] . "available") ([cl-struct-package-desc adjust-parens (3 0) "Indent and dedent Lisp code, automatically adjust close parens" nil tar "gnu" nil ((:url . "http://elpa.gnu.org/packages/adjust-parens.html")) nil] . "available") ([cl-struct-package-desc aggressive-indent (1 1) "Minor mode to aggressively keep your code always indented" ((emacs (24 1)) (names (20150125 9)) (cl-lib (0 5))) single "gnu" nil ((:url . "http://github.com/Malabarba/aggressive-indent-mode") (:keywords "indent" "lisp" "maint" "tools")) nil] . "available") ([cl-struct-package-desc ahungry-theme (1 0 9) "Ahungry color theme for Emacs.  Make sure to (load-theme 'ahungry)." ((emacs (24))) tar "gnu" nil ((:keywords "ahungry" "palette" "color" "theme" "emacs" "color-theme" "deftheme") (:url . "https://github.com/ahungry/color-theme-ahungry")) nil] . "available") ([cl-struct-package-desc all (1 0) "Edit all lines matching a given regexp" nil single "gnu" nil ((:url . "http://elpa.gnu.org/packages/all.html") (:keywords "matching")) nil] . "available") ([cl-struct-package-desc ascii-art-to-unicode (1 9) "a small artist adjunct" nil single "gnu" nil ((:url . "http://www.gnuvola.org/software/aa2u/") (:keywords "ascii" "unicode" "box-drawing")) nil] . "available") ([cl-struct-package-desc auctex (11 88 6) "Integrated environment for *TeX*" nil tar "gnu" nil ((:url . "http://www.gnu.org/software/auctex/")) nil] . "available") ([cl-struct-package-desc aumix-mode (7) "run the aumix program in a buffer" nil single "gnu" nil ((:url . "http://user42.tuxfamily.org/aumix-mode/index.html") (:keywords "multimedia" "mixer" "aumix")) nil] . "available") ([cl-struct-package-desc auto-overlays (0 10 9) "Automatic regexp-delimited overlays" nil tar "gnu" nil ((:keywords "extensions") (:url . "http://www.dr-qubit.org/emacs.php")) nil] . "available") ([cl-struct-package-desc avy (0 3 0) "set-based completion" ((emacs (24 1)) (cl-lib (0 5))) tar "gnu" nil ((:keywords "point" "location") (:url . "https://github.com/abo-abo/avy")) nil] . "available") ([cl-struct-package-desc bug-hunter (0 5) "Hunt down errors in elisp files" ((seq (1 3)) (cl-lib (0 5))) single "gnu" nil ((:url . "http://github.com/Malabarba/elisp-bug-hunter") (:keywords "lisp")) nil] . "available") ([cl-struct-package-desc caps-lock (1 0) "Caps-lock as a minor mode" nil single "gnu" nil ((:url . "http://elpa.gnu.org/packages/caps-lock.html") (:keywords)) nil] . "available") ([cl-struct-package-desc chess (2 0 4) "Play chess in GNU Emacs" ((cl-lib (0 5))) tar "gnu" nil ((:keywords "games") (:url . "http://elpa.gnu.org/packages/chess.html")) nil] . "available") ([cl-struct-package-desc cl-generic (0 2) "Forward cl-generic compatibility for Emacs<25" nil single "gnu" nil ((:url . "http://elpa.gnu.org/packages/cl-generic.html") (:keywords)) nil] . "available") ([cl-struct-package-desc company-statistics (0 2 1) "Sort candidates using completion history" ((emacs (24 3)) (company (0 8 5))) tar "gnu" nil ((:keywords "abbrev" "convenience" "matching") (:url . "https://github.com/company-mode/company-statistics")) nil] . "available") ([cl-struct-package-desc context-coloring (7 0 0) "Highlight by scope" ((emacs (24 3)) (js2-mode (20150126))) single "gnu" nil ((:url . "https://github.com/jacksonrayhamilton/context-coloring") (:keywords "convenience" "faces" "tools")) nil] . "available") ([cl-struct-package-desc crisp (1 3 4) "CRiSP/Brief Emacs emulator" nil single "gnu" nil ((:url . "http://elpa.gnu.org/packages/crisp.html") (:keywords "emulations" "brief" "crisp")) nil] . "available") ([cl-struct-package-desc csv-mode (1 5) "Major mode for editing comma/char separated values" nil single "gnu" nil ((:url . "http://centaur.maths.qmul.ac.uk/Emacs/") (:keywords "convenience")) nil] . "available") ([cl-struct-package-desc darkroom (0 1) "Remove visual distractions and focus on writing" ((cl-lib (0 5))) single "gnu" nil ((:url . "http://elpa.gnu.org/packages/darkroom.html") (:keywords "convenience" "emulations")) nil] . "available") ([cl-struct-package-desc dbus-codegen (0 1) "Lisp code generation for D-Bus." ((cl-lib (0 5))) single "gnu" nil ((:url . "http://elpa.gnu.org/packages/dbus-codegen.html") (:keywords "comm" "dbus" "convenience")) nil] . "available") ([cl-struct-package-desc debbugs (0 7) "SOAP library to access debbugs servers" nil tar "gnu" nil ((:keywords "comm" "hypermedia") (:url . "http://elpa.gnu.org/packages/debbugs.html")) nil] . "available") ([cl-struct-package-desc dict-tree (0 12 8) "Dictionary data structure" ((trie (0 2 5)) (tNFA (0 1 1)) (heap (0 3))) single "gnu" nil ((:url . "http://www.dr-qubit.org/emacs.php") (:keywords "extensions" "matching" "data structures trie" "tree" "dictionary" "completion" "regexp")) nil] . "available") ([cl-struct-package-desc diff-hl (1 7 0) "Highlight uncommitted changes" ((cl-lib (0 2))) tar "gnu" nil ((:keywords "vc" "diff") (:url . "https://github.com/dgutov/diff-hl")) nil] . "available") ([cl-struct-package-desc dismal (1 5) "Dis Mode Ain't Lotus: Spreadsheet program Emacs" ((cl-lib (0))) tar "gnu" nil ((:url . "http://elpa.gnu.org/packages/dismal.html")) nil] . "available") ([cl-struct-package-desc djvu (0 5) "Edit and view Djvu files via djvused" nil single "gnu" nil ((:url . "http://elpa.gnu.org/packages/djvu.html") (:keywords "files" "wp")) nil] . "available") ([cl-struct-package-desc docbook (0 1) "Info-like viewer for DocBook" nil single "gnu" nil ((:url . "http://elpa.gnu.org/packages/docbook.html") (:keywords "docs" "help")) nil] . "available") ([cl-struct-package-desc easy-kill (0 9 3) "kill & mark things easily" ((emacs (24)) (cl-lib (0 5))) tar "gnu" nil ((:keywords "killing" "convenience") (:url . "https://github.com/leoliu/easy-kill")) nil] . "available") ([cl-struct-package-desc ediprolog (1 0) "Emacs Does Interactive Prolog" nil single "gnu" nil ((:url . "http://elpa.gnu.org/packages/ediprolog.html") (:keywords "languages" "processes")) nil] . "available") ([cl-struct-package-desc electric-spacing (5 0) "Insert operators with surrounding spaces smartly" nil single "gnu" nil ((:url . "http://elpa.gnu.org/packages/electric-spacing.html") (:keywords)) nil] . "available") ([cl-struct-package-desc enwc (1 0) "The Emacs Network Client" nil tar "gnu" nil ((:keywords "enwc" "network" "wicd" "manager" "nm") (:url . "http://elpa.gnu.org/packages/enwc.html")) nil] . "available") ([cl-struct-package-desc epoch-view (0 0 1) "Minor mode to visualize epoch timestamps" nil single "gnu" nil ((:url . "http://elpa.gnu.org/packages/epoch-view.html") (:keywords "data" "timestamp" "epoch" "unix")) nil] . "available") ([cl-struct-package-desc ergoemacs-mode (5 14 7 3) "Emacs mode based on common modern interface and ergonomics." ((emacs (24 1)) (undo-tree (0 6 5))) tar "gnu" nil ((:keywords "convenience") (:url . "https://github.com/ergoemacs/ergoemacs-mode")) nil] . "available") ([cl-struct-package-desc f90-interface-browser (1 1) "Parse and browse f90 interfaces" nil single "gnu" nil ((:url . "http://github.com/wence-/f90-iface/") (:keywords)) nil] . "available") ([cl-struct-package-desc flylisp (0 2) "Color unbalanced parentheses and parentheses inconsistent with indentation" ((emacs (24 1)) (cl-lib (0 4))) single "gnu" nil ((:url . "http://elpa.gnu.org/packages/flylisp.html") (:keywords)) nil] . "available") ([cl-struct-package-desc ggtags (0 8 10) "emacs frontend to GNU Global source code tagging system" ((emacs (24)) (cl-lib (0 5))) single "gnu" nil ((:url . "https://github.com/leoliu/ggtags") (:keywords "tools" "convenience")) nil] . "available") ([cl-struct-package-desc gnorb (1 1 1) "Glue code between Gnus, Org, and BBDB" ((cl-lib (0 5))) tar "gnu" nil ((:keywords "mail" "org" "gnus" "bbdb" "todo" "task") (:url . "https://github.com/girzel/gnorb")) nil] . "available") ([cl-struct-package-desc gnugo (3 0 0) "play GNU Go in a buffer" ((ascii-art-to-unicode (1 5)) (xpm (1 0 1)) (cl-lib (0 5))) tar "gnu" nil ((:keywords "games" "processes") (:url . "http://www.gnuvola.org/software/gnugo/")) nil] . "available") ([cl-struct-package-desc heap (0 3) "Heap (a.k.a. priority queue) data structure" nil single "gnu" nil ((:url . "http://www.dr-qubit.org/emacs.php") (:keywords "extensions" "data structures" "heap" "priority queue")) nil] . "available") ([cl-struct-package-desc ioccur (2 4) "Incremental occur" nil single "gnu" nil ((:url . "http://elpa.gnu.org/packages/ioccur.html") (:keywords)) nil] . "available") ([cl-struct-package-desc iterators (0 1) "Functions for working with iterators" ((emacs (25))) single "gnu" nil ((:url . "http://elpa.gnu.org/packages/iterators.html") (:keywords "extensions" "elisp")) nil] . "available") ([cl-struct-package-desc javaimp (0 5) "Add and reorder Java import statements in Maven projects" nil single "gnu" nil ((:url . "http://elpa.gnu.org/packages/javaimp.html") (:keywords "java" "maven" "programming")) nil] . "available") ([cl-struct-package-desc jgraph-mode (1 1) "Major mode for Jgraph files" ((cl-lib (0 5))) single "gnu" nil ((:url . "http://elpa.gnu.org/packages/jgraph-mode.html") (:keywords "tex" "wp")) nil] . "available") ([cl-struct-package-desc js2-mode (20150713) "Improved JavaScript editing mode" ((emacs (24 1)) (cl-lib (0 5))) tar "gnu" nil ((:keywords "languages" "javascript") (:url . "https://github.com/mooz/js2-mode/")) nil] . "available") ([cl-struct-package-desc jumpc (3 0) "jump to previous insertion points" nil single "gnu" nil ((:url . "http://elpa.gnu.org/packages/jumpc.html") (:keywords)) nil] . "available") ([cl-struct-package-desc landmark (1 0) "Neural-network robot that learns landmarks" nil single "gnu" nil ((:url . "http://elpa.gnu.org/packages/landmark.html") (:keywords "games" "neural network" "adaptive search" "chemotaxis")) nil] . "available") ([cl-struct-package-desc let-alist (1 0 4) "Easily let-bind values of an assoc-list by their names" nil single "gnu" nil ((:url . "http://elpa.gnu.org/packages/let-alist.html") (:keywords "extensions" "lisp")) nil] . "available") ([cl-struct-package-desc lex (1 1) "Lexical analyser construction" nil tar "gnu" nil ((:url . "http://elpa.gnu.org/packages/lex.html")) nil] . "available") ...))
  package-menu--refresh(t nil)
  paradox-menu--refresh(t nil)
  paradox--generate-menu(nil t)
  apply(paradox--generate-menu (nil t))
  package-menu--generate(nil t)
  package-list-packages(nil)
  paradox-list-packages(nil)
  call-interactively(paradox-list-packages record nil)
  command-execute(paradox-list-packages record)

I already got a warning about cell being an undefined function when installing, but assumed it were a false alarm.

wasamasa commented 9 years ago

And I think I've found the culprit:

(if-let ((cell (assq :stars (package-desc-extras pkg-desc))))
    (setcdr cell counts)
  (push (cons :stars counts) (package-desc-extras pkg-desc)))

Not sure what you're on, but I most definitely don't have if-let here :D

I guess subr-x provides it in Emacs 25, but you need to take in account that its contents vary depending on the Emacs version and have even been described as unworthy to document. So, if you really want to use if-let there, at least have the courtesy of providing it for users who don't have it in subr-x yet (or live without it and rewrite that part).

Malabarba commented 9 years ago

Sorry about that, try again. :)

wasamasa commented 9 years ago

Thanks, works now.