[ESS] Trailing slash deleted from find-file prompt

Brendan.Halpin Brend@n@H@|p|n @end|ng |rom u|@|e
Mon Mar 8 20:36:14 CET 2021


I can fix this by changing ess-synchronize-dirs in ess-inf.el:

(defun ess-synchronize-dirs ()
  "Set Emacs' current directory to be the same as the subprocess directory.
To be used in `ess-idle-timer-functions'."
  (when (and ess-can-eval-in-background
             ess-getwd-command
             (inferior-ess-available-p))
    (ess-when-new-input last-sync-dirs
      (ess-if-verbose-write "\n(ess-synchronize-dirs)\n")
      (let ((lpath (car (ess-get-words-from-vector ess-getwd-command))))
        (setq default-directory
              (ess--derive-connection-path default-directory lpath)))
      default-directory)))

Change
      (let ((lpath (car (ess-get-words-from-vector ess-getwd-command))))
to
      (let ((lpath (file-name-as-directory (car (ess-get-words-from-vector ess-getwd-command)))))

Brendan
-- 
Brendan Halpin, Department of Sociology, University of Limerick, Ireland
Tel: w +353-61-213147
Room F1-007 x 3147
http://teaching.sociology.ul.ie/bhalpin/wordpress
twitter:@BrendanTHalpin
Papers online at: http://teaching.sociology.ul.ie/bhalpin/publications.html
ULSociology on Facebook: Sociology using Limerick twitter:@ULSociology



More information about the ESS-help mailing list