tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp-gvfs: parsing issues when using locale


From: Jürgen Hötzel
Subject: Re: tramp-gvfs: parsing issues when using locale
Date: Sun, 18 Oct 2015 21:21:39 +0200

Hi Michael.

On Fri, Oct 16, 2015 at 8:07 PM, Michael Albinus <address@hidden> wrote:
> Or user-mail-adress to get host and user-name?

Yes, but only if it contains a Google mail address. Otherwise, it would
be a too wide guess. Personally, I own a gmail.com account, but I don't
use it in my `user-mail-address'.

Well, `user-login-name' might also be misleading. So we could agree on this?

;;;###tramp-autoload
(when (string-match "\\(.+\\)@\\(gmail\\|googlemail\\)\\.com" user-mail-address)
  (add-to-list 'tramp-default-user-alist
               `("\\`gd\\'" nil ,(match-string 1 user-mail-address)))
  (add-to-list 'tramp-default-host-alist
               '("\\`gd\\'" nil "gmail.com")))


Looks good to me: A good default for most users.
 
(Yes, the method name is not agreed yet between us ...)


I don't mind having this shorter method. I personaly just don't need it (because I use completion anyway).
I thought this new method name  might just confuse some users and  short method names might get confusing too if other backends will be added (OneDrive -> od)?

I have enclosed a patch (nothing ready to merge yet). There is still a problem handling multiple files having the same display-name. For example this dired listing (replaced real ID):

  -rwx------  0 address@hidden             users      360 10-18 20:19 todo.org -> /XXXXXXXXXXXXXXXXXXXXXXX
  -rwx------  0 address@hidden             users      360 10-18 20:19 todo.org -> /XXXXXXXXXXXXXXXXXXXXXXX

I considered using some kind of uniquify functionality (like for buffer-names). But in this case we need a translation between  generated filenames and real filenames: Things get complicated.

Another workaround: Just keep the first display-name if there a multiples files with the same display-name and use the blob-id for the rest.

Also there is some room for optimization (calling gvfs-info once for the whole directory list, instead for each entry).

Regards,

Jürgen

Attachment: 0001-tramp-gvfs-get-attributes-New-defun-to-read-a-gvfs-a.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]