Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sx-question-mode-hide-show-section fn interactive? #282

Closed
kaushalmodi opened this issue Apr 20, 2015 · 1 comment
Closed

sx-question-mode-hide-show-section fn interactive? #282

kaushalmodi opened this issue Apr 20, 2015 · 1 comment

Comments

@kaushalmodi
Copy link

In the process of figuring out how to unhide a question ( #281 ), I tried out M-x sxhide (hoping that smex will help me find a command related to hiding/unhiding in sx).

A new function did show up: sx-question-mode-hide-show-section

I tried to run it and I got this error:

Debugger entered--Lisp error: (wrong-type-argument overlayp nil)
  overlay-start(nil)
  sx-question-mode-hide-show-section()
  funcall-interactively(sx-question-mode-hide-show-section)
  #<subr call-interactively>(sx-question-mode-hide-show-section record nil)
  ad-Advice-call-interactively(#<subr call-interactively> sx-question-mode-hide-show-section record nil)
  apply(ad-Advice-call-interactively #<subr call-interactively> (sx-question-mode-hide-show-section record nil))
  call-interactively(sx-question-mode-hide-show-section record nil)
  command-execute(sx-question-mode-hide-show-section record)
  execute-extended-command(nil "sx-question-mode-hide-show-section")
  smex-read-and-run(("toggle-debug-on-error" "sx-question-mode-hide-show-section" "sx-question-list-hide" "desktop-read" "nlinum-mode" "report-emacs-bug" "emacs-version" "sos-sel" "sos-diff" "list-packages" "count-words-region" "sos-discardco-force" "customize" "kmacro-insert-counter" "paradox-list-packages" "sos-up" "sos-co-nolock" "list-colors-display" "modi-mode" "global-unset-key" "edebug-defun" "customize-face" "unbind-from-modi-map" "modi/set-linum" "fci-mode" "rpn-calc" "mc/insert-numbers" "mc--insert-number-and-increase" "bzg-big-fringe-mode" "interleave" "describe-char" "electric-verilog-terminate-line" "ediff-buffers" "sos-discardco" "ggtags-update-tags" "browse-url-firefox" "describe-personal-keybindings" "load-file" "toggle-truncate-lines" "revert-all-buffers" "sx-tab-newest" "calc" "shell-script-mode" "query-exchange" "benchmark-init/show-durations-tabulated" "number/add" "matlab-shell" "emacs-lisp-mode" "gist-list" "verilog-mode" ...))
  smex()
  funcall-interactively(smex)
  #<subr call-interactively>(smex nil nil)
  ad-Advice-call-interactively(#<subr call-interactively> smex nil nil)
  apply(ad-Advice-call-interactively #<subr call-interactively> (smex nil nil))
  call-interactively(smex nil nil)
  command-execute(smex)

Looking into the source code, this function is probably not what I thought it was. But if it is interactive, should it error out in this fashion that requires a backtrace debug?

@Malabarba
Copy link
Collaborator

Looking into the source code, this function is probably not what I thought it was.

Indeed.

But if it is interactive, should it error out in this fashion that requires a backtrace debug?

No, we should check where it's being invoked and throw a user-error instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants