branch: externals/matlab-mode
commit 9143938e863b9ff352e46d821e1eb5f413788062
Author: John Ciolfi <[email protected]>
Commit: John Ciolfi <[email protected]>
matlab-shell: handle symlink abs path for matlab-shell-command
---
matlab-shell.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/matlab-shell.el b/matlab-shell.el
index 89432b4dc7..3e45c71225 100644
--- a/matlab-shell.el
+++ b/matlab-shell.el
@@ -308,7 +308,7 @@ otherwise an error is signaled."
(cond
;;Case: the path to the matlab executable was provided, validate it
exists and
- ;; return the true path.
+ ;; return it.
((file-name-absolute-p matlab-shell-command)
(when (not (file-exists-p matlab-shell-command))
(user-error "Invalid setting for `matlab-shell-command', %s does
not exist"
@@ -316,7 +316,10 @@ otherwise an error is signaled."
(when (not (file-executable-p matlab-shell-command))
(user-error "Invalid setting for `matlab-shell-command', %s is not
executable"
matlab-shell-command))
- (setq abs-matlab-exe (file-truename matlab-shell-command)))
+ ;; Use the path provided. Consider the case where a launcher script
is provided and the
+ ;; launcher script is symlink'd. In this case, we shouldn't resolve
the symlinks, i.e.
+ ;; using file-truename would break this case.
+ (setq abs-matlab-exe matlab-shell-command))
;; Case: set to a relative path
;;