diff options
| author | Michael Albinus | 2016-08-07 13:57:23 +0200 |
|---|---|---|
| committer | Michael Albinus | 2016-08-07 13:57:23 +0200 |
| commit | 2c0506173d92dd9d6de409a045668c6b5cf1fcef (patch) | |
| tree | 2ea1931603ecabe4b544600029b52215cc75f7f7 /lisp/org | |
| parent | a798547727081de5b99e1036783084fcb9afec75 (diff) | |
| download | emacs-2c0506173d92dd9d6de409a045668c6b5cf1fcef.tar.gz emacs-2c0506173d92dd9d6de409a045668c6b5cf1fcef.zip | |
Add `make-nearby-temp-file' and `temporary-file-directory'
* doc/lispref/files.texi (Unique File Names):
Introduce `make-nearby-temp-file' and `temporary-file-directory'.
(Magic File Names): Mention `make-nearby-temp-file' and
`temporary-file-directory'.
* etc/NEWS (provided): Mention `make-nearby-temp-file' and
`temporary-file-directory'.
* lisp/files.el (mounted-file-systems): New defcustom.
(temporary-file-directory, make-nearby-temp-file): New defuns.
(normal-backup-enable-predicate): Fix docstring.
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
<make-nearby-temp-file, temporary-file-directory>: Add handler.
* lisp/net/tramp.el (tramp-file-name-for-operation):
Add `make-nearby-temp-file' and `temporary-file-directory'.
(tramp-get-remote-tmpdir): Remove compatibility code.
(tramp-handle-temporary-file-directory)
(tramp-handle-make-nearby-temp-file): New defuns.
* lisp/org/ob-core.el (org-babel-local-file-name):
* lisp/progmodes/gud.el (gud-common-init):
* lisp/vc/vc-hooks.el (vc-user-login-name): Use `file-remote-p'.
* lisp/vc/vc-git.el (vc-git-checkin): Handle remote log message.
* test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name):
Check `tramp--test-enabled'.
(tramp-test18-file-attributes): Add tests for
`file-ownership-preserved-p'.
(tramp-test27-start-file-process, tramp-test28-shell-command):
Reduce timeouts in `accept-process-output'.
(tramp-test--shell-command-to-string-asynchronously): Add timeout.
(tramp-test29-environment-variables): Remove additional sleep calls.
(tramp-test32-make-nearby-temp-file): New test.
(tramp--test-special-characters, tramp--test-utf8): Adapt docstring.
(tramp-test33-special-characters)
(tramp-test33-special-characters-with-stat)
(tramp-test33-special-characters-with-perl)
(tramp-test33-special-characters-with-ls, tramp-test34-utf8)
(tramp-test34-utf8-with-stat, tramp-test34-utf8-with-perl)
(tramp-test34-utf8-with-ls)
(tramp-test35-asynchronous-requests)
(tramp-test36-recursive-load, tramp-test37-unload): Rename.
(tramp--test-ftp-p): Simplify check.
(tramp--test-sh-p): New defun.
(tramp-test20-file-modes, tramp-test22-file-times)
(tramp-test26-process-file, tramp-test27-start-file-process)
(tramp-test28-shell-command)
(tramp-test29-environment-variables)
(tramp-test30-vc-registered)
(tramp-test33-special-characters-with-stat)
(tramp-test33-special-characters-with-perl)
(tramp-test33-special-characters-with-ls)
(tramp-test34-utf8-with-stat, tramp-test34-utf8-with-perl)
(tramp-test34-utf8-with-ls)
(tramp-test35-asynchronous-requests): Use it.
Diffstat (limited to 'lisp/org')
| -rw-r--r-- | lisp/org/ob-core.el | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el index b7e8c237256..e3d778f73b4 100644 --- a/lisp/org/ob-core.el +++ b/lisp/org/ob-core.el | |||
| @@ -43,11 +43,6 @@ | |||
| 43 | (declare-function org-mark-ring-push "org" (&optional pos buffer)) | 43 | (declare-function org-mark-ring-push "org" (&optional pos buffer)) |
| 44 | (declare-function tramp-compat-make-temp-file "tramp-compat" | 44 | (declare-function tramp-compat-make-temp-file "tramp-compat" |
| 45 | (filename &optional dir-flag)) | 45 | (filename &optional dir-flag)) |
| 46 | (declare-function tramp-dissect-file-name "tramp" (name &optional nodefault)) | ||
| 47 | (declare-function tramp-file-name-user "tramp" (vec)) | ||
| 48 | (declare-function tramp-file-name-host "tramp" (vec)) | ||
| 49 | (declare-function with-parsed-tramp-file-name "tramp" (filename var &rest body) | ||
| 50 | t) | ||
| 51 | (declare-function org-icompleting-read "org" (&rest args)) | 46 | (declare-function org-icompleting-read "org" (&rest args)) |
| 52 | (declare-function org-edit-src-code "org-src" | 47 | (declare-function org-edit-src-code "org-src" |
| 53 | (&optional context code edit-buffer-name)) | 48 | (&optional context code edit-buffer-name)) |
| @@ -2670,7 +2665,7 @@ of the string." | |||
| 2670 | (start end program &optional delete buffer display &rest args) | 2665 | (start end program &optional delete buffer display &rest args) |
| 2671 | "Use Tramp to handle `call-process-region'. | 2666 | "Use Tramp to handle `call-process-region'. |
| 2672 | Fixes a bug in `tramp-handle-call-process-region'." | 2667 | Fixes a bug in `tramp-handle-call-process-region'." |
| 2673 | (if (and (featurep 'tramp) (file-remote-p default-directory)) | 2668 | (if (file-remote-p default-directory) |
| 2674 | (let ((tmpfile (tramp-compat-make-temp-file ""))) | 2669 | (let ((tmpfile (tramp-compat-make-temp-file ""))) |
| 2675 | (write-region start end tmpfile) | 2670 | (write-region start end tmpfile) |
| 2676 | (when delete (delete-region start end)) | 2671 | (when delete (delete-region start end)) |
| @@ -2687,11 +2682,7 @@ Fixes a bug in `tramp-handle-call-process-region'." | |||
| 2687 | 2682 | ||
| 2688 | (defun org-babel-local-file-name (file) | 2683 | (defun org-babel-local-file-name (file) |
| 2689 | "Return the local name component of FILE." | 2684 | "Return the local name component of FILE." |
| 2690 | (if (file-remote-p file) | 2685 | (or (file-remote-p file 'localname) file)) |
| 2691 | (let (localname) | ||
| 2692 | (with-parsed-tramp-file-name file nil | ||
| 2693 | localname)) | ||
| 2694 | file)) | ||
| 2695 | 2686 | ||
| 2696 | (defun org-babel-process-file-name (name &optional no-quote-p) | 2687 | (defun org-babel-process-file-name (name &optional no-quote-p) |
| 2697 | "Prepare NAME to be used in an external process. | 2688 | "Prepare NAME to be used in an external process. |