# HG changeset patch # User Tassilo Horn # Date 1208170923 0 # Node ID 747b5b0190df0564d5324154098f9227d759d2f8 # Parent b3464963df96b3b752b9d062c585e995b1fed667 (doc-view-start-process): Don't set default-directory to "~/" if the current value is valid. This broke PS files that run other files in the same directory. diff -r b3464963df96 -r 747b5b0190df lisp/doc-view.el --- a/lisp/doc-view.el Mon Apr 14 10:47:12 2008 +0000 +++ b/lisp/doc-view.el Mon Apr 14 11:02:03 2008 +0000 @@ -559,9 +559,11 @@ (funcall (process-get proc 'callback)))))) (defun doc-view-start-process (name program args callback) - ;; Make sure the process is started in an existing directory, - ;; (rather than some file-name-handler-managed dir, for example). - (let* ((default-directory (expand-file-name "~/")) + ;; Make sure the process is started in an existing directory, (rather than + ;; some file-name-handler-managed dir, for example). + (let* ((default-directory (if (file-readable-p default-directory) + default-directory + (expand-file-name "~/"))) (proc (apply 'start-process name doc-view-conversion-buffer program args))) (push proc doc-view-current-converter-processes) @@ -585,7 +587,7 @@ (list (format "-r%d" (round doc-view-resolution)) (concat "-sOutputFile=" png) pdf-ps)) - (lambda () + (lambda () (when doc-view-current-timer (cancel-timer doc-view-current-timer) (setq doc-view-current-timer nil))