GNU bug report logs - #76955
30.1; php-ts-mode-php-executable default path may not match remote path

Previous Next

Package: emacs;

Reported by: Morgan Willcock <morgan <at> ice9.digital>

Date: Tue, 11 Mar 2025 20:11:02 UTC

Severity: normal

Found in version 30.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Morgan Willcock <morgan <at> ice9.digital>
Cc: v.pupillo <at> gmail.com, 76955 <at> debbugs.gnu.org
Subject: bug#76955: 30.1; php-ts-mode-php-executable default path may not match remote path
Date: Thu, 13 Mar 2025 06:29:51 +0200
> From: Morgan Willcock <morgan <at> ice9.digital>
> Cc: 76955 <at> debbugs.gnu.org,  v.pupillo <at> gmail.com
> Date: Wed, 12 Mar 2025 19:47:34 +0000
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> From: Morgan Willcock <morgan <at> ice9.digital>
> >> Cc: 76955 <at> debbugs.gnu.org,  v.pupillo <at> gmail.com
> >> Date: Wed, 12 Mar 2025 18:25:16 +0000
> >> 
> >> Eli Zaretskii <eliz <at> gnu.org> writes:
> >> 
> >> > Does it help to use this instead:
> >> >
> >> >   (defcustom php-ts-mode-php-executable
> >> >      (or (executable-find "php" t) "/usr/bin/php")
> >> 
> >> I don't think that would help.
> >> 
> >> If the package is loaded while default-directory is local the value
> >> would be wrong on the remote system.
> >
> > So what is your scenario that it requires to have a php executable on
> > the remote host?  Can you describe your use case in detail?
> 
> I am not doing anything complicated, just using the same major mode both
> locally and remotely.
> 
> The local binary (on PATH) is "c:/Users/mwillcock/scoop/shims/php.exe".
> 
> The remote binary (on PATH, but if it wasn't I imagine I could get it on
> PATH using connection-local-set-profiles - I am already doing that for
> an LSP server binary) is "/usr/pkg/bin/php".

What is the binary used for in this mode, and why can't whatever is
done with it be always done locally?  I'm asking because I don't use
this mode and don't know why the executable is needed by it.

> >> I was surprised that the default value was not "php".  Is there some
> >> benefit in searching for the executable so early?
> >
> > Who said it must be on PATH?
> 
> I think it is more likely to be on PATH than not, and if "/usr/bin/php"
> does exist I think that is also likely to be on PATH anyway.

The defcustom exists so that you could customize it to anything, and
exec-path is not identical to PATH.




This bug report was last modified 52 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.