I have found two other code modifications that fix the problem. (define-derived-mode tex-shell shell-mode "TeX-Shell" ;; line 2000 (setq-local compilation-error-regexp-alist tex-error-regexp-alist) (setq-local default-directory "") ;; My addition; most anything(?) inside quotes is ok (compilation-shell-minor-mode t)) or (defun tex-send-tex-command (cmd &optional dir) ;; line 2484 (unless (or (equal dir (let ((buf)) ;; removed (tex-shell-buf-no-error) ;; buf is nil (and buf (with-current-buffer buf default-directory)))) Among all the proposals (& there are certainly more), I can *not* choose because I do not understand all the conditions that must be satisfied for proper functioning of the entire module. My choices work for my restricted situations. That is probably not enough for more general cases. RDS