Subject: bug#10124: 24.0.91; Choosing a remote file, when the current directory is remote too

From: Michael Albinus <[email-masked]>
Date: Tue, 29 Nov 2011 15:23:46 +0100

Dani Moncayo <[email-masked]> writes:

>>> It still fails :(
>>
>> Sure? Have you tried to type RET, opening that file?
>
> Yes, I'm afraid.  Typing RET makes Emacs to create a *Completions*
> Buffer (as in the OP). As you can see in the screenshot, only the
> first "/" is digested by Emacs.

Ah, you are right. Try this one instead:

--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/emacs/lisp/vc/diff-mode.el.~106544~	2011-11-29 15:20:32.520298416 +0100
--- /home/albinus/src/emacs/lisp/vc/diff-mode.el	2011-11-29 15:19:24.575961506 +0100
***************
*** 815,823 ****
  	    (diff-find-file-name old noprompt (match-string 1)))
         ;; if all else fails, ask the user
         (unless noprompt
!          (let ((file (read-file-name (format "Use file %s: "
!                                              (or (first fs) ""))
!                                      nil (first fs) t (first fs))))
             (set (make-local-variable 'diff-remembered-files-alist)
                  (cons (cons fs file) diff-remembered-files-alist))
             file))))))
--- 815,825 ----
  	    (diff-find-file-name old noprompt (match-string 1)))
         ;; if all else fails, ask the user
         (unless noprompt
!          (let ((file (expand-file-name (or (first fs) ""))))
! 	   (setq file
! 		 (read-file-name (format "Use file %s: " file)
! 				 (file-name-directory file) file t
! 				 (file-name-nondirectory file)))
             (set (make-local-variable 'diff-remembered-files-alist)
                  (cons (cons fs file) diff-remembered-files-alist))
             file))))))
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.