On 1/15/2023 1:23 AM, Michael Albinus wrote: > One question is left for me: do we really need FILENAME as argument? I > believe it would be sufficient to check default-directory; this would also > be consistent with the functions for remote hosts described in os.texi. Good point. I removed the FILENAME argument. > Btw, another idea is to simplify the implementation. Let Tramp set a > connection-local variable `tramp-user-uid' or alike, and your function > `remote-user-uid' or however you rename it will ask for this > connection-local variable, like we do it already in functions > `null-device' and `path-separator'. This would avoid the overhead of > running the file name handler mechanism. I didn't do this part though, since it wasn't so simple. Instead, I made the function (now named 'file-user-uid'[1]) work like the function 'exec-path'. Since the regular 'user-uid' is also a function, I think this implementation is the most straightforward. [1] I named it this way to mimic the relationship between 'start-process' and 'start-file-process'. (But 'user-file-uid' didn't sound right, so 'file-user-uid' it is.)