Need help debugging
I installed your package following the README.
When I type 'preg_match' in a php file and they type 'C-c C-y', I get this error:
split-string: Wrong type argument: stringp, nil
This is my config:
https://gist.github.com/dhaley/5707041
Here is the message from emacs debug:
https://gist.github.com/dhaley/5707074
I'm using php mode 1.10 and my php-executable (5.3.13) is: /Applications/MAMP/bin/php/php5.3.13/bin/php
What might I be doing wrong?
You're not doing anything wrong; your setup looks fine. The problem is a bug in my code. However, so far I have not been able to duplicate the bug because when I tried I discovered another bug on top of the one causing you problems. On that note, would you please run php "/Users/daha1836/.emacs.d/site-lisp/php-auto-yasnippets/Create-PHP-YASnippet.php" preg_match and paste the output? That will be helpful.
My apologies for the bugs, but thanks for the report. I'll try to have it fixed soon.
Here is the output:
% php "/Users/daha1836/.emacs.d/site-lisp/php-auto-yasnippets/Create-PHP-YASnippet.php" preg_match #key: preg_match #name: preg_match #group: pcre
--
No argument list comes at the end? The output should look like so:
#key: preg_match
#name: preg_match
#group: pcre
# --
preg_match(${1:$pattern,} ${2:$subject,} ${3:[&$subpatterns],} ${4:[$flags],} ${5:[$offset],})
Sorry, I left off a line. Here it is:
% php "/Users/daha1836/.emacs.d/site-lisp/php-auto-yasnippets/Create-PHP-YASnippet.php" preg_match #key: preg_match #name: preg_match #group: pcre
--
preg_match(${1:$pattern,} ${2:$subject,} ${3:[&$subpatterns],} ${4:[$flags],} ${5:[$offset],})%
It looks like I have a '%' at the end of my shell output. Not sure if that matters.
Thank you for the output. The percent character should not be a problem as I am guessing that is your shell prompt. The PHP script does not add a newline to the end of the output so the terminal prompt will immediately follow it. If that character is not your prompt though then that is a bug.
Would you also please tell me the exit code of Create-PHP-YASnippet.php after you run it with the preg_match argument? The exit code should be zero, but if it is not then that will provide a better idea of the problem. My aplogies for having to ask you to help in this debugging since I cannot reproduce the error on my computer.
The exit code is 0. Hope that helps.
Sorry for the delay on this, but today I came across a bug which may be the cause of the problem. I can't say for certain, unfortunately, but hopefully it will help the problem you're having or at least shed some light on it. I just wanted to mention it so you wouldn't think I've dropped trying to resolve this issue.
@dhaley If you still using the package would you please try the newly released v2.0.0? It contains a patch which (hopefully) addresses your issue.
I upgraded to 2.0.0 but to no avail.
I still get this message:
https://gist.github.com/dhaley/6273834
Let me know if can still assist.
Sorry to hear you're still running into the bug, but thank you for the helpful error output.