emacs-php / php-mode

A powerful and flexible Emacs major mode for editing PHP scripts
GNU General Public License v3.0
587 stars 119 forks source link

Incorporate `inf-php` #103

Open ejmr opened 11 years ago

ejmr commented 11 years ago

Takayuki Sato's inf-php package provides a useful way to run an interactive PHP session. It is a much better version of the existing php-send-region command. We should remove that command and defer to inf-php instead. Futhermore, we also need to make sure that no key-bindings in inf-php conflict with bindings in PHP Mode.

danlamanna commented 11 years ago

As an emacs-lisper I am a huge advocate of REPLs and think php-mode should have one, however - I don't think anyones arguing the flaws that are present with PHPs built in interactive shell. It has almost no features, and fatal errors leave it unrecoverable.

However, boris has active development, and exists on packagist. I was able to find php-boris-minor-mode which seems like a good alternative.

Assuming the minor mode works well (admittedly I haven't tried it, or inf-php for that matter), the only con I can see to this is requiring the user install a 3rd party package to take advantage of the feature.

What are your thoughts on boris as opposed to inf-php?

ejmr commented 11 years ago

I have used both but not so much that I feel confident picking one over the other. I just happened to use inf-php first, hence this issue.

That said, I believe a better approach is to allow both by creating a generic way in PHP Mode to launch a REPL and then let users customize that, providing instructions on how to get inf-php and boris, and any others that come along in the future. Some users are going to prefer one over the other, and I cannot think of any technical difficulties off the top of my head that would make it a burden to support different REPLs.