From 13633b081b3d57d2124932b35f8702e61ac29762 Mon Sep 17 00:00:00 2001 From: Compro Prasad Date: Fri, 1 Jun 2018 08:47:46 +0530 Subject: [PATCH] Fixes #10723 - Properly check for executable rather than file (#10735) Given the executable name is "emacs", now this executable will be auto located as per the PATH environment variable. --- core/core-dotspacemacs.el | 2 +- core/core-dumper.el | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/core-dotspacemacs.el b/core/core-dotspacemacs.el index b8145722c..263ed4bb9 100644 --- a/core/core-dotspacemacs.el +++ b/core/core-dotspacemacs.el @@ -60,7 +60,7 @@ or `spacemacs'.") to compile Emacs 27 from source following the instructions in file EXPERIMENTAL.org at to root of the git repository.") -(defvar dotspacemacs-emacs-pdumper-executable-file "emacs" +(defvar dotspacemacs-emacs-pdumper-executable-file "emacs-27.0.50" "File path pointing to emacs 27.1 executable compiled with support for the portable dumper (this is currently the branch pdumper.") diff --git a/core/core-dumper.el b/core/core-dumper.el index 86ce4114c..0ede49926 100644 --- a/core/core-dumper.el +++ b/core/core-dumper.el @@ -60,7 +60,9 @@ You should not used this function, it is reserved for some specific process." (defun spacemacs/emacs-with-pdumper-set-p () "Return non-nil if a portable dumper capable emacs executable is set." (and dotspacemacs-enable-emacs-pdumper - (file-exists-p dotspacemacs-emacs-pdumper-executable-file))) + (file-exists-p + (locate-file dotspacemacs-emacs-pdumper-executable-file + exec-path exec-suffixes 'file-executable-p)))) (defun spacemacs/dump-emacs () "Dump emacs in a subprocess."