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


Message #107 received at 76955 <at> debbugs.gnu.org (full text, mbox):

From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
To: Morgan Willcock <morgan <at> ice9.digital>,
 Michael Albinus <michael.albinus <at> gmx.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 76955 <at> debbugs.gnu.org
Subject: Re: bug#76955: 30.1;
 php-ts-mode-php-executable default path may not match remote path
Date: Sun, 16 Mar 2025 23:01:59 +0100
Ciao Micheal, 
I wrote this function based on what you wrote in your last email and what I 
read in the TRAMP documentation:

(defun php-ts-mode--executable-find ()
  (let ((php-prog
	 (if (file-remote-p default-directory)
	     (let* ((remote-path (when (boundp 'tramp-remote-path) 
				tramp-remote-path))
		    (own-path (when (boundp 'tramp-own-remote-path) 
				tramp-own-remote-path))
		    (exec-path (delete-dups 
					(append remote-path own-path exec-path))))
	       (executable-find "php" t))
           php-ts-mode-php-executable)))
    php-prog))

Does this function make any sense?

Vincenzo

In data domenica 16 marzo 2025 09:34:09 Ora standard dell’Europa centrale, 
Michael Albinus ha scritto:
> Morgan Willcock <morgan <at> ice9.digital> writes:
> 
> Hi,
> 
> > That said, I do not claim to be TRAMP expert, I just use it.  A TRAMP
> > maintainer is probably better positioned to clarify the preferable way
> > to configure paths to executables so they work locally and remotely.
> 
> Tramp recommends to use (executable-find "php" 'remote) . This requires
> to set a proper PATH on the remote side. Experience tells, that likely,
> you will run into further problems if you haven't set the remote (and
> local) PATH accordingly.
> 
> Users might apply hard-coded values, like "/exotic/path/php" or
> "php". This is what connection-local variables are good for.
> 
> But a package should offer the proper way of setting.
> 
> Best regards, Michael.








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.