Subject: bug#76955: 30.1; php-ts-mode-php-executable default path may not match remote path

From: Morgan Willcock <[email-masked]>
Date: Thu, 13 Mar 2025 16:59:00 +0000

Vincenzo Pupillo <[email-masked]> writes:

>> If someone could explain the reasoning behind how the default value is
>> currently being set, and why that is better than just using the value
>> "php", feel free to close this bug report.
>
> At first it was just 'php' then, since I don't know the details of how path
> resolution works on Windows or even Macs, I preferred to use 'executable-
> find'. as in python.el for example.

I think the critical difference is, python.el is not using the path to
the binary as the default value, it takes the successful search as a
signal of which python executable name to be searching for:

(defcustom python-interpreter
  (cond ((executable-find "python") "python")
        (t "python3"))

> So, since I have always used 'php-mode' and wanted users to feel "at
> home", I used exactly the same expression: '(or (executable-find "php")
> "/usr/bin/php")'.

I don't think php-mode has a feature like run-php, so your original
default value of "php" makes much more sense to me.

I don't think you need to do anything special for Windows of macOS.

-- 
Morgan Willcock