all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#24409: 25.1.1; dired-jump: Interactive call w/ prefix arg move to wrong file line
@ 2016-09-11  4:33 Tino Calancha
  2016-09-11  4:42 ` Noam Postavsky
  2016-09-11 15:36 ` Eli Zaretskii
  0 siblings, 2 replies; 11+ messages in thread
From: Tino Calancha @ 2016-09-11  4:33 UTC (permalink / raw)
  To: 24409


emacs -Q -eval "(require 'dired-x)"

;; Assumed you have Emacs source code in `source-directory'.
;; Following should visit `lisp' on Dired and set point on `simple.el'.
M-: (find-file (expand-file-name (concat "lisp/dired-x.el") 
source-directory)) RET
C-u C-x C-j simple.el RET

*) The first patch just fix this bug.
*) The second patch makes to work following non-interactive call:
(dired-jump nil (abbreviate-file-name
                  (expand-file-name (concat "lisp/dired-x.el") 
source-directory)))
;; i.e., accepts an UNIX file-name as: "~/foo/bar

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
From e7a5a0534ac3f2bb624acb855ddbdbb8cd04c7a3 Mon Sep 17 00:00:00 2001
From: Tino Calancha <tino.calancha@gmail.com>
Date: Sun, 11 Sep 2016 13:14:28 +0900
Subject: [PATCH] dired-jump: Expand file-name after read-file-name call

Fix Bug#24409.
* lisp/dired-x.el (dired-jump):
---
  lisp/dired-x.el | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 088ca81..7c65a2c 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -413,11 +413,12 @@ dired-jump
  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, move to FILE-NAME line in Dired.
+Interactively with prefix argument, read FILE-NAME."
    (interactive
     (list nil (and current-prefix-arg
-                  (read-file-name "Jump to Dired file: "))))
+                  (expand-file-name
+                   (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))
-- 
2.9.3

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
From 713d23fd2a0c798df265e29a21d1bd04f483f1b0 Mon Sep 17 00:00:00 2001
From: Tino Calancha <tino.calancha@gmail.com>
Date: Sun, 11 Sep 2016 13:15:26 +0900
Subject: [PATCH] dired-jump: Make sure file-name is expanded

* lisp/dired-x.el (dired-jump): Use expand-file-name on FILE-NAME
before call dired-goto-file (Bug#24409).
---
  lisp/dired-x.el | 10 ++++++----
  1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 088ca81..4470a2c 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -413,14 +413,16 @@ dired-jump
  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, move to FILE-NAME line in Dired.
+Interactively with prefix argument, read FILE-NAME."
    (interactive
     (list nil (and current-prefix-arg
-                  (read-file-name "Jump to Dired file: "))))
+                  (expand-file-name
+                   (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))
+    (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
-- 
2.9.3

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

In GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.21.5)
  of 2016-09-10
Repository revision: 0bbdeed10f37d4ce203e1f5feb0cd7c4b5eeec72






^ permalink raw reply related	[flat|nested] 11+ messages in thread

* bug#24409: 25.1.1; dired-jump: Interactive call w/ prefix arg move to wrong file line
  2016-09-11  4:33 bug#24409: 25.1.1; dired-jump: Interactive call w/ prefix arg move to wrong file line Tino Calancha
@ 2016-09-11  4:42 ` Noam Postavsky
  2016-09-11  4:50   ` Tino Calancha
  2016-09-11 15:36 ` Eli Zaretskii
  1 sibling, 1 reply; 11+ messages in thread
From: Noam Postavsky @ 2016-09-11  4:42 UTC (permalink / raw)
  To: Tino Calancha; +Cc: 24409

On Sun, Sep 11, 2016 at 12:33 AM, Tino Calancha <tino.calancha@gmail.com> wrote:
>    (interactive
>     (list nil (and current-prefix-arg
> -                  (read-file-name "Jump to Dired file: "))))
> +                  (expand-file-name
> +                   (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))
> +    (let* ((file (or (and file-name (expand-file-name file-name))
> +                     buffer-file-name))

Doesn't the second `expand-file-name` call make the first one redundant?





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#24409: 25.1.1; dired-jump: Interactive call w/ prefix arg move to wrong file line
  2016-09-11  4:42 ` Noam Postavsky
@ 2016-09-11  4:50   ` Tino Calancha
  0 siblings, 0 replies; 11+ messages in thread
From: Tino Calancha @ 2016-09-11  4:50 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 24409, Tino Calancha



On Sun, 11 Sep 2016, Noam Postavsky wrote:

> On Sun, Sep 11, 2016 at 12:33 AM, Tino Calancha <tino.calancha@gmail.com> wrote:
>>    (interactive
>>     (list nil (and current-prefix-arg
>> -                  (read-file-name "Jump to Dired file: "))))
>> +                  (expand-file-name
>> +                   (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))
>> +    (let* ((file (or (and file-name (expand-file-name file-name))
>> +                     buffer-file-name))
>
> Doesn't the second `expand-file-name` call make the first one redundant?
Absolutely.  Thank you!
Following is the corrected second patch:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
From f4b0e30a79e4d2c959931d9baec7ce72cd67c935 Mon Sep 17 00:00:00 2001
From: Tino Calancha <tino.calancha@gmail.com>
Date: Sun, 11 Sep 2016 13:47:50 +0900
Subject: [PATCH] dired-jump: Make sure file-name is expanded

* lisp/dired-x.el (dired-jump): Use expand-file-name on FILE-NAME
before call dired-goto-file (Bug#24409).
---
  lisp/dired-x.el | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 088ca81..2ab9562 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -413,14 +413,15 @@ dired-jump
  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, move to FILE-NAME 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))
+    (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
-- 
2.9.3

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

In GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.21.5)
  of 2016-09-10
Repository revision: 0bbdeed10f37d4ce203e1f5feb0cd7c4b5eeec72






^ permalink raw reply related	[flat|nested] 11+ messages in thread

* bug#24409: 25.1.1; dired-jump: Interactive call w/ prefix arg move to wrong file line
  2016-09-11  4:33 bug#24409: 25.1.1; dired-jump: Interactive call w/ prefix arg move to wrong file line Tino Calancha
  2016-09-11  4:42 ` Noam Postavsky
@ 2016-09-11 15:36 ` Eli Zaretskii
  2016-09-11 17:03   ` Tino Calancha
  1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2016-09-11 15:36 UTC (permalink / raw)
  To: Tino Calancha; +Cc: 24409

> From: Tino Calancha <tino.calancha@gmail.com>
> Date: Sun, 11 Sep 2016 13:33:04 +0900 (JST)
> 
> 
> emacs -Q -eval "(require 'dired-x)"
> 
> ;; Assumed you have Emacs source code in `source-directory'.
> ;; Following should visit `lisp' on Dired and set point on `simple.el'.
> M-: (find-file (expand-file-name (concat "lisp/dired-x.el") 
> source-directory)) RET
> C-u C-x C-j simple.el RET
> 
> *) The first patch just fix this bug.

