Hi Michael,

On Mon, Oct 19, 2015 at 12:01 PM, Michael Albinus <[email protected]>
wrote:

> Jürgen Hötzel <[email protected]> writes:
>
> > Hi Michael.
>
> Hi Jürgen,
>
> >     (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)?
>
> In case we don't agree, let's add both method names :-)
>
> Seriously: You implement, you decide.
>
> > I have enclosed a patch (nothing ready to merge yet).
>
> If I run tramp-tests.el, it fails tramp-test32-utf8. Maybe you can have
> a look on it. If it passes that test suite, no problem from my side to
> commit the patch for further work. Some words in tramp.texi would also
> be appreciated.
>
> My private test uses my GMX account and the related mediacenter disk space:
>
> --8<---------------cut here---------------start------------->8---
> env REMOTE_TEMPORARY_FILE_DIRECTORY=/davs:[email protected]
> @mediacenter.gmx.net:/Sonstige\ Dateien \
> make check
> ...
>
> Ran 42 tests, 27 results as expected, 1 unexpected, 14 skipped (2015-10-19
> 11:37:44+0200)
> 1 expected failures
>
> 1 unexpected results:
>    FAILED  tramp-test32-utf8
>
>
This was most likely caused by my previous change to suppress locale
settings. "C.utf8" is not a valid locale on my system.
And no guarantee can be given en_US.utf8 is available. So i just suppress
the LC_MESSAGES category in my latest commit:

http://git.savannah.gnu.org/cgit/tramp.git/commit/?id=4a0079bd60c53ef2e03d580e8e34d2074e090460


BTW: sorry for the premature previous commit (I just reverted it).

I'm curious: how does Nautilus handle the problem? What is shown as file
> name, just the display-name, or blob-id, or both? What does it show as
> "Properties" of such a file?
>
> In Nautilus only the display-name is shown: Even in the properties dialog.


> > Also there is some room for optimization (calling gvfs-info once for
> > the whole directory list, instead for each entry).
>
> Of course. I vaguely remember that I wanted to add this years ago; this
> idea has been lost somehow. And likely, there are other glitches in
> tramp-gvfs.el you will find.
>
> Just some few remarks on the patch:
>
> > +(defun tramp-gvfs-handle-file-attributes (filename &optional id-format)
> > +  "Like `file-attributes' for Tramp files."
> > +  (unless id-format (setq id-format 'integer))
> > +  (ignore-errors
> > +    ;; Don't modify `last-coding-system-used' by accident.
>
> Nitpicking: Comment superfluous.
>
> > +     ;; ... inode and device
> > +     (setq res-inode
> > +           (let ((n (cdr (assoc "unix::inode" attributes))))
> > +             (if n (string-to-number n)
> > +               (tramp-get-inode v))))
> > +     (setq res-device
> > +           (let ((n (cdr (assoc "unix::device" attributes))))
> > +             (if n (string-to-number n)
> > +               (tramp-get-device v))))
>
> Here I get a compilation warning. Change it to
>
> (tramp-get-inode (tramp-dissect-file-name filename)))))
> (tramp-get-device (tramp-dissect-file-name filename)))))
>
> or similar.
>
> > @@ -986,6 +990,13 @@ file names."
> >               (goto-char (point-max))
> >               (while (zerop (forward-line -1))
> >              (setq entry (buffer-substring (point) (point-at-eol)))
> > +            ;; use display-name if available (google-drive)
>
> Nitpicking: Start comments with a capital letter. Finish them with a
> period.
>
>
Thanks a lot for your feedback. I really appreciate it.

I found another way to get the display-name directly by using the
gvfs-ls-command argument switch "--attributes=standard::display-name":

juergen@samson:~ → gvfs-ls --attributes=standard::display-name
google-drive://[email protected]/Test/
0B7bdw3EbsjerTmxCdddDdDfDeG8 5 (regular) standard::display-name=todo.org

So the changes required to support google-drive/display-names should get
much simpler.

Regards, Jürgen
_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to