vermiculus / sx.el

Stack Exchange for Emacs
http://stackapps.com/q/3950
710 stars 40 forks source link

No function sx-question-list--sort-answer-function #234

Closed dakrone closed 9 years ago

dakrone commented 9 years ago

When trying to view a question, I get the following error in *Messages*:

sx-question-mode--erase-and-print-question: Symbol's value as variable is void: sx-question-list--sort-answer-function

Here's a full backtrace:

Debugger entered--Lisp error: (void-variable sx-question-list--sort-answer-function)
  sx-question-mode--print-question(((comments . [((body . "I know it's not a proper answer, but you can always use <code>:</code> to execute an arbitrary command, ie: <code>:</code> then <code>format-patch HEAD~1</code> (or whatever you need)") (site_par . "emacs") (link . "http://emacs.stackexchange.com/questions/7394/can-magit-do-git-format-patch#comment11031_7394") (body_markdown . "I know it's not a proper answer, but you can always use `:` to execute an arbitrary command, ie: `:` then `format-patch HEAD~1` (or whatever you need)") (comment_id . 11031) (post_id . 7394) (creation_date . 1421414750) (post_type . "question") (edited . :json-false) (upvoted . :json-false) (owner (link . "http://emacs.stackexchange.com/users/379/lee-h") (display_name . "Lee H") (profile_image . "https://www.gravatar.com/avatar/bcacd00a7f05c4772329cf9f446c7987?s=128&d=identicon&r=PG") (accept_rate . 92) (user_type . "registered") (user_id . 379) (reputation . 628)))]) (title . "Can Magit do git format-patch?") (site_par . "emacs") (link . "http://emacs.stackexchange.com/questions/7394/can-magit-do-git-format-patch") (body_markdown . "I just wanted to know if Magit has this functionality. The reference [manual](https://magit.github.io/magit.html) does not have this explicitly so that's why I am asking.") (share_link . "http://emacs.stackexchange.com/q/7394/379") (question_id . 7394) (creation_date . 1421298927) (last_activity_date . 1421311490) (score . 7) (answer_count . 1) (view_count . 80) (is_answered . t) (upvoted . :json-false) (downvoted . :json-false) (owner (link . "http://emacs.stackexchange.com/users/5193/cestdiego") (display_name . "CestDiego") (profile_image . "https://www.gravatar.com/avatar/f8ded5c4ab210ecda0954a4fb7794970?s=128&d=identicon&r=PG&f=1") (user_type . "registered") (user_id . 5193) (reputation . 36)) (tags . ["magit"]) (answers . [((link . "http://emacs.stackexchange.com/questions/7394/can-magit-do-git-format-patch/7401#7401") (body_markdown . "You're right, it doesn't seem to be built in. But note that you can run *any* `git` subcommand you like from a Magit buffer by pressing <kbd>:</kbd>, which is bound to `magit-git-command` by default:\n\n> `magit-git-command` is an interactive autoloaded compiled Lisp function\nin `magit.el`.\n\n> `(magit-git-command ARGS DIRECTORY)`\n\n> Execute a Git subcommand asynchronously, displaying the output.\nWith a prefix argument run Git in the root of the current\nrepository.  Non-interactively run Git in `DIRECTORY` with `ARGS`.\n\nSo in order to get a patch for, e.g., the latest commit using `git format-patch` you can do the following:\n\n<kbd>:</kbd> `format-patch -1` <kbd>RET</kbd>\n\nThe output (displayed in the `*magit-process*` buffer) will look something like this:\n\n      0 git --no-pager -c core.preloadindex=true format-patch -1\n    0001-Commit-message-associated-with-latest-commit.patch\n") (share_link . "http://emacs.stackexchange.com/a/7401/379") (question_id . 7394) (answer_id . 7401) (creation_date . 1421311490) (last_activity_date . 1421311490) (score . 7) (is_accepted . :json-false) (upvoted . :json-false) (downvoted . :json-false) (owner (link . "http://emacs.stackexchange.com/users/504/itsjeyd") (display_name . "itsjeyd") (profile_image . "http://i.stack.imgur.com/oqhFV.png?s=128&g=1") (accept_rate . 67) (user_type . "registered") (user_id . 504) (reputation . 3515)))])))
  sx-question-mode--erase-and-print-question(((comments . [((body . "I know it's not a proper answer, but you can always use <code>:</code> to execute an arbitrary command, ie: <code>:</code> then <code>format-patch HEAD~1</code> (or whatever you need)") (site_par . "emacs") (link . "http://emacs.stackexchange.com/questions/7394/can-magit-do-git-format-patch#comment11031_7394") (body_markdown . "I know it's not a proper answer, but you can always use `:` to execute an arbitrary command, ie: `:` then `format-patch HEAD~1` (or whatever you need)") (comment_id . 11031) (post_id . 7394) (creation_date . 1421414750) (post_type . "question") (edited . :json-false) (upvoted . :json-false) (owner (link . "http://emacs.stackexchange.com/users/379/lee-h") (display_name . "Lee H") (profile_image . "https://www.gravatar.com/avatar/bcacd00a7f05c4772329cf9f446c7987?s=128&d=identicon&r=PG") (accept_rate . 92) (user_type . "registered") (user_id . 379) (reputation . 628)))]) (title . "Can Magit do git format-patch?") (site_par . "emacs") (link . "http://emacs.stackexchange.com/questions/7394/can-magit-do-git-format-patch") (body_markdown . "I just wanted to know if Magit has this functionality. The reference [manual](https://magit.github.io/magit.html) does not have this explicitly so that's why I am asking.") (share_link . "http://emacs.stackexchange.com/q/7394/379") (question_id . 7394) (creation_date . 1421298927) (last_activity_date . 1421311490) (score . 7) (answer_count . 1) (view_count . 80) (is_answered . t) (upvoted . :json-false) (downvoted . :json-false) (owner (link . "http://emacs.stackexchange.com/users/5193/cestdiego") (display_name . "CestDiego") (profile_image . "https://www.gravatar.com/avatar/f8ded5c4ab210ecda0954a4fb7794970?s=128&d=identicon&r=PG&f=1") (user_type . "registered") (user_id . 5193) (reputation . 36)) (tags . ["magit"]) (answers . [((link . "http://emacs.stackexchange.com/questions/7394/can-magit-do-git-format-patch/7401#7401") (body_markdown . "You're right, it doesn't seem to be built in. But note that you can run *any* `git` subcommand you like from a Magit buffer by pressing <kbd>:</kbd>, which is bound to `magit-git-command` by default:\n\n> `magit-git-command` is an interactive autoloaded compiled Lisp function\nin `magit.el`.\n\n> `(magit-git-command ARGS DIRECTORY)`\n\n> Execute a Git subcommand asynchronously, displaying the output.\nWith a prefix argument run Git in the root of the current\nrepository.  Non-interactively run Git in `DIRECTORY` with `ARGS`.\n\nSo in order to get a patch for, e.g., the latest commit using `git format-patch` you can do the following:\n\n<kbd>:</kbd> `format-patch -1` <kbd>RET</kbd>\n\nThe output (displayed in the `*magit-process*` buffer) will look something like this:\n\n      0 git --no-pager -c core.preloadindex=true format-patch -1\n    0001-Commit-message-associated-with-latest-commit.patch\n") (share_link . "http://emacs.stackexchange.com/a/7401/379") (question_id . 7394) (answer_id . 7401) (creation_date . 1421311490) (last_activity_date . 1421311490) (score . 7) (is_accepted . :json-false) (upvoted . :json-false) (downvoted . :json-false) (owner (link . "http://emacs.stackexchange.com/users/504/itsjeyd") (display_name . "itsjeyd") (profile_image . "http://i.stack.imgur.com/oqhFV.png?s=128&g=1") (accept_rate . 67) (user_type . "registered") (user_id . 504) (reputation . 3515)))])))
  sx-question-mode--display(((comments . [((body . "I know it's not a proper answer, but you can always use <code>:</code> to execute an arbitrary command, ie: <code>:</code> then <code>format-patch HEAD~1</code> (or whatever you need)") (site_par . "emacs") (link . "http://emacs.stackexchange.com/questions/7394/can-magit-do-git-format-patch#comment11031_7394") (body_markdown . "I know it's not a proper answer, but you can always use `:` to execute an arbitrary command, ie: `:` then `format-patch HEAD~1` (or whatever you need)") (comment_id . 11031) (post_id . 7394) (creation_date . 1421414750) (post_type . "question") (edited . :json-false) (upvoted . :json-false) (owner (link . "http://emacs.stackexchange.com/users/379/lee-h") (display_name . "Lee H") (profile_image . "https://www.gravatar.com/avatar/bcacd00a7f05c4772329cf9f446c7987?s=128&d=identicon&r=PG") (accept_rate . 92) (user_type . "registered") (user_id . 379) (reputation . 628)))]) (title . "Can Magit do git format-patch?") (site_par . "emacs") (link . "http://emacs.stackexchange.com/questions/7394/can-magit-do-git-format-patch") (body_markdown . "I just wanted to know if Magit has this functionality. The reference [manual](https://magit.github.io/magit.html) does not have this explicitly so that's why I am asking.") (share_link . "http://emacs.stackexchange.com/q/7394/379") (question_id . 7394) (creation_date . 1421298927) (last_activity_date . 1421311490) (score . 7) (answer_count . 1) (view_count . 80) (is_answered . t) (upvoted . :json-false) (downvoted . :json-false) (owner (link . "http://emacs.stackexchange.com/users/5193/cestdiego") (display_name . "CestDiego") (profile_image . "https://www.gravatar.com/avatar/f8ded5c4ab210ecda0954a4fb7794970?s=128&d=identicon&r=PG&f=1") (user_type . "registered") (user_id . 5193) (reputation . 36)) (tags . ["magit"]) (answers . [((link . "http://emacs.stackexchange.com/questions/7394/can-magit-do-git-format-patch/7401#7401") (body_markdown . "You're right, it doesn't seem to be built in. But note that you can run *any* `git` subcommand you like from a Magit buffer by pressing <kbd>:</kbd>, which is bound to `magit-git-command` by default:\n\n> `magit-git-command` is an interactive autoloaded compiled Lisp function\nin `magit.el`.\n\n> `(magit-git-command ARGS DIRECTORY)`\n\n> Execute a Git subcommand asynchronously, displaying the output.\nWith a prefix argument run Git in the root of the current\nrepository.  Non-interactively run Git in `DIRECTORY` with `ARGS`.\n\nSo in order to get a patch for, e.g., the latest commit using `git format-patch` you can do the following:\n\n<kbd>:</kbd> `format-patch -1` <kbd>RET</kbd>\n\nThe output (displayed in the `*magit-process*` buffer) will look something like this:\n\n      0 git --no-pager -c core.preloadindex=true format-patch -1\n    0001-Commit-message-associated-with-latest-commit.patch\n") (share_link . "http://emacs.stackexchange.com/a/7401/379") (question_id . 7394) (answer_id . 7401) (creation_date . 1421311490) (last_activity_date . 1421311490) (score . 7) (is_accepted . :json-false) (upvoted . :json-false) (downvoted . :json-false) (owner (link . "http://emacs.stackexchange.com/users/504/itsjeyd") (display_name . "itsjeyd") (profile_image . "http://i.stack.imgur.com/oqhFV.png?s=128&g=1") (accept_rate . 67) (user_type . "registered") (user_id . 504) (reputation . 3515)))])) nil)
  sx-display-question(((comments . [((body . "I know it's not a proper answer, but you can always use <code>:</code> to execute an arbitrary command, ie: <code>:</code> then <code>format-patch HEAD~1</code> (or whatever you need)") (site_par . "emacs") (link . "http://emacs.stackexchange.com/questions/7394/can-magit-do-git-format-patch#comment11031_7394") (body_markdown . "I know it's not a proper answer, but you can always use `:` to execute an arbitrary command, ie: `:` then `format-patch HEAD~1` (or whatever you need)") (comment_id . 11031) (post_id . 7394) (creation_date . 1421414750) (post_type . "question") (edited . :json-false) (upvoted . :json-false) (owner (link . "http://emacs.stackexchange.com/users/379/lee-h") (display_name . "Lee H") (profile_image . "https://www.gravatar.com/avatar/bcacd00a7f05c4772329cf9f446c7987?s=128&d=identicon&r=PG") (accept_rate . 92) (user_type . "registered") (user_id . 379) (reputation . 628)))]) (title . "Can Magit do git format-patch?") (site_par . "emacs") (link . "http://emacs.stackexchange.com/questions/7394/can-magit-do-git-format-patch") (body_markdown . "I just wanted to know if Magit has this functionality. The reference [manual](https://magit.github.io/magit.html) does not have this explicitly so that's why I am asking.") (share_link . "http://emacs.stackexchange.com/q/7394/379") (question_id . 7394) (creation_date . 1421298927) (last_activity_date . 1421311490) (score . 7) (answer_count . 1) (view_count . 80) (is_answered . t) (upvoted . :json-false) (downvoted . :json-false) (owner (link . "http://emacs.stackexchange.com/users/5193/cestdiego") (display_name . "CestDiego") (profile_image . "https://www.gravatar.com/avatar/f8ded5c4ab210ecda0954a4fb7794970?s=128&d=identicon&r=PG&f=1") (user_type . "registered") (user_id . 5193) (reputation . 36)) (tags . ["magit"]) (answers . [((link . "http://emacs.stackexchange.com/questions/7394/can-magit-do-git-format-patch/7401#7401") (body_markdown . "You're right, it doesn't seem to be built in. But note that you can run *any* `git` subcommand you like from a Magit buffer by pressing <kbd>:</kbd>, which is bound to `magit-git-command` by default:\n\n> `magit-git-command` is an interactive autoloaded compiled Lisp function\nin `magit.el`.\n\n> `(magit-git-command ARGS DIRECTORY)`\n\n> Execute a Git subcommand asynchronously, displaying the output.\nWith a prefix argument run Git in the root of the current\nrepository.  Non-interactively run Git in `DIRECTORY` with `ARGS`.\n\nSo in order to get a patch for, e.g., the latest commit using `git format-patch` you can do the following:\n\n<kbd>:</kbd> `format-patch -1` <kbd>RET</kbd>\n\nThe output (displayed in the `*magit-process*` buffer) will look something like this:\n\n      0 git --no-pager -c core.preloadindex=true format-patch -1\n    0001-Commit-message-associated-with-latest-commit.patch\n") (share_link . "http://emacs.stackexchange.com/a/7401/379") (question_id . 7394) (answer_id . 7401) (creation_date . 1421311490) (last_activity_date . 1421311490) (score . 7) (is_accepted . :json-false) (upvoted . :json-false) (downvoted . :json-false) (owner (link . "http://emacs.stackexchange.com/users/504/itsjeyd") (display_name . "itsjeyd") (profile_image . "http://i.stack.imgur.com/oqhFV.png?s=128&g=1") (accept_rate . 67) (user_type . "registered") (user_id . 504) (reputation . 3515)))])) focus)
  sx-display(((comments . [((body . "I know it's not a proper answer, but you can always use <code>:</code> to execute an arbitrary command, ie: <code>:</code> then <code>format-patch HEAD~1</code> (or whatever you need)") (site_par . "emacs") (link . "http://emacs.stackexchange.com/questions/7394/can-magit-do-git-format-patch#comment11031_7394") (body_markdown . "I know it's not a proper answer, but you can always use `:` to execute an arbitrary command, ie: `:` then `format-patch HEAD~1` (or whatever you need)") (comment_id . 11031) (post_id . 7394) (creation_date . 1421414750) (post_type . "question") (edited . :json-false) (upvoted . :json-false) (owner (link . "http://emacs.stackexchange.com/users/379/lee-h") (display_name . "Lee H") (profile_image . "https://www.gravatar.com/avatar/bcacd00a7f05c4772329cf9f446c7987?s=128&d=identicon&r=PG") (accept_rate . 92) (user_type . "registered") (user_id . 379) (reputation . 628)))]) (title . "Can Magit do git format-patch?") (site_par . "emacs") (link . "http://emacs.stackexchange.com/questions/7394/can-magit-do-git-format-patch") (body_markdown . "I just wanted to know if Magit has this functionality. The reference [manual](https://magit.github.io/magit.html) does not have this explicitly so that's why I am asking.") (share_link . "http://emacs.stackexchange.com/q/7394/379") (question_id . 7394) (creation_date . 1421298927) (last_activity_date . 1421311490) (score . 7) (answer_count . 1) (view_count . 80) (is_answered . t) (upvoted . :json-false) (downvoted . :json-false) (owner (link . "http://emacs.stackexchange.com/users/5193/cestdiego") (display_name . "CestDiego") (profile_image . "https://www.gravatar.com/avatar/f8ded5c4ab210ecda0954a4fb7794970?s=128&d=identicon&r=PG&f=1") (user_type . "registered") (user_id . 5193) (reputation . 36)) (tags . ["magit"]) (answers . [((link . "http://emacs.stackexchange.com/questions/7394/can-magit-do-git-format-patch/7401#7401") (body_markdown . "You're right, it doesn't seem to be built in. But note that you can run *any* `git` subcommand you like from a Magit buffer by pressing <kbd>:</kbd>, which is bound to `magit-git-command` by default:\n\n> `magit-git-command` is an interactive autoloaded compiled Lisp function\nin `magit.el`.\n\n> `(magit-git-command ARGS DIRECTORY)`\n\n> Execute a Git subcommand asynchronously, displaying the output.\nWith a prefix argument run Git in the root of the current\nrepository.  Non-interactively run Git in `DIRECTORY` with `ARGS`.\n\nSo in order to get a patch for, e.g., the latest commit using `git format-patch` you can do the following:\n\n<kbd>:</kbd> `format-patch -1` <kbd>RET</kbd>\n\nThe output (displayed in the `*magit-process*` buffer) will look something like this:\n\n      0 git --no-pager -c core.preloadindex=true format-patch -1\n    0001-Commit-message-associated-with-latest-commit.patch\n") (share_link . "http://emacs.stackexchange.com/a/7401/379") (question_id . 7394) (answer_id . 7401) (creation_date . 1421311490) (last_activity_date . 1421311490) (score . 7) (is_accepted . :json-false) (upvoted . :json-false) (downvoted . :json-false) (owner (link . "http://emacs.stackexchange.com/users/504/itsjeyd") (display_name . "itsjeyd") (profile_image . "http://i.stack.imgur.com/oqhFV.png?s=128&g=1") (accept_rate . 67) (user_type . "registered") (user_id . 504) (reputation . 3515)))])))
  #<subr call-interactively>(sx-display nil nil)
  ad-Advice-call-interactively(#<subr call-interactively> sx-display nil nil)
  apply(ad-Advice-call-interactively #<subr call-interactively> (sx-display nil nil))
  call-interactively(sx-display nil nil)
  command-execute(sx-display)

I'm using sx-20150115.2157 from MELPA

vermiculus commented 9 years ago

Thanks for the report. This was just merged. Not sure what went wrong. I'll look into it ASAP.

vermiculus commented 9 years ago

Turned out to be a bum variable name that was still in state somehow. I must not have restarted emacs when I ran tests. Thanks gain for the report! Can you confirm it's working now?

dakrone commented 9 years ago

I'm waiting for MELPA to build a new package and then I will try it out. I'll let you know how it goes, thanks for fixing it!

dakrone commented 9 years ago

Just tested and this is fixed, thanks again!

vermiculus commented 9 years ago

:smile: