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

Error in post-command-hook (indent-guide-post-command-hook) #47

Open
CSRaghunandan opened this issue Jul 28, 2016 · 12 comments
Open

Error in post-command-hook (indent-guide-post-command-hook) #47

CSRaghunandan opened this issue Jul 28, 2016 · 12 comments
Labels

Comments

@CSRaghunandan
Copy link

CSRaghunandan commented Jul 28, 2016

I'm running emacs 24.5.1 on mac osx El capitan and I am running into an issue when using indent-guide in js2-mode.

Whenever I create a function and move the cursor to the function body, indent-guide-mode throws this error :- Error in post-command-hook (indent-guide-post-command-hook): (error "Variable binding depth exceeds max-specpdl-size")
I tried disabling and enabling the mode again, but ran into the same issue.

Any idea how to fix this error ?

ps. this only happens when the function body is empty and I move the cursor to the function body.

@zk-phi
Copy link
Owner

zk-phi commented Jul 29, 2016

@CSRaghunandan ,
Thank you for reporting, I'll look this into later when I have time off.

@zk-phi zk-phi added the bug label Jul 29, 2016
@CSRaghunandan
Copy link
Author

Also, I tried replicating the error with other major modes and it looks like it only breaks down for js2-mode. Could this be because of the indentation defaults for js2-mode ?

@CSRaghunandan
Copy link
Author

Something strange happened, I am no longer encountering the bug anymore. I made minor changes to my .emacs file (but. nothing related to indent-guide) and somehow, it fixed the indent-guide bug.

@zk-phi
Copy link
Owner

zk-phi commented Aug 8, 2016

As I remember, indent-guide does not use any major-mode specific things and it sounds strange to me. Do you remember the changes you made that fixed indent-guide ?

@CSRaghunandan
Copy link
Author

Yes, I set indent-guide-recursive to nil and it works fine, but if I set indent-guide-recursive to a non-nil value, I got the bug(in emacs 24 only, I started using emacs 25 and I no longer get this bug :) )

@zk-phi
Copy link
Owner

zk-phi commented Aug 22, 2016

Thanks.
Does the problem also happen in js-mode (with the same file) ?
If yes, it seems a bug in indent-guide, so can you show me the (part of) code actually causing the problem ?

@CSRaghunandan
Copy link
Author

CSRaghunandan commented Sep 3, 2016

Sorry for the very late reply , and yes, It does happen in all modes (not just js2-mode). Specifically, the problem happens when i've set indent-guide-recursive to t and I just enter the region inside a blank curly brackets(which is not nested inside any other curly brackets) like so :-

screen shot 2016-09-03 at 12 21 14 pm

Also, I was wrong before, i get the same error in emacs 25 too.

@zk-phi
Copy link
Owner

zk-phi commented Sep 5, 2016

Thanks, I'll inspect later.

@FrostyPatronus
Copy link

FrostyPatronus commented Nov 6, 2016

Yeah I got this issue too

Running on Ubuntu 16.04 in Emacs25

@stardiviner
Copy link

stardiviner commented Dec 25, 2017

I got issue too. Provide some details:

I open a new buffer in a new frame. I'm using 'edit-server' to editing Gmail input box email in html-mode.

