Skip to content
This repository has been archived by the owner on May 2, 2018. It is now read-only.

yas--all-parents: Lisp nesting exceeds `max-lisp-eval-depth' #15

Open
drzraf opened this issue Feb 3, 2014 · 3 comments
Open

yas--all-parents: Lisp nesting exceeds `max-lisp-eval-depth' #15

drzraf opened this issue Feb 3, 2014 · 3 comments

Comments

@drzraf
Copy link

drzraf commented Feb 3, 2014

When loading php-auto-yasnippets with my normal .emacs I get the above errors

  • "backtrace1" below if using M-x yas/create-php-snippet (I get wrong-type-argument stringp nil)
  • "backtrace2" below if using the keybinding (\C-C \C-Y)

But when running :
$ emacs -nw -D -Q --debug-init a.php
(load-file ~/.emacs.d/php-mode.el)
(load-file ~/.emacs.d/dropdown-list.el)
(load-file ~/.emacs.d/yasnippet.el)
(load-file ~/.emacs.d/php-auto-yasnippets.el)
M-: (setq php-auto-yasnippet-php-program "/tmp/Create-PHP-YASnippet.php")
M-: (define-key php-mode-map (kbd "C-c C-y") 'yas/create-php-snippet)

Then going on implode and for the example, putting my cursor after the "i" then M-x yas/create-php-snippet:

  • the status bar says : You can run the command yas/create-php-snippet' with C-c C-y`
  • a newline (nothing else) is inserted between the "i" and the "m"

My hypothesis is that it's not impossible that 2 bugs live here, one about the snippet builder itself (backtrace1) and another one about the interactive/non-interactive function call and empty argument (or something related).

  • backtrace 1 (using M-x yas/create-php-snippet)
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match("[ \f    \n
]+" nil 0)
  split-string(nil)
  (let* ((input-chunks (split-string input)) (function-or-method-name (first input-chunks)) (class-name (or (second input-chunks) "")) (args (list php-executable nil (current-buffer) nil php-auto-yasnippet-php-program))) (setq command-args (list function-or-method-name class-name)) (progn (let ((--dolist-tail-- php-auto-yasnippet-required-files) elt) (while --dolist-tail-- (setq elt (car --dolist-tail--)) (setq command-args (cons elt command-args)) (setq command-args (cons "--require-once" command-args)) (setq --dolist-tail-- (cdr --dolist-tail--))) (setq elt nil) command-args)) (setq args (append args command-args)) (apply (quote call-process) args))
  (progn (let* ((input-chunks (split-string input)) (function-or-method-name (first input-chunks)) (class-name (or (second input-chunks) "")) (args (list php-executable nil (current-buffer) nil php-auto-yasnippet-php-program))) (setq command-args (list function-or-method-name class-name)) (progn (let ((--dolist-tail-- php-auto-yasnippet-required-files) elt) (while --dolist-tail-- (setq elt (car --dolist-tail--)) (setq command-args (cons elt command-args)) (setq command-args (cons "--require-once" command-args)) (setq --dolist-tail-- (cdr --dolist-tail--))) (setq elt nil) command-args)) (setq args (append args command-args)) (apply (quote call-process) args)))
  (unwind-protect (progn (let* ((input-chunks (split-string input)) (function-or-method-name (first input-chunks)) (class-name (or (second input-chunks) "")) (args (list php-executable nil (current-buffer) nil php-auto-yasnippet-php-program))) (setq command-args (list function-or-method-name class-name)) (progn (let ((--dolist-tail-- php-auto-yasnippet-required-files) elt) (while --dolist-tail-- (setq elt (car --dolist-tail--)) (setq command-args (cons elt command-args)) (setq command-args (cons "--require-once" command-args)) (setq --dolist-tail-- (cdr --dolist-tail--))) (setq elt nil) command-args)) (setq args (append args command-args)) (apply (quote call-process) args))) (set-match-data save-match-data-internal (quote evaporate)))
  (let ((save-match-data-internal (match-data))) (unwind-protect (progn (let* ((input-chunks (split-string input)) (function-or-method-name (first input-chunks)) (class-name (or (second input-chunks) "")) (args (list php-executable nil (current-buffer) nil php-auto-yasnippet-php-program))) (setq command-args (list function-or-method-name class-name)) (progn (let ((--dolist-tail-- php-auto-yasnippet-required-files) elt) (while --dolist-tail-- (setq elt ...) (setq command-args ...) (setq command-args ...) (setq --dolist-tail-- ...)) (setq elt nil) command-args)) (setq args (append args command-args)) (apply (quote call-process) args))) (set-match-data save-match-data-internal (quote evaporate))))
  payas/create-template(nil)
  (let ((exit-code (payas/create-template input))) (if (/= exit-code 0) (payas/report-error exit-code input)) (yas-define-snippets (quote php-mode) (list (yas--parse-template))))
  (progn (let ((exit-code (payas/create-template input))) (if (/= exit-code 0) (payas/report-error exit-code input)) (yas-define-snippets (quote php-mode) (list (yas--parse-template)))))
  (unwind-protect (progn (let ((exit-code (payas/create-template input))) (if (/= exit-code 0) (payas/report-error exit-code input)) (yas-define-snippets (quote php-mode) (list (yas--parse-template))))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (let ((exit-code (payas/create-template input))) (if (/= exit-code 0) (payas/report-error exit-code input)) (yas-define-snippets (quote php-mode) (list (yas--parse-template))))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
  (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (let ((exit-code (payas/create-template input))) (if (/= exit-code 0) (payas/report-error exit-code input)) (yas-define-snippets (quote php-mode) (list (yas--parse-template))))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
  (if (yas--get-template-by-uuid (quote php-mode) input) nil (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (let ((exit-code ...)) (if (/= exit-code 0) (payas/report-error exit-code input)) (yas-define-snippets (quote php-mode) (list ...)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))
  payas/define-template(nil)
  (if class (payas/define-template (concat function " " class)) (payas/define-template function))
  (let ((function (thing-at-point (quote symbol))) (class (if prefix (read-from-minibuffer "Class: ")))) (if class (payas/define-template (concat function " " class)) (payas/define-template function)) (setq php-auto-yasnippet-executing t) (yas-expand))
  yas/create-php-snippet(nil)
  call-interactively(yas/create-php-snippet record nil)
  command-execute(yas/create-php-snippet record)
  execute-extended-command(nil "yas/create-php-snippet")
  call-interactively(execute-extended-command nil nil)
@ejmr
Copy link
Collaborator

ejmr commented Feb 3, 2014

Thanks for the detailed bug information. That will help a lot for fixing this.

@amcorreia
Copy link

Same thing occur if you are at the end of string?
implode_ <- cursor

@drzraf
Copy link
Author

drzraf commented Mar 24, 2014

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

No branches or pull requests

3 participants