Subject: bug#16928: 24.3.50; file _flymake not deleted on remote hosts

From: Leo Liu <[email-masked]>
Date: Tue, 04 Mar 2014 22:20:13 +0800

On 2014-03-04 21:14 +0800, Michael Albinus wrote:
> Yes, I could reproduce it. The problem is, that flymake starts an
> asynchronous process. It's sentinel calls then flymake-simple-cleanup,
> which fires file-exists-p to an unpredictable time.
>
> After serving flymake-find-file-hook, find-file has continued with the
> other functions in find-file-hook. When the file-exists-p call from the
> sentinel happened, Tramp was busy with requests from
> vc-find-file-hook. And since Tramp is designed to work sequentially, it
> couldn't serve promptly :-(

I see. Maybe it is better for flymake to just call delete-file without
the file-exists-p check ignoring any error. I have found other cases
where _flymake files are left behind.

> As temporary workaround, you could try
>
> (add-hook 'find-file-hook 'flymake-find-file-hook 'append)

Thanks, will use it for now.

> I will check, whether Tramp could be enabled to handle such
>asynchronous
> calls. 

Thanks.

Leo