[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 3988cea: dired-jump: Expand file-name before dired-
From: |
Tino Calancha |
Subject: |
[Emacs-diffs] master 3988cea: dired-jump: Expand file-name before dired-goto-file call |
Date: |
Tue, 13 Sep 2016 15:05:27 +0000 (UTC) |
branch: master
commit 3988ceaa1cfa2022443906750cbb30127a1e161f
Author: Tino Calancha <address@hidden>
Commit: Tino Calancha <address@hidden>
dired-jump: Expand file-name before dired-goto-file call
Command dired-goto-file requires its argument to be an absolute
file name. Interactively FILE-NAME is read with read-file-name,
which could return an abbreviated file name (Bug#24409).
* lisp/dired-x.el (dired-jump): Use expand-file-name on FILE-NAME.
Clarify in doc string the meaning of arg FILE-NAME.
---
lisp/dired-x.el | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index be762e6..41c2256 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -413,14 +413,19 @@ If in Dired already, pop up a level and goto old
directory's line.
In case the proper Dired file line cannot be found, refresh the dired
buffer and try again.
When OTHER-WINDOW is non-nil, jump to Dired buffer in other window.
-Interactively with prefix argument, read FILE-NAME and
-move to its line in dired."
+When FILE-NAME is non-nil, jump to its line in Dired.
+Interactively with prefix argument, read FILE-NAME."
(interactive
(list nil (and current-prefix-arg
(read-file-name "Jump to Dired file: "))))
(if (bound-and-true-p tar-subfile-mode)
(switch-to-buffer tar-superior-buffer)
- (let* ((file (or file-name buffer-file-name))
+ ;; Expand file-name before `dired-goto-file' call:
+ ;; `dired-goto-file' requires its argument to be an absolute
+ ;; file name; the result of `read-file-name' could be
+ ;; an abbreviated file name (Bug#24409).
+ (let* ((file (or (and file-name (expand-file-name file-name))
+ buffer-file-name))
(dir (if file (file-name-directory file) default-directory)))
(if (and (eq major-mode 'dired-mode) (null file-name))
(progn
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 3988cea: dired-jump: Expand file-name before dired-goto-file call,
Tino Calancha <=