diff options
| author | Michael Albinus | 2016-11-20 16:29:47 +0100 |
|---|---|---|
| committer | Michael Albinus | 2016-11-20 16:29:47 +0100 |
| commit | 22946702b4296c0e42e4baf6221e205b52d05cbf (patch) | |
| tree | a81e506e5176351677c8f677e32cde6236d1b070 /lisp/eshell | |
| parent | 26c45889259682af0fbf05bccf7f084408860125 (diff) | |
| download | emacs-22946702b4296c0e42e4baf6221e205b52d05cbf.tar.gz emacs-22946702b4296c0e42e4baf6221e205b52d05cbf.zip | |
Add file-local-name
* doc/lispref/files.texi (Magic File Names): Add `file-local-name'.
(Unique File Names): Use it.
* etc/NEWS: Mention `file-local-name'.
* lisp/files.el (file-local-name): New defun.
(file-expand-wildcards):
* lisp/eshell/em-tramp.el (eshell/su, eshell/sudo):
* lisp/eshell/esh-ext.el (eshell-remote-command):
* lisp/eshell/esh-proc.el (eshell-gather-process-output):
* lisp/org/ob-core.el (org-babel-local-file-name):
* lisp/progmodes/gud.el (gud-common-init, gud-format-command):
* lisp/progmodes/python.el (python-shell-send-file):
* lisp/shell.el (shell):
* lisp/vc/ediff-diff.el (ediff-same-file-contents):
* lisp/vc/vc-git.el (vc-git-checkin): Use it.
Diffstat (limited to 'lisp/eshell')
| -rw-r--r-- | lisp/eshell/em-tramp.el | 6 | ||||
| -rw-r--r-- | lisp/eshell/esh-ext.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/esh-proc.el | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/lisp/eshell/em-tramp.el b/lisp/eshell/em-tramp.el index 9105c482b38..3eff20d1a1b 100644 --- a/lisp/eshell/em-tramp.el +++ b/lisp/eshell/em-tramp.el | |||
| @@ -72,8 +72,7 @@ Become another USER during a login session.") | |||
| 72 | (let ((user "root") | 72 | (let ((user "root") |
| 73 | (host (or (file-remote-p default-directory 'host) | 73 | (host (or (file-remote-p default-directory 'host) |
| 74 | "localhost")) | 74 | "localhost")) |
| 75 | (dir (or (file-remote-p default-directory 'localname) | 75 | (dir (file-local-name (expand-file-name default-directory))) |
| 76 | (expand-file-name default-directory))) | ||
| 77 | (prefix (file-remote-p default-directory))) | 76 | (prefix (file-remote-p default-directory))) |
| 78 | (dolist (arg args) | 77 | (dolist (arg args) |
| 79 | (if (string-equal arg "-") (setq login t) (setq user arg))) | 78 | (if (string-equal arg "-") (setq login t) (setq user arg))) |
| @@ -111,8 +110,7 @@ Execute a COMMAND as the superuser or another USER.") | |||
| 111 | (let ((user (or user "root")) | 110 | (let ((user (or user "root")) |
| 112 | (host (or (file-remote-p default-directory 'host) | 111 | (host (or (file-remote-p default-directory 'host) |
| 113 | "localhost")) | 112 | "localhost")) |
| 114 | (dir (or (file-remote-p default-directory 'localname) | 113 | (dir (file-local-name (expand-file-name default-directory))) |
| 115 | (expand-file-name default-directory))) | ||
| 116 | (prefix (file-remote-p default-directory))) | 114 | (prefix (file-remote-p default-directory))) |
| 117 | ;; `eshell-eval-using-options' reads options of COMMAND. | 115 | ;; `eshell-eval-using-options' reads options of COMMAND. |
| 118 | (while (and (stringp (car orig-args)) | 116 | (while (and (stringp (car orig-args)) |
diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el index ca62d0cf8b0..4d658cd718e 100644 --- a/lisp/eshell/esh-ext.el +++ b/lisp/eshell/esh-ext.el | |||
| @@ -203,7 +203,7 @@ all the output from the remote command, and sends it all at once, | |||
| 203 | causing the user to wonder if anything's really going on..." | 203 | causing the user to wonder if anything's really going on..." |
| 204 | (let ((outbuf (generate-new-buffer " *eshell remote output*")) | 204 | (let ((outbuf (generate-new-buffer " *eshell remote output*")) |
| 205 | (errbuf (generate-new-buffer " *eshell remote error*")) | 205 | (errbuf (generate-new-buffer " *eshell remote error*")) |
| 206 | (command (or (file-remote-p command 'localname) command)) | 206 | (command (file-local-name command)) |
| 207 | (exitcode 1)) | 207 | (exitcode 1)) |
| 208 | (unwind-protect | 208 | (unwind-protect |
| 209 | (progn | 209 | (progn |
diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index 8c6bad089c5..21680df765d 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el | |||
| @@ -279,7 +279,7 @@ See `eshell-needs-pipe'." | |||
| 279 | (let ((process-connection-type | 279 | (let ((process-connection-type |
| 280 | (unless (eshell-needs-pipe-p command) | 280 | (unless (eshell-needs-pipe-p command) |
| 281 | process-connection-type)) | 281 | process-connection-type)) |
| 282 | (command (or (file-remote-p command 'localname) command))) | 282 | (command (file-local-name command))) |
| 283 | (apply 'start-file-process | 283 | (apply 'start-file-process |
| 284 | (file-name-nondirectory command) nil | 284 | (file-name-nondirectory command) nil |
| 285 | ;; `start-process' can't deal with relative filenames. | 285 | ;; `start-process' can't deal with relative filenames. |