commit cc90c25a50e536669ac327f7e05ec9194d1650d0 (HEAD, refs/remotes/origin/master) Author: Michael Albinus Date: Sun Aug 30 09:59:02 2015 +0200 * lisp/net/tramp-sh.el (tramp-convert-file-attributes): Revert patch from 2015-08-24. Tramp shall be have like for local files. * test/automated/tramp-tests.el (tramp-test18-file-attributes): Adapt test. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index c5ffb26..8cae8dc 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -5114,18 +5114,10 @@ raises an error." Convert file mode bits to string and set virtual device number. Return ATTR." (when attr - ;; Convert symlink from `tramp-do-file-attributes-with-stat'. - (when (consp (car attr)) - (if (and (stringp (caar attr)) - (string-match ".+ -> .\\(.+\\)." (caar attr))) - (setcar attr (match-string 1 (caar attr))) - (setcar attr nil))) - ;; Remove color escape sequences and double slashes from symlink. + ;; Remove color escape sequences from symlink. (when (stringp (car attr)) (while (string-match tramp-color-escape-sequence-regexp (car attr)) - (setcar attr (replace-match "" nil nil (car attr)))) - (while (string-match "//" (car attr)) - (setcar attr (replace-match "/" nil nil (car attr))))) + (setcar attr (replace-match "" nil nil (car attr))))) ;; Convert uid and gid. Use -1 as indication of unusable value. (when (and (numberp (nth 2 attr)) (< (nth 2 attr) 0)) (setcar (nthcdr 2 attr) -1)) @@ -5166,6 +5158,12 @@ Return ATTR." ;; Convert directory indication bit. (when (string-match "^d" (nth 8 attr)) (setcar attr t)) + ;; Convert symlink from `tramp-do-file-attributes-with-stat'. + (when (consp (car attr)) + (if (and (stringp (caar attr)) + (string-match ".+ -> .\\(.+\\)." (caar attr))) + (setcar attr (match-string 1 (caar attr))) + (setcar attr nil))) ;; Set file's gid change bit. (setcar (nthcdr 9 attr) (if (numberp (nth 3 attr)) diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el index 498a0cf..c5cab7d 100644 --- a/test/automated/tramp-tests.el +++ b/test/automated/tramp-tests.el @@ -1118,9 +1118,10 @@ This tests also `file-readable-p' and `file-regular-p'." t))) (when (file-symlink-p tmp-name2) (setq attr (file-attributes tmp-name2)) - (should (string-equal - (car attr) - (file-remote-p (file-truename tmp-name3) 'localname))) + (should + (string-equal + (car attr) + (tramp-file-name-localname (tramp-dissect-file-name tmp-name3)))) (delete-file tmp-name2)) (delete-file tmp-name1) commit 001c7dd928238a196dff4166ad29141116ef6d1c Author: Paul Eggert Date: Sat Aug 29 21:40:21 2015 -0700 Text quoting fixes in cedet, emulation, emacs-lisp * lisp/cedet/ede.el (ede-check-project-directory): * lisp/cedet/semantic/analyze/debug.el: (semantic-analyzer-debug-insert-include-summary): * lisp/cedet/semantic/bovine/c.el (semantic-c-describe-environment): * lisp/cedet/semantic/decorate/include.el: (semantic-decoration-unknown-include-describe) (semantic-decoration-all-include-summary): * lisp/cedet/semantic/ia.el (semantic-ia-fast-jump): * lisp/emulation/edt.el (edt-load-keys): * lisp/emulation/viper-cmd.el: (viper-display-current-destructive-command) (viper-query-replace, viper-brac-function): * lisp/emulation/viper-ex.el (viper-get-ex-token, ex-compile): * lisp/emulation/viper-macs.el (viper-unrecord-kbd-macro): Respect text quoting style in doc string or diagnostic. * lisp/cedet/mode-local.el (describe-mode-local-overload): Use format-message to avoid overtranslating quotes. * lisp/emacs-lisp/checkdoc.el (checkdoc-in-sample-code-p): Escape an apostrophe in a docstring. * lisp/emacs-lisp/warnings.el (lwarn): Fix doc string. diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el index 3b06cf7..7d99b17 100644 --- a/lisp/cedet/ede.el +++ b/lisp/cedet/ede.el @@ -512,7 +512,7 @@ Sets buffer local variables for EDE." (when projdetect ;; No project was loaded, but we have a project description ;; object. This means that we try to load it. - ;; + ;; ;; Before loading, we need to check if it is a safe ;; project to load before requesting it to be loaded. @@ -728,9 +728,10 @@ Return nil if DIR should not be in `ede-project-directories'." (when (listp ede-project-directories) (or (member dir ede-project-directories) (when (funcall ede-check-project-query-fcn - (format "`%s' is not listed in `ede-project-directories'. + (format-message + "`%s' is not listed in `ede-project-directories'. Add it to the list of allowed project directories? " - dir)) + dir)) (push dir ede-project-directories) ;; If possible, save `ede-project-directories'. (if (or custom-file user-init-file) @@ -799,7 +800,7 @@ Optional argument NAME is the name to give this project." "Unknown file name specifier %S" pf))) :targets nil) - + )) (inits (oref obj initializers))) ;; Force the name to match for new objects. diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el index 9ee8750..287e655 100644 --- a/lisp/cedet/mode-local.el +++ b/lisp/cedet/mode-local.el @@ -643,15 +643,14 @@ SYMBOL is a function that can be overridden." (with-current-buffer describe-function-orig-buffer (fetch-overload symbol))))) (insert (overload-docstring-extension symbol) "\n\n") - (insert (substitute-command-keys (format "default function: `%s'\n" default))) + (insert (format-message "default function: `%s'\n" default)) (when (and (boundp 'describe-function-orig-buffer) ;; added in Emacs 25 describe-function-orig-buffer) (if override - (insert (substitute-command-keys - (format "\noverride in buffer '%s': `%s'\n" - describe-function-orig-buffer override))) - (insert (substitute-command-keys (format "\nno override in buffer '%s'\n" - describe-function-orig-buffer))))) + (insert (format-message "\noverride in buffer '%s': `%s'\n" + describe-function-orig-buffer override)) + (insert (format-message "\nno override in buffer '%s'\n" + describe-function-orig-buffer)))) ))) (add-hook 'help-fns-describe-function-functions 'describe-mode-local-overload) diff --git a/lisp/cedet/semantic/analyze/debug.el b/lisp/cedet/semantic/analyze/debug.el index d0ab7c82..76a6cc2 100644 --- a/lisp/cedet/semantic/analyze/debug.el +++ b/lisp/cedet/semantic/analyze/debug.el @@ -405,7 +405,8 @@ or implementing a version specific to ") (princ "\n\nInclude Path Summary:") (when edeobj - (princ "\n\nThis file's project include search is handled by the EDE object:\n") + (princ (substitute-command-keys + "\n\nThis file's project include search is handled by the EDE object:\n")) (princ " Buffer Target: ") (princ (object-print edeobj)) (princ "\n") @@ -463,12 +464,12 @@ or implementing a version specific to ") (princ "\nYou can fix the include path for ") (princ (symbol-name (oref table major-mode))) - (princ " by using this function: + (princ (substitute-command-keys " by using this function: -M-x semantic-customize-system-include-path RET +\\[semantic-customize-system-include-path] which customizes the mode specific variable for the mode-local -variable `semantic-dependency-system-include-path'.") +variable `semantic-dependency-system-include-path'.")) ) (princ "\n No unknown includes.\n")) diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el index 6639f17..1c25c7b 100644 --- a/lisp/cedet/semantic/bovine/c.el +++ b/lisp/cedet/semantic/bovine/c.el @@ -2176,7 +2176,8 @@ actually in their parent which is not accessible.") (princ "\n\nInclude Path Summary:\n") (when (and (boundp 'ede-object) ede-object) - (princ "\n This file's project include is handled by:\n") + (princ (substitute-command-keys + "\n This file's project include is handled by:\n")) (let ((objs (if (listp ede-object) ede-object (list ede-object)))) @@ -2194,14 +2195,16 @@ actually in their parent which is not accessible.") ) (when semantic-dependency-include-path - (princ "\n This file's generic include path is:\n") + (princ (substitute-command-keys + "\n This file's generic include path is:\n")) (dolist (dir semantic-dependency-include-path) (princ " ") (princ dir) (princ "\n"))) (when semantic-dependency-system-include-path - (princ "\n This file's system include path is:\n") + (princ (substitute-command-keys + "\n This file's system include path is:\n")) (dolist (dir semantic-dependency-system-include-path) (princ " ") (princ dir) diff --git a/lisp/cedet/semantic/decorate/include.el b/lisp/cedet/semantic/decorate/include.el index 7bfca77..962dc49 100644 --- a/lisp/cedet/semantic/decorate/include.el +++ b/lisp/cedet/semantic/decorate/include.el @@ -503,7 +503,8 @@ Argument EVENT is the mouse clicked event." (princ "Include File: ") (princ (semantic-format-tag-name tag nil t)) (princ "\n\n") - (princ "This header file has been marked \"Unknown\". + (princ (substitute-command-keys "\ +This header file has been marked \"Unknown\". This means that Semantic has not been able to locate this file on disk. When Semantic cannot find an include file, this means that the @@ -521,9 +522,9 @@ M-x semantic-add-system-include RET /path/to/includes RET or, in your .emacs file do: - (semantic-add-system-include \"/path/to/include\" '") + (semantic-add-system-include \"/path/to/include\" \\='")) (princ (symbol-name mm)) - (princ ") + (princ (substitute-command-keys ") to add the path to Semantic's search. @@ -531,7 +532,7 @@ If this is an include file that belongs to your project, then you may need to update `semanticdb-project-roots' or better yet, use `ede' to manage your project. See the ede manual for projects that will wrap existing project code for Semantic's benefit. -") +")) (when (or (eq mm 'c++-mode) (eq mm 'c-mode)) (princ " @@ -745,7 +746,8 @@ Argument EVENT describes the event that caused this function to be called." (when (and (boundp 'ede-object) (boundp 'ede-object-project) ede-object) - (princ " This file's project include search is handled by the EDE object:\n") + (princ (substitute-command-keys + " This file's project include search is handled by the EDE object:\n")) (princ " Buffer Target: ") (princ (object-print ede-object)) (princ "\n") @@ -769,7 +771,8 @@ Argument EVENT describes the event that caused this function to be called." (princ "\n")) ))) - (princ "\n This file's system include path is:\n") + (princ (substitute-command-keys + "\n This file's system include path is:\n")) (dolist (dir semantic-dependency-system-include-path) (princ " ") (princ dir) diff --git a/lisp/cedet/semantic/ia.el b/lisp/cedet/semantic/ia.el index 2216fa9..27e6db1 100644 --- a/lisp/cedet/semantic/ia.el +++ b/lisp/cedet/semantic/ia.el @@ -364,15 +364,17 @@ origin of the code at point." (let ((secondclass (car (reverse (oref ctxt prefixtypes))))) (cond ((and (semantic-tag-with-position-p secondclass) - (y-or-n-p (format "Could not find `%s'. Jump to %s? " - first (semantic-tag-name secondclass)))) + (y-or-n-p (format-message + "Could not find `%s'. Jump to %s? " + first (semantic-tag-name secondclass)))) (semantic-ia--fast-jump-helper secondclass) ) ;; If we missed out on the class of the second item, then ;; just visit SECOND. ((and (semantic-tag-p second) - (y-or-n-p (format "Could not find `%s'. Jump to %s? " - first (semantic-tag-name second)))) + (y-or-n-p (format-message + "Could not find `%s'. Jump to %s? " + first (semantic-tag-name second)))) (semantic-ia--fast-jump-helper second) )))) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 8a845f9..b2c8119 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -1954,7 +1954,7 @@ from the comment." "Return non-nil if the current point is in a code fragment. A code fragment is identified by an open parenthesis followed by a symbol which is a valid function or a word in all CAPS, or a parenthesis -that is quoted with the ' character. Only the region from START to LIMIT +that is quoted with the \\=' character. Only the region from START to LIMIT is allowed while searching for the bounding parenthesis." (save-match-data (save-restriction diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el index d729a9a..b88af1d 100644 --- a/lisp/emacs-lisp/warnings.el +++ b/lisp/emacs-lisp/warnings.el @@ -314,7 +314,7 @@ See also `warning-series', `warning-prefix-function' and ;; Any keymap that is defined will do. ;;;###autoload (defun lwarn (type level message &rest args) - "Display a warning message made from (format MESSAGE ARGS...). + "Display a warning message made from (format-message MESSAGE ARGS...). \\ Aside from generating the message with `format-message', this is equivalent to `display-warning'. @@ -336,7 +336,7 @@ LEVEL should be either :debug, :warning, :error, or :emergency ;;;###autoload (defun warn (message &rest args) - "Display a warning message made from (format MESSAGE ARGS...). + "Display a warning message made from (format-message MESSAGE ARGS...). Aside from generating the message with `format-message', this is equivalent to `display-warning', using `emacs' as the type and `:warning' as the level." diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index 2c9e579..9bd1627 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el @@ -1984,7 +1984,8 @@ created." (if (edt-y-or-n-p "Do you want to run it now? ") (load-file path) (error "EDT Emulation not configured"))) - (insert "Nope, I can't seem to find it. :-(\n\n") + (insert (substitute-command-keys + "Nope, I can't seem to find it. :-(\n\n")) (sit-for 20) (error "EDT Emulation not configured")))))) diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 4fe948a..8b3f6b4 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -1751,8 +1751,8 @@ invokes the command before that, etc." (setq this-command 'viper-display-current-destructive-command) - (message " `.' runs %s%s" - (concat "`" (viper-array-to-string keys) "'") + (message " `.' runs `%s'%s" + (viper-array-to-string keys) (viper-abbreviate-string (if (featurep 'xemacs) (replace-in-string ; xemacs @@ -1763,7 +1763,8 @@ invokes the command before that, etc." text ; emacs ) max-text-len - " inserting `" "'" " .......")) + (format-message " inserting `") (format-message "'") + " .......")) )) @@ -4341,7 +4342,7 @@ and regexp replace." (query-replace-regexp str (viper-read-string-with-history - (format "Query replace regexp `%s' with: " str) + (format-message "Query replace regexp `%s' with: " str) nil ; no initial 'viper-replace1-history (car viper-replace1-history) ; default @@ -4349,7 +4350,7 @@ and regexp replace." (query-replace str (viper-read-string-with-history - (format "Query replace `%s' with: " str) + (format-message "Query replace `%s' with: " str) nil ; no initial 'viper-replace1-history (car viper-replace1-history) ; default @@ -4643,7 +4644,7 @@ One can use \\=`\\=` and \\='\\=' to temporarily jump 1 step back." reg (buffer-name buf) line-no)) (princ (format "Here is some text around %c:\n\n %s" reg text))) - (princ (format viper-EmptyTextmarker reg)))) + (princ (format-message viper-EmptyTextmarker reg)))) )) (t (error viper-InvalidTextmarker reg))))) diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el index e6bcf8f..fb2c179 100644 --- a/lisp/emulation/viper-ex.el +++ b/lisp/emulation/viper-ex.el @@ -491,7 +491,7 @@ reversed." (forward-char 1) (cond ((looking-at "'") (setq ex-token nil)) ((looking-at "[a-z]") (setq ex-token (following-char))) - (t (error "Marks are ' and a-z"))) + (t (error "%s" "Marks are ' and a-z"))) (forward-char 1)) ((looking-at "\n") (setq ex-token-type 'end-mark) @@ -2190,7 +2190,7 @@ Please contact your system administrator. " (defun ex-compile () "Reads args from the command line, then runs make with the args. If no args are given, then it runs the last compile command. -Type 'mak ' (including the space) to run make with no args." +Type `mak ' (including the space) to run make with no args." (let (args) (with-current-buffer (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) diff --git a/lisp/emulation/viper-macs.el b/lisp/emulation/viper-macs.el index e856832..4b33b42 100644 --- a/lisp/emulation/viper-macs.el +++ b/lisp/emulation/viper-macs.el @@ -529,9 +529,9 @@ mistakes in macro names to be passed to this function is to use (cond ((and (cdr buf-mapping) (or (and (not (cdr mode-mapping)) (not (cdr global-mapping))) (y-or-n-p - (format "Unmap %S for `%s' only? " - (viper-display-macro macro-name) - (buffer-name))))) + (format-message "Unmap %S for `%s' only? " + (viper-display-macro macro-name) + (buffer-name))))) (setq macro-pair buf-mapping) (message "%S is unmapped for %s in `%s'" (viper-display-macro macro-name) @@ -539,9 +539,9 @@ mistakes in macro names to be passed to this function is to use ((and (cdr mode-mapping) (or (not (cdr global-mapping)) (y-or-n-p - (format "Unmap %S for the major mode `%S' only? " - (viper-display-macro macro-name) - major-mode)))) + (format-message "Unmap %S for the major mode `%S' only? " + (viper-display-macro macro-name) + major-mode)))) (setq macro-pair mode-mapping) (message "%S is unmapped for %s in %S" (viper-display-macro macro-name) state-name major-mode)) commit 24ee55bfd4371e24a03db0fbd830ad5adac0ac4f Author: Daniel Colascione Date: Sat Aug 29 18:06:13 2015 -0700 Fix which-func for curly quotes: look for symbol, not message * lisp/progmodes/which-func.el (which-func-ff-hook): Look for new imenu-unavailable error symbol instead of trying to match message exactly. * lisp/imenu.el (imenu-unavailable): New error (imenu-unavailable-error): New function. diff --git a/lisp/imenu.el b/lisp/imenu.el index 158718b..717ac63 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -348,6 +348,12 @@ Don't move point." ;;; Lisp ;;; +(define-error 'imenu-unavailable "imenu unavailable") + +(defun imenu-unavailable-error (format &rest args) + (signal 'imenu-unavailable + (list (apply #'format-message format args)))) + (defun imenu-example--lisp-extract-index-name () ;; Example of a candidate for `imenu-extract-index-name-function'. ;; This will generate a flat index of definitions in a lisp file. @@ -590,7 +596,8 @@ See `imenu--index-alist' for the format of the index alist." (funcall imenu-create-index-function)))) (imenu--truncate-items imenu--index-alist))) (or imenu--index-alist noerror - (user-error "No items suitable for an index found in this buffer")) + (imenu-unavailable-error + "No items suitable for an index found in this buffer")) (or imenu--index-alist (setq imenu--index-alist (list nil))) ;; Add a rescan option to the index. @@ -704,7 +711,7 @@ The alternate method, which is the one most often used, is to call ((and imenu-generic-expression) (imenu--generic-function imenu-generic-expression)) (t - (user-error "This buffer cannot use `imenu-default-create-index-function'")))) + (imenu-unavailable-error "This buffer cannot use `imenu-default-create-index-function'")))) ;;; ;;; Generic index gathering function. @@ -956,8 +963,8 @@ See the command `imenu' for more information." `(menu-item ,name ,imenu--menubar-keymap)) (use-local-map newmap) (add-hook 'menu-bar-update-hook 'imenu-update-menubar))) - (user-error "The mode `%s' does not support Imenu" - (format-mode-line mode-name)))) + (imenu-unavailable-error "The mode `%s' does not support Imenu" + (format-mode-line mode-name)))) ;;;###autoload (defun imenu-add-menubar-index () diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 81f3b8f..a8c2813 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -209,11 +209,11 @@ It creates the Imenu index for the buffer, if necessary." (< buffer-saved-size which-func-maxout) (= which-func-maxout 0))) (setq imenu--index-alist - (save-excursion (funcall imenu-create-index-function)))) + (save-excursion (funcall imenu-create-index-function)))) + (imenu-unavailable + (setq which-func-mode nil)) (error - (unless (equal err - '(user-error "This buffer cannot use `imenu-default-create-index-function'")) - (message "which-func-ff-hook error: %S" err)) + (message "which-func-ff-hook error: %S" err) (setq which-func-mode nil)))) (defun which-func-update () commit 57e1205767c012d4fcea87d99db987bc7c0d5585 Author: Eli Zaretskii Date: Sat Aug 29 17:39:47 2015 +0300 Fix Python tests on MS-Windows * test/automated/python-tests.el (python-shell-calculate-command-1): Run python-shell-interpreter through shell-quote-argument before comparing with what python-shell-calculate-command returns. (python-shell-calculate-pythonpath-1) (python-shell-calculate-pythonpath-2) (python-shell-calculate-process-environment-2): Use path-separator instead of a literal ':'. (python-shell-calculate-exec-path-2) (python-shell-calculate-exec-path-3) (python-shell-calculate-exec-path-4) (python-shell-with-environment-1) (python-shell-with-environment-2): Run "/env/bin" through expand-file-name before comparing with exec-path. (Bug#21375) diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index 30b1b48..219f99e 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el @@ -2436,7 +2436,7 @@ Using `python-shell-interpreter' and (python-shell-interpreter-args "-B")) (should (string= (format "%s %s" - python-shell-interpreter + (shell-quote-argument python-shell-interpreter) python-shell-interpreter-args) (python-shell-calculate-command))))) @@ -2445,14 +2445,17 @@ Using `python-shell-interpreter' and (let ((process-environment '("PYTHONPATH=/path0")) (python-shell-extra-pythonpaths '("/path1" "/path2"))) (should (string= (python-shell-calculate-pythonpath) - "/path1:/path2:/path0")))) + (concat "/path1" path-separator + "/path2" path-separator "/path0"))))) (ert-deftest python-shell-calculate-pythonpath-2 () "Test existing paths are moved to front." - (let ((process-environment '("PYTHONPATH=/path0:/path1")) + (let ((process-environment + (list (concat "PYTHONPATH=/path0" path-separator "/path1"))) (python-shell-extra-pythonpaths '("/path1" "/path2"))) (should (string= (python-shell-calculate-pythonpath) - "/path1:/path2:/path0")))) + (concat "/path1" path-separator + "/path2" path-separator "/path0"))))) (ert-deftest python-shell-calculate-process-environment-1 () "Test `python-shell-process-environment' modification." @@ -2468,7 +2471,9 @@ Using `python-shell-interpreter' and (original-pythonpath (setenv "PYTHONPATH" "/path0")) (python-shell-extra-pythonpaths '("/path1" "/path2")) (process-environment (python-shell-calculate-process-environment))) - (should (equal (getenv "PYTHONPATH") "/path1:/path2:/path0")))) + (should (equal (getenv "PYTHONPATH") + (concat "/path1" path-separator + "/path2" path-separator "/path0"))))) (ert-deftest python-shell-calculate-process-environment-3 () "Test `python-shell-virtualenv-root' modification." @@ -2545,7 +2550,8 @@ Using `python-shell-interpreter' and (let* ((exec-path '("/path0")) (python-shell-virtualenv-root "/env") (new-exec-path (python-shell-calculate-exec-path))) - (should (equal new-exec-path '("/env/bin" "/path0"))))) + (should (equal new-exec-path + (list (expand-file-name "/env/bin") "/path0"))))) (ert-deftest python-shell-calculate-exec-path-3 () "Test complete `python-shell-virtualenv-root' modification." @@ -2553,7 +2559,9 @@ Using `python-shell-interpreter' and (python-shell-exec-path '("/path1" "/path2")) (python-shell-virtualenv-root "/env") (new-exec-path (python-shell-calculate-exec-path))) - (should (equal new-exec-path '("/env/bin" "/path1" "/path2" "/path0"))))) + (should (equal new-exec-path + (list (expand-file-name "/env/bin") + "/path1" "/path2" "/path0"))))) (ert-deftest python-shell-calculate-exec-path-4 () "Test complete `python-shell-virtualenv-root' with remote." @@ -2562,7 +2570,9 @@ Using `python-shell-interpreter' and (python-shell-exec-path '("/path1" "/path2")) (python-shell-virtualenv-root "/env") (new-exec-path (python-shell-calculate-exec-path))) - (should (equal new-exec-path '("/env/bin" "/path1" "/path2" "/path0"))))) + (should (equal new-exec-path + (list (expand-file-name "/env/bin") + "/path1" "/path2" "/path0"))))) (ert-deftest python-shell-calculate-exec-path-5 () "Test no side-effects on `exec-path'." @@ -2590,7 +2600,9 @@ Using `python-shell-interpreter' and (original-exec-path exec-path) (python-shell-virtualenv-root "/env")) (python-shell-with-environment - (should (equal exec-path '("/env/bin" "/path1" "/path2" "/path0"))) + (should (equal exec-path + (list (expand-file-name "/env/bin") + "/path1" "/path2" "/path0"))) (should (not (getenv "PYTHONHOME"))) (should (string= (getenv "VIRTUAL_ENV") "/env"))) (should (equal exec-path original-exec-path)))) @@ -2605,7 +2617,8 @@ Using `python-shell-interpreter' and (python-shell-virtualenv-root "/env")) (python-shell-with-environment (should (equal (python-shell-calculate-exec-path) - '("/env/bin" "/path1" "/path2" "/remote1" "/remote2"))) + (list (expand-file-name "/env/bin") + "/path1" "/path2" "/remote1" "/remote2"))) (let ((process-environment (python-shell-calculate-process-environment))) (should (not (getenv "PYTHONHOME"))) (should (string= (getenv "VIRTUAL_ENV") "/env"))