The cases I found didn't occur when running under `ert', because then I could not manage to break into the debugger. However, today I tested with `debug-on-quit' to t and `ert-debug-on-error'. When I press C-g I go into the debugger and it looks like it's executing the `test' commands you suggested earlier. I've attached the backtrace (for what's it worth). Anyway, it works with simple filenames like "xyz", so it is somehow connected to the non-ascii file names. By the way, are you aware that OS X denormalizes file names when stored in the file system, could that be related to this in any way? -- Anders On Fri, Dec 18, 2015 at 9:12 AM, Michael Albinus wrote: > Anders Lindgren writes: > > > Hi, > > Hi Anders, > > > I tried to see what actually happened in the test cases. > > > > I seem to have boiled things down to the following line, when > > evaluated, tramp hangs. When enabling debug-on-quit, I get the > > attached backtrace after hitting C-g. > > > > (write-region "test" nil > > > "/mock:anders-lindgrens-macbook.local:/private/var/folders/qq/qqGPPGoBHOGgJs3oBoKTHU+++TI/-Tmp-/tramp-test1900-Fy/test") > > > > > > The directory exists and is empty. > > > > It looks like the code tries to run an external command "mock" (which > > doesn't exits, as far as I know). > > Nope. "mock" is not a command. It is a fake (mock) Tramp method I create > on-the-fly when running tramp-test.el. This is because I cannot use any > real Tramp method, because usually they require user authentication, > which is a no-go for tests running in batch mode. > > According to your backtrace, you have interrupted Tramp at the following > place: > > > Debugger entered--Lisp error: (quit) > > accept-process-output(# anders-lindgrens-macbook.local*> 1 nil t) > > tramp-accept-process-output(# anders-lindgrens-macbook.local*> 1) > > tramp-wait-for-regexp(# anders-lindgrens-macbook.local*> nil > "\\(^\\|\\)[^#$\n]*///9132fe7dc760b6d1120df52ca7cc56ca#\\$?$") > > tramp-wait-for-output(# anders-lindgrens-macbook.local*>) > > tramp-send-command(["mock" nil "anders-lindgrens-macbook.local" > "/private/var/folders/qq/qqGPPGoBHOGgJs3oBoKTHU+++TI/-Tmp-/tramp-test1900-Fy/test" > nil] "echo \\\"`getconf PATH 2>/dev/null`\\\" 2>/dev/null; echo > tramp_exit_status $?") > > This is the command "echo \\\"`getconf PATH 2>/dev/null`\\\" > 2>/dev/null; echo tramp_exit_status $?", which shouldn't fail. At least > it didn't fail so far. > > Could you send the full Tramp traces? Maybe my last change has damaged > something else. > > > -- Anders > > Best regards, Michael. >