indent-guide
indent-guide copied to clipboard
Error in post-command-hook (indent-guide-post-command-hook)
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.
@CSRaghunandan , Thank you for reporting, I'll look this into later when I have time off.
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 ?
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.
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 ?
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 :) )
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 ?
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 :-

Also, I was wrong before, i get the same error in emacs 25 too.
Thanks, I'll inspect later.
Yeah I got this issue too
Running on Ubuntu 16.04 in Emacs25
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)
Any update on this?
I guess you're busy now. Sorry for distrubting. @zk-phi Can you check out the error output? Maybe can solve this issue.