[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hang forever with an invalid tramp filename
From: |
Michael Albinus |
Subject: |
Re: hang forever with an invalid tramp filename |
Date: |
Mon, 07 Nov 2011 21:05:33 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) |
Thierry Volpiatto <address@hidden> writes:
> Also, to avoid repetition, what about somthing like that:
>
> #+BEGIN_SRC lisp
> (defun tramp-parse-sfile (filename function)
> "Return a list of (user host) tuples allowed to access.
> User is always nil."
> ;; On Windows, there are problems in completion when
> ;; `default-directory' is remote.
> (let ((default-directory (tramp-compat-temporary-file-directory))
> res)
> (when (file-readable-p filename)
> (with-temp-buffer
> (insert-file-contents filename)
> (goto-char (point-min))
> (while (not (eobp))
> (push (funcall function) res))))
> res))
>
> (defun tramp-parse-shosts (filename)
> "Return a list of (user host) tuples allowed to access.
> User is always nil."
> (tramp-parse-sfile filename 'tramp-parse-shosts-group))
>
> (defun tramp-parse-sconfig (filename)
> "Return a list of (user host) tuples allowed to access.
> User is always nil."
> (tramp-parse-sfile filename 'tramp-parse-sconfig-group))
>
> #+END_SRC
Good idea. I will check, which functions coujld be merged; likely more
than only tramp-parse-shosts and tramp-parse-sconfig.
Best regards, Michael.
- hang forever with an invalid tramp filename, Thierry Volpiatto, 2011/11/02
- Re: hang forever with an invalid tramp filename, Thierry Volpiatto, 2011/11/05
- Re: hang forever with an invalid tramp filename,
Michael Albinus <=
- Re: hang forever with an invalid tramp filename, Thierry Volpiatto, 2011/11/07
- Re: hang forever with an invalid tramp filename, Michael Albinus, 2011/11/08
- Re: hang forever with an invalid tramp filename, Thierry Volpiatto, 2011/11/08
- Re: hang forever with an invalid tramp filename, Thierry Volpiatto, 2011/11/09
- Re: hang forever with an invalid tramp filename, Michael Albinus, 2011/11/10
Re: hang forever with an invalid tramp filename, Michael Albinus, 2011/11/07