Thanks.  A few nits:

Please be sure to explain the need for the expand-file-name call
either in a comment or in the log message.

Also, you fixed the do string (thanks!), but didn't mention that in
the log message.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#24409: 25.1.1; dired-jump: Interactive call w/ prefix arg move to wrong file line
  2016-09-11 15:36 ` Eli Zaretskii
@ 2016-09-11 17:03   ` Tino Calancha
  2016-09-11 17:16     ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Tino Calancha @ 2016-09-11 17:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 24409, Tino Calancha



On Sun, 11 Sep 2016, Eli Zaretskii wrote:

> Thanks.  A few nits:
>
> Please be sure to explain the need for the expand-file-name call
> either in a comment or in the log message.

> Also, you fixed the do string (thanks!), but didn't mention that in
> the log message.
*) Please, take a look in the new patch below with more verbose log 
message/comments.
*) Where should go the fix: emacs-25 branch or master?

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
From fcb693f38657c2e47e6bb3116a781bebaea1d3ea Mon Sep 17 00:00:00 2001
From: Tino Calancha <tino.calancha@gmail.com>
Date: Mon, 12 Sep 2016 01:53:44 +0900
Subject: [PATCH] dired-jump: Expand file-name before dired-goto-file call

* lisp/dired-x.el (dired-jump): Use expand-file-name on FILE-NAME
before dired-goto-file call: this is mandatory in interactive
calls (Bug#24409); in non-interactive calls is also desirable
in order to accept an abbreviated FILE-NAME as  ~/dir/file.
Clarify in doc string the meaning of arg FILE-NAME.
---
  lisp/dired-x.el | 12 +++++++++---
  1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 088ca81..2a9bd72 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -413,14 +413,20 @@ dired-jump
  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, move to FILE-NAME 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 calling `dired-goto-file':
+    ;; This is required in interactive calls because the return value
+    ;; of `read-file-name' is not expanded; it also helps in
+    ;; non-interactive calls, where file-name could be an abbreviated
+    ;; file name as ~/dir/file (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
-- 
2.9.3

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

In GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.21.5)
  of 2016-09-12
Repository revision: 0bbdeed10f37d4ce203e1f5feb0cd7c4b5eeec72






^ permalink raw reply related	[flat|nested] 11+ messages in thread

* bug#24409: 25.1.1; dired-jump: Interactive call w/ prefix arg move to wrong file line
  2016-09-11 17:03   ` Tino Calancha
@ 2016-09-11 17:16     ` Eli Zaretskii
  2016-09-12  4:37       ` Tino Calancha
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2016-09-11 17:16 UTC (permalink / raw)
  To: Tino Calancha; +Cc: 24409

> From: Tino Calancha <tino.calancha@gmail.com>
> Date: Mon, 12 Sep 2016 02:03:14 +0900 (JST)
> cc: Tino Calancha <tino.calancha@gmail.com>, 24409@debbugs.gnu.org
> 
> *) Please, take a look in the new patch below with more verbose log 
> message/comments.

Thanks, see a follow-up comment below.

> *) Where should go the fix: emacs-25 branch or master?

Master, of course.

> -    (let* ((file (or file-name buffer-file-name))
> +    ;; Expand file-name before calling `dired-goto-file':
> +    ;; This is required in interactive calls because the return value
> +    ;; of `read-file-name' is not expanded; it also helps in
> +    ;; non-interactive calls, where file-name could be an abbreviated
> +    ;; file name as ~/dir/file (Bug#24409).
> +    (let* ((file (or (and file-name (expand-file-name file-name))
> +                     buffer-file-name))

I think a better comment would be to say that dired-goto-file requires
its argument to be an absolute file name, and the result of
read-file-name could be an abbreviated file name.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#24409: 25.1.1; dired-jump: Interactive call w/ prefix arg move to wrong file line
  2016-09-11 17:16     ` Eli Zaretskii
@ 2016-09-12  4:37       ` Tino Calancha
  2016-09-12 16:53         ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Tino Calancha @ 2016-09-12  4:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 24409, Tino Calancha


On Sun, 11 Sep 2016, Eli Zaretskii wrote:

> I think a better comment would be to say that dired-goto-file requires
> its argument to be an absolute file name, and the result of
> read-file-name could be an abbreviated file name.
Thank you.  I rewrote the comment/log message with your suggestion.
I included the word canonical: an abbreviated file name could be
an absolute file name, for instance ~/foo, but dired-goto-file,
in addition to absolute file name, requires the substitution of '~/'.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
From 3e58d4987590dbdb54d08fd6be201bd0cad4b804 Mon Sep 17 00:00:00 2001
From: Tino Calancha <tino.calancha@gmail.com>
Date: Mon, 12 Sep 2016 13:16:32 +0900
Subject: [PATCH] dired-jump: Expand file-name before dired-goto-file call

Command dired-goto-file requires its argument to be an absolute
canonical file name.  Interactively FILE-NAME is read with
read-file-name, which could return an abbreviated file name, i.e.,
non-canonical (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..90420ad 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -413,14 +413,19 @@ dired-jump
  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, move to FILE-NAME 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
+    ;; canonical file name; the result of `read-file-name' could
+    ;; be an abbreviated file name, i.e., non-canonical (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
-- 
2.9.3

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
In GNU Emacs 25.1.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.21.5)
  of 2016-09-12 built on calancha-pc
Repository revision: 367f8568bc9e759ebdfb423648891efa0346456b







^ permalink raw reply related	[flat|nested] 11+ messages in thread

* bug#24409: 25.1.1; dired-jump: Interactive call w/ prefix arg move to wrong file line
  2016-09-12  4:37       ` Tino Calancha
@ 2016-09-12 16:53         ` Eli Zaretskii
  2016-09-13  7:04           ` Tino Calancha
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2016-09-12 16:53 UTC (permalink / raw)
  To: Tino Calancha; +Cc: 24409

> From: Tino Calancha <tino.calancha@gmail.com>
> Date: Mon, 12 Sep 2016 13:37:14 +0900 (JST)
> cc: Tino Calancha <tino.calancha@gmail.com>, 24409@debbugs.gnu.org
> 
> > I think a better comment would be to say that dired-goto-file requires
> > its argument to be an absolute file name, and the result of
> > read-file-name could be an abbreviated file name.
> Thank you.  I rewrote the comment/log message with your suggestion.
> I included the word canonical: an abbreviated file name could be
> an absolute file name, for instance ~/foo, but dired-goto-file,
> in addition to absolute file name, requires the substitution of '~/'.

We don't have a notion of a "canonical" file name in Emacs, so I'm not
sure this helps.  OTOH, "absolute file name" is quite clear, and I
don't think people will be confused by the fact that ~/foo returns
non-nil from file-name-absolute-p.

> +When FILE-NAME is non-nil, move to FILE-NAME line in Dired.

  "When FILE-NAME is non-nil, jump to its line in Dired."

(Try to avoid saying the same thing twice too close to one another.)

Thanks.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#24409: 25.1.1; dired-jump: Interactive call w/ prefix arg move to wrong file line
  2016-09-12 16:53         ` Eli Zaretskii
@ 2016-09-13  7:04           ` Tino Calancha
  2016-09-13 14:37             ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Tino Calancha @ 2016-09-13  7:04 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 24409, Tino Calancha



On Mon, 12 Sep 2016, Eli Zaretskii wrote:

>> From: Tino Calancha <tino.calancha@gmail.com>
>> Date: Mon, 12 Sep 2016 13:37:14 +0900 (JST)
>> cc: Tino Calancha <tino.calancha@gmail.com>, 24409@debbugs.gnu.org
>>
>>> I think a better comment would be to say that dired-goto-file requires
>>> its argument to be an absolute file name, and the result of
>>> read-file-name could be an abbreviated file name.
>> Thank you.  I rewrote the comment/log message with your suggestion.
>> I included the word canonical: an abbreviated file name could be
>> an absolute file name, for instance ~/foo, but dired-goto-file,
>> in addition to absolute file name, requires the substitution of '~/'.
>
> We don't have a notion of a "canonical" file name in Emacs, so I'm not
> sure this helps.  OTOH, "absolute file name" is quite clear, and I
> don't think people will be confused by the fact that ~/foo returns
> non-nil from file-name-absolute-p.
Ok, i will not use the word canonical.
>> +When FILE-NAME is non-nil, move to FILE-NAME line in Dired.
>
>  "When FILE-NAME is non-nil, jump to its line in Dired."
> (Try to avoid saying the same thing twice too close to one another.)
Added.  Thank you very much.

Once you give me the LGTM i will apply the following corrected patch:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
From e1541dd78cb5bf81247bd4025a603cef81f3a3cb Mon Sep 17 00:00:00 2001
From: Tino Calancha <tino.calancha@gmail.com>
Date: Tue, 13 Sep 2016 15:59:45 +0900
Subject: [PATCH] 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 @@ dired-jump
  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
-- 
2.9.3

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.21.5)
  of 2016-09-13
Repository revision: 367f8568bc9e759ebdfb423648891efa0346456b







^ permalink raw reply related	[flat|nested] 11+ messages in thread

* bug#24409: 25.1.1; dired-jump: Interactive call w/ prefix arg move to wrong file line
  2016-09-13  7:04           ` Tino Calancha
@ 2016-09-13 14:37             ` Eli Zaretskii
  2016-09-13 15:09               ` Tino Calancha
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2016-09-13 14:37 UTC (permalink / raw)
  To: Tino Calancha; +Cc: 24409

> From: Tino Calancha <tino.calancha@gmail.com>
> Date: Tue, 13 Sep 2016 16:04:05 +0900 (JST)
> cc: Tino Calancha <tino.calancha@gmail.com>, 24409@debbugs.gnu.org
> 
> Once you give me the LGTM i will apply the following corrected patch:

LGTM, thank you.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#24409: 25.1.1; dired-jump: Interactive call w/ prefix arg move to wrong file line
  2016-09-13 14:37             ` Eli Zaretskii
@ 2016-09-13 15:09               ` Tino Calancha
  0 siblings, 0 replies; 11+ messages in thread
From: Tino Calancha @ 2016-09-13 15:09 UTC (permalink / raw)
  To: 24409-done



On Tue, 13 Sep 2016, Eli Zaretskii wrote:

>> From: Tino Calancha <tino.calancha@gmail.com>
>> Date: Tue, 13 Sep 2016 16:04:05 +0900 (JST)
>> cc: Tino Calancha <tino.calancha@gmail.com>, 24409@debbugs.gnu.org
>>
>> Once you give me the LGTM i will apply the following corrected patch:
>
> LGTM, thank you.
Thank you.  Pushed fix to master branch as commit 3988ceaa





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-09-13 15:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-11  4:33 bug#24409: 25.1.1; dired-jump: Interactive call w/ prefix arg move to wrong file line Tino Calancha
2016-09-11  4:42 ` Noam Postavsky
2016-09-11  4:50   ` Tino Calancha
2016-09-11 15:36 ` Eli Zaretskii
2016-09-11 17:03   ` Tino Calancha
2016-09-11 17:16     ` Eli Zaretskii
2016-09-12  4:37       ` Tino Calancha
2016-09-12 16:53         ` Eli Zaretskii
2016-09-13  7:04           ` Tino Calancha
2016-09-13 14:37             ` Eli Zaretskii
2016-09-13 15:09               ` Tino Calancha

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.