[Top][All Lists]

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

Re: tramp-gvfs: parsing issues when using locale

From: Michael Albinus
Subject: Re: tramp-gvfs: parsing issues when using locale
Date: Mon, 19 Oct 2015 12:01:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Jürgen Hötzel <address@hidden> 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---
 Dateien \
make check

Ran 42 tests, 27 results as expected, 1 unexpected, 14 skipped (2015-10-19 
1 expected failures

1 unexpected results:
   FAILED  tramp-test32-utf8

14 skipped results:
  SKIPPED  tramp-test20-file-modes
  SKIPPED  tramp-test21-file-links
  SKIPPED  tramp-test22-file-times
  SKIPPED  tramp-test26-process-file
  SKIPPED  tramp-test27-start-file-process
  SKIPPED  tramp-test28-shell-command
  SKIPPED  tramp-test29-vc-registered
  SKIPPED  tramp-test31-special-characters-with-ls
  SKIPPED  tramp-test31-special-characters-with-perl
  SKIPPED  tramp-test31-special-characters-with-stat
  SKIPPED  tramp-test32-utf8-with-ls
  SKIPPED  tramp-test32-utf8-with-perl
  SKIPPED  tramp-test32-utf8-with-stat
  SKIPPED  tramp-test33-asynchronous-requests
--8<---------------cut here---------------end--------------->8---

> 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 ->
> -rwx------ 0 address@hidden users 360 10-18 20:19 ->
> 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.

Yep, too complicate.

> 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.

Let's document it: People are encouraged NOT to use the same
display-name twice in a given directory. Otherwise, the access is
regarded as undecided (and we might return internally the first entry
found with that display-name).

In a dired buffer, were we see the link between display-name and blob-id,
the navigation might work.

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?

> 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.

> Regards,
> Jürgen

Best regards, Michael.

reply via email to

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