@@ -588,6 +588,9 @@ will be prompted to enter arguments interactively."
588588 inferior-R-args " " ; add space just in case
589589 start-args))
590590 (debug (string-match-p " -d \\ | --debugger=" r-start-args))
591+ (project-find-functions (if (memq 'ess-r-project project-find-functions)
592+ project-find-functions
593+ (cons 'ess-r-project project-find-functions)))
591594 use-dialog-box)
592595 (when (or ess-microsoft-p
593596 (eq system-type 'cygwin ))
@@ -618,21 +621,6 @@ will be prompted to enter arguments interactively."
618621 ; ; FIXME: Current ob-R expects current buffer set to process buffer
619622 (set-buffer (run-ess-r start-args)))
620623
621- (defun inferior-ess-r--adjust-startup-directory (dir dialect )
622- " Adjust startup directory DIR if DIALECT is R.
623- If in a package project, prefer the tests directory but only if
624- the package directory was selected in the first place."
625- (if (string= dialect " R" )
626- (let* ((project-dir (cdr (ess-r-package-project)))
627- (tests-dir (expand-file-name (file-name-as-directory " tests" )
628- project-dir)))
629- (if (and project-dir
630- (string= project-dir dir)
631- (string= default-directory tests-dir))
632- tests-dir
633- dir))
634- dir))
635-
636624(defun inferior-ess-r--init-callback (_proc _name )
637625 (R-initialize-on-start))
638626
@@ -870,7 +858,7 @@ efficiency reasons."
870858 (file-exists-p (expand-file-name " DESCRIPTION" dir))
871859 (let ((nm (file-name-nondirectory (directory-file-name dir))))
872860 (file-exists-p (expand-file-name (concat nm " .Rproj" ) dir))))))))
873- (when dir
861+ (when dir
874862 (let ((dir (directory-file-name dir)))
875863 (unless (member dir (list " ~" (getenv " HOME" )))
876864 (list :name (file-name-nondirectory dir)
0 commit comments