{"action":"closed","issue":{"url":"https://api.github.com/repos/vermiculus/sx.el/issues/244","labels_url":"https://api.github.com/repos/vermiculus/sx.el/issues/244/labels{/name}","comments_url":"https://api.github.com/repos/vermiculus/sx.el/issues/244/comments","events_url":"https://api.github.com/repos/vermiculus/sx.el/issues/244/events","html_url":"https://github.com/vermiculus/sx.el/issues/244","id":55765964,"number":244,"title":"Wrong type argument: listp, \\.\\.\\. when trying to view a question [emacs 24.4]","user":{"login":"kaushalmodi","id":3578197,"avatar_url":"https://avatars.githubusercontent.com/u/3578197?v=3","gravatar_id":"","url":"https://api.github.com/users/kaushalmodi","html_url":"https://github.com/kaushalmodi","followers_url":"https://api.github.com/users/kaushalmodi/followers","following_url":"https://api.github.com/users/kaushalmodi/following{/other_user}","gists_url":"https://api.github.com/users/kaushalmodi/gists{/gist_id}","starred_url":"https://api.github.com/users/kaushalmodi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaushalmodi/subscriptions","organizations_url":"https://api.github.com/users/kaushalmodi/orgs","repos_url":"https://api.github.com/users/kaushalmodi/repos","events_url":"https://api.github.com/users/kaushalmodi/events{/privacy}","received_events_url":"https://api.github.com/users/kaushalmodi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-28T14:57:05Z","updated_at":"2015-01-28T16:41:01Z","closed_at":"2015-01-28T16:41:01Z","body":"Hi, \r\nOn emacs 24.4. and the Jan 26 version of sx.el, I get this error `Wrong type argument: listp, \\.\\.\\.` when trying to view a question.\r\n\r\nThe sx-* tabs open fine.\r\n\r\n<pre>\r\nDebugger entered--Lisp error: (wrong-type-argument listp \\.\\.\\.)\r\n  car(\\.\\.\\.)\r\n  (> (car x) (car y))\r\n  (lambda (x y) (> (car x) (car y)))((7747 . 1422444620) \\.\\.\\.)\r\n  (and (cdr-safe tail) ((lambda (x y) (> (car x) (car y))) x (cadr tail)))\r\n  (while (and (cdr-safe tail) ((lambda (x y) (> (car x) (car y))) x (cadr tail))) (setq tail (cdr tail)))\r\n  (let ((tail site-cell) (x q-cell)) (while (and (cdr-safe tail) ((lambda (x y) (> (car x) (car y))) x (cadr tail))) (setq tail (cdr tail))) (setcdr tail (cons x (cdr tail))))\r\n  (cond ((null site-cell) (setq sx-question--user-read-list (cons (list \\.site_par q-cell) sx-question--user-read-list))) ((setq cell (assoc \\.question_id site-cell)) (if (or (not (numberp (cdr cell))) (> \\.last_activity_date (cdr cell))) (progn (setcdr cell \\.last_activity_date)))) (t (let ((tail site-cell) (x q-cell)) (while (and (cdr-safe tail) ((lambda (x y) (> ... ...)) x (cadr tail))) (setq tail (cdr tail))) (setcdr tail (cons x (cdr tail))))))\r\n  (let ((site-cell (assoc \\.site_par sx-question--user-read-list)) (q-cell (cons \\.question_id \\.last_activity_date)) cell) (cond ((null site-cell) (setq sx-question--user-read-list (cons (list \\.site_par q-cell) sx-question--user-read-list))) ((setq cell (assoc \\.question_id site-cell)) (if (or (not (numberp (cdr cell))) (> \\.last_activity_date (cdr cell))) (progn (setcdr cell \\.last_activity_date)))) (t (let ((tail site-cell) (x q-cell)) (while (and (cdr-safe tail) ((lambda ... ...) x (cadr tail))) (setq tail (cdr tail))) (setcdr tail (cons x (cdr tail)))))))\r\n  (let ((\\.site_par (cdr (assq (quote site_par) alist))) (\\.question_id (cdr (assq (quote question_id) alist))) (\\.last_activity_date (cdr (assq (quote last_activity_date) alist)))) (sx-question--ensure-read-list \\.site_par) (let ((site-cell (assoc \\.site_par sx-question--user-read-list)) (q-cell (cons \\.question_id \\.last_activity_date)) cell) (cond ((null site-cell) (setq sx-question--user-read-list (cons (list \\.site_par q-cell) sx-question--user-read-list))) ((setq cell (assoc \\.question_id site-cell)) (if (or (not (numberp ...)) (> \\.last_activity_date (cdr cell))) (progn (setcdr cell \\.last_activity_date)))) (t (let ((tail site-cell) (x q-cell)) (while (and (cdr-safe tail) (... x ...)) (setq tail (cdr tail))) (setcdr tail (cons x (cdr tail))))))))\r\n  (let ((alist question)) (let ((\\.site_par (cdr (assq (quote site_par) alist))) (\\.question_id (cdr (assq (quote question_id) alist))) (\\.last_activity_date (cdr (assq (quote last_activity_date) alist)))) (sx-question--ensure-read-list \\.site_par) (let ((site-cell (assoc \\.site_par sx-question--user-read-list)) (q-cell (cons \\.question_id \\.last_activity_date)) cell) (cond ((null site-cell) (setq sx-question--user-read-list (cons (list \\.site_par q-cell) sx-question--user-read-list))) ((setq cell (assoc \\.question_id site-cell)) (if (or (not ...) (> \\.last_activity_date ...)) (progn (setcdr cell \\.last_activity_date)))) (t (let ((tail site-cell) (x q-cell)) (while (and ... ...) (setq tail ...)) (setcdr tail (cons x ...))))))))\r\n  (progn (sx--ensure-site question) (let ((alist question)) (let ((\\.site_par (cdr (assq (quote site_par) alist))) (\\.question_id (cdr (assq (quote question_id) alist))) (\\.last_activity_date (cdr (assq (quote last_activity_date) alist)))) (sx-question--ensure-read-list \\.site_par) (let ((site-cell (assoc \\.site_par sx-question--user-read-list)) (q-cell (cons \\.question_id \\.last_activity_date)) cell) (cond ((null site-cell) (setq sx-question--user-read-list (cons ... sx-question--user-read-list))) ((setq cell (assoc \\.question_id site-cell)) (if (or ... ...) (progn ...))) (t (let (... ...) (while ... ...) (setcdr tail ...))))))))\r\n  (prog1 (progn (sx--ensure-site question) (let ((alist question)) (let ((\\.site_par (cdr (assq ... alist))) (\\.question_id (cdr (assq ... alist))) (\\.last_activity_date (cdr (assq ... alist)))) (sx-question--ensure-read-list \\.site_par) (let ((site-cell (assoc \\.site_par sx-question--user-read-list)) (q-cell (cons \\.question_id \\.last_activity_date)) cell) (cond ((null site-cell) (setq sx-question--user-read-list ...)) ((setq cell ...) (if ... ...)) (t (let ... ... ...))))))) (sx-cache-set (quote read-questions) sx-question--user-read-list))\r\n  sx-question--mark-read(((title . \"How does package.el handle changes in macros when updating?\") (site_par . \"emacs\") (link . \"http://emacs.stackexchange.com/questions/7747/how-does-package-el-handle-changes-in-macros-when-updating\") (body_markdown . \"Let's assume there is a package `P` containing two files,\\n\\n      P/base.el\\n      P/utils.el\\n\\n, where the `base.el` file requires `utils.el` at runtime and `utils.el` contains a macro `M`. Upon first installation of `P`, package.el downloads, extracts and compiles it.\\n\\nNow assume the package maintainer updated `P` to `P'` and in the process modified `M` to `M'`.  The package user now attempts to update his package via package-list. Since `P` is a useful package, it is also loaded.  Again package.el downloads and extracts `P'`.  But I don't see how the code from the updated macro `M'` gets into the compiled file `P'/base.el`, since the feature `utils.el` is already provided, so, I assume, and the compiler is happy to use the old definition `M`.\\n\\nThe question I have about this is simply whether this is a correct analysis ?\\n\\n\\n\\n\") (share_link . \"http://emacs.stackexchange.com/q/7747/115\") (question_id . 7747) (last_edit_date . 1422421325) (creation_date . 1422394782) (last_activity_date . 1422444620) (score . 3) (answer_count . 1) (accepted_answer_id . 7751) (view_count . 33) (is_answered . t) (upvoted . :json-false) (downvoted . :json-false) (last_editor (link . \"http://emacs.stackexchange.com/users/5253/politza\") (display_name . \"politza\") (profile_image . \"https://www.gravatar.com/avatar/76377bf8146d0a242d8fcb05ecd40626?s=128&d=identicon&r=PG&f=1\") (user_type . \"registered\") (user_id . 5253) (reputation . 173)) (comments . [((body . \"Not hundred percent sure, but there's a good chance that <code>(require 'package)</code> will actually re-load and re-evaluate the package if the file is newer. So the macro definition is likely to be updated. However, the places where expansion already happened will not be updated.\") (link . \"http://emacs.stackexchange.com/questions/7747/how-does-package-el-handle-changes-in-macros-when-updating#comment11621_7747\") (body_markdown . \"Not hundred percent sure, but there's a good chance that `(require 'package)` will actually re-load and re-evaluate the package if the file is newer. So the macro definition is likely to be updated. However, the places where expansion already happened will not be updated.\") (comment_id . 11621) (post_id . 7747) (creation_date . 1422396205) (post_type . \"question\") (score . 0) (edited . :json-false) (upvoted . :json-false) (owner (link . \"http://emacs.stackexchange.com/users/563/wvxvw\") (display_name . \"wvxvw\") (profile_image . \"https://www.gravatar.com/avatar/e5ab5db401198485d4569199f9994a7d?s=128&d=identicon&r=PG\") (accept_rate . 73) (user_type . \"registered\") (user_id . 563) (reputation . 1297))) ((body . \"FYI, it doesn't look to me as if <code>require</code> (at least as at 24.4.1) performs any such check. If the feature was registered as having been loaded, I believe that's all that matters.\") (link . \"http://emacs.stackexchange.com/questions/7747/how-does-package-el-handle-changes-in-macros-when-updating#comment11625_7747\") (body_markdown . \"FYI, it doesn't look to me as if `require` (at least as at 24.4.1) performs any such check. If the feature was registered as having been loaded, I believe that's all that matters.\") (comment_id . 11625) (post_id . 7747) (creation_date . 1422404511) (post_type . \"question\") (score . 0) (edited . :json-false) (upvoted . :json-false) (owner (link . \"http://emacs.stackexchange.com/users/454/phils\") (display_name . \"phils\") (profile_image . \"https://www.gravatar.com/avatar/3b1ad4e4bdf8feaef18504593914fe16?s=128&d=identicon&r=PG\") (user_type . \"registered\") (user_id . 454) (reputation . 3911))) ((body . \"Obviously, explicitly <code>load</code>ing the recompiled library would resolve the issue, and it's certainly possible that the package manager does exactly that after updating libraries which were previously loaded.\") (link . \"http://emacs.stackexchange.com/questions/7747/how-does-package-el-handle-changes-in-macros-when-updating#comment11626_7747\") (body_markdown . \"Obviously, explicitly `load`ing the recompiled library would resolve the issue, and it's certainly possible that the package manager does exactly that after updating libraries which were previously loaded.\") (comment_id . 11626) (post_id . 7747) (creation_date . 1422404742) (post_type . \"question\") (score . 0) (edited . :json-false) (upvoted . :json-false) (owner (link . \"http://emacs.stackexchange.com/users/454/phils\") (display_name . \"phils\") (profile_image . \"https://www.gravatar.com/avatar/3b1ad4e4bdf8feaef18504593914fe16?s=128&d=identicon&r=PG\") (user_type . \"registered\") (user_id . 454) (reputation . 3911))) ((body . \"@phils It doesn't do that on 24.4, but does in 25.1. Explicitly loading the file in your package is indeed a workaround.\") (link . \"http://emacs.stackexchange.com/questions/7747/how-does-package-el-handle-changes-in-macros-when-updating#comment11627_7747\") (body_markdown . \"@phils It doesn't do that on 24.4, but does in 25.1. Explicitly loading the file in your package is indeed a workaround.\") (comment_id . 11627) (post_id . 7747) (creation_date . 1422408758) (post_type . \"question\") (score . 1) (edited . :json-false) (upvoted . :json-false) (reply_to_user (link . \"http://emacs.stackexchange.com/users/454/phils\") (display_name . \"phils\") (profile_image . \"https://www.gravatar.com/avatar/3b1ad4e4bdf8feaef18504593914fe16?s=128&d=identicon&r=PG\") (user_type . \"registered\") (user_id . 454) (reputation . 3911)) (owner (link . \"http://emacs.stackexchange.com/users/50/malabarba\") (display_name . \"Malabarba\") (profile_image . \"https://www.gravatar.com/avatar/c14505947446e90f2a14fd8f3dd3cf94?s=128&d=identicon&r=PG\") (accept_rate . 84) (user_type . \"moderator\") (user_id . 50) (reputation . 8110)))]) (owner (link . \"http://emacs.stackexchange.com/users/5253/politza\") (display_name . \"politza\") (profile_image . \"https://www.gravatar.com/avatar/76377bf8146d0a242d8fcb05ecd40626?s=128&d=identicon&r=PG&f=1\") (user_type . \"registered\") (user_id . 5253) (reputation . 173)) (tags . [\"elisp\" \"package\"]) (answers . [((link . \"http://emacs.stackexchange.com/questions/7747/how-does-package-el-handle-changes-in-macros-when-updating/7751#7751\") (body_markdown . \"> But I don't see how the code from the updated macro M' gets into the compiled file P'/base.el, since the feature utils.el is already provided, [...]\\n\\nIt doesn't. Or, actually, it **didn't**.\\n\\n## The bug ##\\n\\nYour analysis is correct. \\nIt was [a bug](https://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00567.html) in `package.el`, and it's [been fixed](https://lists.gnu.org/archive/html/emacs-diffs/2014-12/msg00254.html) on [this commit](http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=c13baa10d55ec863d3ceaea48c6b2959ece98198) for the next Emacs release. As of\\nthe next version, when `package.el` upgrades a package that has been\\nloaded in this session, it will reload a package after installing it.\\n\\n## The workaround ##\\n\\nOne workaround is to `load` a package instead of `require`ing it.\\nThough this is bad style, I would consider it an acceptable\\ncompromise, if you *know* you'll be affected by this.  \\nYou know you'll be affected by this if your package is about to make\\nuse of a newly released feature of a pre-existing macro that's on another file (or another package).\\n\") (share_link . \"http://emacs.stackexchange.com/a/7751/115\") (question_id . 7747) (answer_id . 7751) (creation_date . 1422408152) (last_edit_date . 1422444620) (last_activity_date . 1422444620) (score . 2) (is_accepted . t) (upvoted . :json-false) (downvoted . :json-false) (last_editor (link . \"http://emacs.stackexchange.com/users/50/malabarba\") (display_name . \"Malabarba\") (profile_image . \"https://www.gravatar.com/avatar/c14505947446e90f2a14fd8f3dd3cf94?s=128&d=identicon&r=PG\") (accept_rate . 84) (user_type . \"moderator\") (user_id . 50) (reputation . 8110)) (comments . [((body . \"<a href=\\\"http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=c13baa10d55ec863d3ceaea48c6b2959ece98198\\\" rel=\\\"nofollow\\\">This</a> looks like the relevant commit.\") (link . \"http://emacs.stackexchange.com/questions/7747/how-does-package-el-handle-changes-in-macros-when-updating/7751#comment11649_7751\") (body_markdown . \"[This](http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=c13baa10d55ec863d3ceaea48c6b2959ece98198)\\nlooks like the relevant commit.\") (comment_id . 11649) (post_id . 7751) (creation_date . 1422444486) (post_type . \"answer\") (score . 0) (edited . :json-false) (upvoted . :json-false) (owner ... ... ... ... ... ...)) ((body . \"@politza yes, thanks.\") (link . \"http://emacs.stackexchange.com/questions/7747/how-does-package-el-handle-changes-in-macros-when-updating/7751#comment11650_7751\") (body_markdown . \"@politza yes, thanks.\") (comment_id . 11650) (post_id . 7751) (creation_date . 1422444694) (post_type . \"answer\") (score . 0) (edited . :json-false) (upvoted . :json-false) (reply_to_user ... ... ... ... ... ...) (owner ... ... ... ... ... ... ...)) ((body . \"Though, I think it's still broken, since the reloading happens <i>after</i> the package was compiled (with the old macros).\") (link . \"http://emacs.stackexchange.com/questions/7747/how-does-package-el-handle-changes-in-macros-when-updating/7751#comment11653_7751\") (body_markdown . \"Though, I think it's still broken, since the reloading happens *after*\\nthe package was compiled (with the old macros).\") (comment_id . 11653) (post_id . 7751) (creation_date . 1422446894) (post_type . \"answer\") (score . 0) (edited . :json-false) (upvoted . :json-false) (owner ... ... ... ... ... ...)) ((body . \"@politza oh yes. I misinterpreted the question (I'll update the answer later) . This was fixed for macros from another package. It still needs work for macros inside the same package that are on a different file. Fortunately, the <code>load</code> instead of <code>require</code> workaround still works for that situation, and it's kind of a no brainer there.\") (link . \"http://emacs.stackexchange.com/questions/7747/how-does-package-el-handle-changes-in-macros-when-updating/7751#comment11654_7751\") (body_markdown . \"@politza oh yes. I misinterpreted the question (I'll update the answer later) . This was fixed for macros from another package. It still needs work for macros inside the same package that are on a different file. Fortunately, the `load` instead of `require` workaround still works for that situation, and it's kind of a no brainer there.\") (comment_id . 11654) (post_id . 7751) (creation_date . 1422447371) (post_type . \"answer\") (score . 0) (edited . :json-false) (upvoted . :json-false) (reply_to_user ... ... ... ... ... ...) (owner ... ... ... ... ... ... ...)) ((body . \"And it's still listed as <a href=\\\"http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10125\\\" rel=\\\"nofollow\\\">bug #10125</a>. I should have checked there first, but the assumed implication of hundreds of broken packages out there kept me from doing so...\") (link . \"http://emacs.stackexchange.com/questions/7747/how-does-package-el-handle-changes-in-macros-when-updating/7751#comment11655_7751\") (body_markdown . \"And it's still listed as [bug\\n#10125](http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10125). I should\\nhave checked there first, but the assumed implication of hundreds of\\nbroken packages out there kept me from doing so...\") (comment_id . 11655) (post_id . 7751) (creation_date . 1422447475) (post_type . \"answer\") (score . 0) (edited . :json-false) (upvoted . :json-false) (owner ... ... ... ... ... ...))]) (owner (link . \"http://emacs.stackexchange.com/users/50/malabarba\") (display_name . \"Malabarba\") (profile_image . \"https://www.gravatar.com/avatar/c14505947446e90f2a14fd8f3dd3cf94?s=128&d=identicon&r=PG\") (accept_rate . 84) (user_type . \"moderator\") (user_id . 50) (reputation . 8110)))])))\r\n</pre> "}}