all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Ido and hosts named with a single letter.
@ 2006-11-26 20:00 Michaël Cadilhac
  2006-11-27  9:43 ` Kim F. Storm
  0 siblings, 1 reply; 9+ messages in thread
From: Michaël Cadilhac @ 2006-11-26 20:00 UTC (permalink / raw)



[-- Attachment #1.1.1: Type: text/plain, Size: 314 bytes --]


Try this :
emacs -Q
M-x ido-mode
C-x C-f /tmp

Everything's okey.
Now, do the same but before, add a line with a `w' in your known hosts:
echo w >> ~/.ssh/known_hosts

It will result in the error « Login failed ». Disgracious.

I propose the following patch, which makes ido allow such host names.


[-- Attachment #1.1.2: ido.patch --]
[-- Type: text/x-patch, Size: 3327 bytes --]

*** lisp/ido.el.~1.110.~	2006-10-16 14:42:24.000000000 +0200
--- lisp/ido.el	2006-11-24 18:31:06.000000000 +0100
***************
*** 2068,2074 ****
  	      (ido-set-current-directory (file-name-directory (substring ido-current-directory 0 -1))))
  	  (setq ido-set-default-item t))
  
! 	 ((and (string-match (if ido-enable-tramp-completion "..[:@]\\'" "..:\\'") ido-selected)
  	       (ido-is-root-directory)) ;; Ange-ftp or Tramp
  	  (ido-set-current-directory ido-current-directory ido-selected)
  	  (ido-trace "tramp prefix" ido-selected)
--- 2068,2074 ----
  	      (ido-set-current-directory (file-name-directory (substring ido-current-directory 0 -1))))
  	  (setq ido-set-default-item t))
  
! 	 ((and (string-match (if ido-enable-tramp-completion ".[:@]\\'" ".:\\'") ido-selected)
  	       (ido-is-root-directory)) ;; Ange-ftp or Tramp
  	  (ido-set-current-directory ido-current-directory ido-selected)
  	  (ido-trace "tramp prefix" ido-selected)
***************
*** 2426,2432 ****
       ((and (= 1 (length ido-matches))
  	   (not (and ido-enable-tramp-completion
  		     (string-equal ido-current-directory "/")
! 		     (string-match "..[@:]\\'" (ido-name (car ido-matches))))))
        ;; only one choice, so select it.
        (if (not ido-confirm-unique-completion)
  	  (exit-minibuffer)
--- 2426,2432 ----
       ((and (= 1 (length ido-matches))
  	   (not (and ido-enable-tramp-completion
  		     (string-equal ido-current-directory "/")
! 		     (string-match ".[@:]\\'" (ido-name (car ido-matches))))))
        ;; only one choice, so select it.
        (if (not ido-confirm-unique-completion)
  	  (exit-minibuffer)
***************
*** 3433,3439 ****
        (let ((default-directory ido-current-directory))
  	(ido-to-end ;; move ftp hosts and visited files to end
  	 (delq nil (mapcar
! 		    (lambda (x) (if (or (string-match "..:\\'" x)
  					(and (not (ido-final-slash x))
  					     (get-file-buffer x))) x))
  		    ido-temp-list)))))
--- 3433,3439 ----
        (let ((default-directory ido-current-directory))
  	(ido-to-end ;; move ftp hosts and visited files to end
  	 (delq nil (mapcar
! 		    (lambda (x) (if (or (string-match ".:\\'" x)
  					(and (not (ido-final-slash x))
  					     (get-file-buffer x))) x))
  		    ido-temp-list)))))
***************
*** 4149,4155 ****
  	    (setq refresh t))
  	  ))
  
! 	 ((and (string-match (if ido-enable-tramp-completion "..[:@]\\'" "..:\\'") contents)
  	       (ido-is-root-directory)) ;; Ange-ftp or tramp
  	  (ido-set-current-directory ido-current-directory contents)
  	  (when (ido-is-slow-ftp-host)
--- 4149,4155 ----
  	    (setq refresh t))
  	  ))
  
! 	 ((and (string-match (if ido-enable-tramp-completion ".[:@]\\'" ".:\\'") contents)
  	       (ido-is-root-directory)) ;; Ange-ftp or tramp
  	  (ido-set-current-directory ido-current-directory contents)
  	  (when (ido-is-slow-ftp-host)
*** lisp/ChangeLog.~1.10261.~	2006-11-06 15:42:02.000000000 +0100
--- lisp/ChangeLog	2006-11-24 18:34:40.000000000 +0100
***************
*** 0 ****
--- 1,5 ----
+ 2006-11-24  Michaël Cadilhac  <michael.cadilhac@lrde.org>
+ 
+ 	* ido.el (ido-read-internal): Allow single letter named hosts.
+ 	(ido-complete, ido-make-file-list, ido-exhibit): Ditto.
+ 

[-- Attachment #1.1.3: Type: text/plain, Size: 403 bytes --]


TIA!

-- 
/!\ My mail address has changed, please update your files accordingly.
 |      Michaël `Micha' Cadilhac   |  In a World without Walls and Fences,  |
 |         Epita/LRDE Promo 2007   |     who needs Windows and Gates?       |
 |  http://michael.cadilhac.name   |          -- Dino Esposito              |
 `--  -   JID: micha@amessage.be --'                                   -  --'

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

end of thread, other threads:[~2006-11-30 20:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-26 20:00 Ido and hosts named with a single letter Michaël Cadilhac
2006-11-27  9:43 ` Kim F. Storm
2006-11-27 17:04   ` Michaël Cadilhac
2006-11-28  8:58     ` Kim F. Storm
2006-11-28 13:13       ` File name handlers and local files Michaël Cadilhac
2006-11-28 14:50         ` Michael Albinus
2006-11-28 15:13           ` Michaël Cadilhac
2006-11-28 14:54         ` Andreas Schwab
2006-11-30 20:52     ` Ido and hosts named with a single letter Kim F. Storm

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.