Error in post-command-hook (indent-guide-post-command-hook): (error "Variable binding depth exceeds max-specpdl-size")
Debugger entered--Lisp error: (error "Variable binding depth exceeds max-specpdl-size")
  ad-Advice-beginning-of-line(#<subr beginning-of-line> 1)
  apply(ad-Advice-beginning-of-line #<subr beginning-of-line> 1)
  beginning-of-line(1)
  back-to-indentation()
  indent-guide--beginning-of-level()
  indent-guide-show()
  indent-guide-show()
  .......
  indent-guide-show()
  indent-guide-show()
  funcall-interactively(indent-guide-show)
  call-interactively(indent-guide-show record nil)
  #f(compiled-function (cmd &optional record-flag keys special) "Execute CMD as an editor command.\nCMD must be a symbol that satisfies the `commandp' predicate.\nOptional second arg RECORD-FLAG non-nil\nmeans unconditionally put this command in the variable `command-history'.\nOtherwise, that is done only if an arg is read using the minibuffer.\nThe argument KEYS specifies the value to use instead of (this-command-keys)\nwhen reading the arguments; if it is nil, (this-command-keys) is used.\nThe argument SPECIAL, if non-nil, means that this command is executing\na special event, so ignore the prefix argument and don't clear it." #<bytecode 0x24dfef>)(indent-guide-show record nil nil)
  ad-Advice-command-execute(#f(compiled-function (cmd &optional record-flag keys special) "Execute CMD as an editor command.\nCMD must be a symbol that satisfies the `commandp' predicate.\nOptional second arg RECORD-FLAG non-nil\nmeans unconditionally put this command in the variable `command-history'.\nOtherwise, that is done only if an arg is read using the minibuffer.\nThe argument KEYS specifies the value to use instead of (this-command-keys)\nwhen reading the arguments; if it is nil, (this-command-keys) is used.\nThe argument SPECIAL, if non-nil, means that this command is executing\na special event, so ignore the prefix argument and don't clear it." #<bytecode 0x24dfef>) indent-guide-show record)
  apply(ad-Advice-command-execute #f(compiled-function (cmd &optional record-flag keys special) "Execute CMD as an editor command.\nCMD must be a symbol that satisfies the `commandp' predicate.\nOptional second arg RECORD-FLAG non-nil\nmeans unconditionally put this command in the variable `command-history'.\nOtherwise, that is done only if an arg is read using the minibuffer.\nThe argument KEYS specifies the value to use instead of (this-command-keys)\nwhen reading the arguments; if it is nil, (this-command-keys) is used.\nThe argument SPECIAL, if non-nil, means that this command is executing\na special event, so ignore the prefix argument and don't clear it." #<bytecode 0x24dfef>) (indent-guide-show record))
  command-execute(indent-guide-show record)
  #f(compiled-function (cmd) #<bytecode 0x1e713f9>)("indent-guide-show")
  ivy-call()
  ivy-read("M-x " [js--tmp-location connection-failed emms-player-fluidsynth-parameters eval-sexp-fu-flash-error org-babel-js-eoe slime-repl-set-package web-mode-engine-open-delimiter-regexps erc-settings .....  pdf-sync-backward-context-limit 
markdown-faces js2-jsdoc-typed-tag-regexp ediff-reset-mouse ipython2\.7-dedicated flymake-start-syntax-check-on-newline texmathp-memory starttls-use-gnutls view-overlay magit-process-mode-syntax-table he-init-string org-babel-sql-dbstring-mssql ht-keys Shift\ top\ level\ right CSSImportRule js2-prop-get-node-op-pos control-flow js2-name-node-len org-export-collect-listings article-time-units Backward\ indent\ bol pgg-verify-region :emacs-interrupt js2-do-node-type sp--indent-region cider-repl--root-ns-highlight-template js2-ast-root Float32Array js2-comp-loop-node-in-pos--cmacro evil-visual-state-p dionysos--mpd-connect magit-insert-unpulled-module-commits make-js2-break-node Delete\ statement nyt slime-choose-overlay-for-sexp all-errs swank:sldb-break-with-default-debugger markdown-toggle-wiki-links helm-cider-repl-history-delete web-mode-edit-element-elements-transpose-backward Fontify\ Code\ Blocks\ Natively company-web-doc-tag-face swiper--update-input-ivy js2-var-decl-node-pos ediff-previous-meta-item1 comment-components js2-visit-tagged-template sh-handle-this-done x-path-walker-command current-scope js2-print-script yas--field-start--cmacro \\sup slime-xref\.location slime-repl-shortcut\.one-liner js2-comp-loop-node-props Execute\ expression\ fast archive-zip-chmod-entry default-case cider-undef LaTeX-math-varPsi magit-magithub-assignee-section-map js2-THISFN] :predicate commandp :require-match t :history counsel-M-x-history :action #f(compiled-function (cmd) #<bytecode 0x1e713f9>) :sort t :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  counsel-M-x()
  funcall-interactively(counsel-M-x)
  call-interactively(counsel-M-x nil nil)
  #f(compiled-function (cmd &optional record-flag keys special) "Execute CMD as an editor command.\nCMD must be a symbol that satisfies the `commandp' predicate.\nOptional second arg RECORD-FLAG non-nil\nmeans unconditionally put this command in the variable `command-history'.\nOtherwise, that is done only if an arg is read using the minibuffer.\nThe argument KEYS specifies the value to use instead of (this-command-keys)\nwhen reading the arguments; if it is nil, (this-command-keys) is used.\nThe argument SPECIAL, if non-nil, means that this command is executing\na special event, so ignore the prefix argument and don't clear it." #<bytecode 0x24dfef>)(counsel-M-x nil nil nil)
  ad-Advice-command-execute(#f(compiled-function (cmd &optional record-flag keys special) "Execute CMD as an editor command.\nCMD must be a symbol that satisfies the `commandp' predicate.\nOptional second arg RECORD-FLAG non-nil\nmeans unconditionally put this command in the variable `command-history'.\nOtherwise, that is done only if an arg is read using the minibuffer.\nThe argument KEYS specifies the value to use instead of (this-command-keys)\nwhen reading the arguments; if it is nil, (this-command-keys) is used.\nThe argument SPECIAL, if non-nil, means that this command is executing\na special event, so ignore the prefix argument and don't clear it." #<bytecode 0x24dfef>) counsel-M-x)
  apply(ad-Advice-command-execute #f(compiled-function (cmd &optional record-flag keys special) "Execute CMD as an editor command.\nCMD must be a symbol that satisfies the `commandp' predicate.\nOptional second arg RECORD-FLAG non-nil\nmeans unconditionally put this command in the variable `command-history'.\nOtherwise, that is done only if an arg is read using the minibuffer.\nThe argument KEYS specifies the value to use instead of (this-command-keys)\nwhen reading the arguments; if it is nil, (this-command-keys) is used.\nThe argument SPECIAL, if non-nil, means that this command is executing\na special event, so ignore the prefix argument and don't clear it." #<bytecode 0x24dfef>) counsel-M-x)
  command-execute(counsel-M-x)

@stardiviner
Copy link

Any update on this?

@stardiviner
Copy link

stardiviner commented Nov 7, 2020

I guess you're busy now. Sorry for distrubting.
@zk-phi Can you check out the error output? Maybe can solve this issue.

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

No branches or pull requests

4 participants