Subject: bug#10173: 24.0.50; TRAMP sudo method not working on OS X

From: Michael Albinus <[email-masked]>
Date: Thu, 01 Dec 2011 15:40:56 +0100

Michael Welsh Duggan <[email-masked]> writes:

> As a followup, on the Mac, stat -f '("%N" %z)' does almost the same
> thing.  The difference is that under GNU/Linux, %N is surrounding the
> filename by backtick-quote, and on the Mac it does not.  Now, tramp
> might be running in an environment where it does not on the GNU/Linux
> system as well.  I have only tried this on the command line.

Tramp does only one check whether stat(1) returns the correct
string. When it doesn't work, it uses other commands. Therefore, it
isn't mandatory to parse different stat(1) result syntaces.

The problem in your case is that Tramp hasn't suppressed the "wrong"
(better: unexpected) string in your case. This was fixed already by:

2011-07-04  Michael Albinus  <[email-masked]>

[...]

(tramp-send-command-and-read): New optional argument NOERROR.
(tramp-open-connection-setup-interactive-shell)
(tramp-get-remote-path, tramp-get-remote-stat): Use it.

Your Emacs build reports:

In GNU Emacs 24.0.50.2 (x86_64-apple-darwin10.8.0, NS apple-appkit-1038.36)
of 2011-07-23 on MICHAEL-W-DUGGANs-MacBook-Pro.local

It should contain that patch. Maybe you haven't synced your Emacs tree
with the trunk before the build?

Could you, please, check whether you find the quoted entry in
lisp/ChangeLog? If not, a simple upgrade shall solve the problem for
you.

Best regards, Michael.