Hi Michael,
I see that in `tramp-file-name-handler' you fall back to
`tramp-run-real-handler' when 'suppress is thrown by
`tramp-sh-file-name-handler'.

Here the problem I have with this:
The process I run on remote host is "find" shell command.

I run quickly on remote:

"find process" => "kill this process" => "find process"
                  (less than 5s delay)

The second "find process" is running now locally (It fallback to
`tramp-run-real-handler')

So my question is why running `tramp-run-real-handler' when 'suppress is
thrown ?
Isn't there a better solution ? (possibly with delaying the next call to
process?)

I fixed the problem here by stopping call to process during 5s in a
sentinel:

--8<---------------cut here---------------start------------->8---
(when (string= event "finished\n")
      (when (or (file-remote-p (helm-default-directory))
                helm-suspend-update-flag)
        (setq helm-suspend-update-flag t)
        ;; When tramp tries to open the same connection twice in a
        ;; short time frame (less than 5s) it throw 'suppress which
        ;; call the real-handler on the main "Emacs", so we wait
        ;; 5s before updating to avoid this, but allowing user to
        ;; enter input during this delay.
        (run-at-time 5 nil #'(lambda ()
          (setq helm-suspend-update-flag nil)
          (helm-check-minibuffer-input)))))
--8<---------------cut here---------------end--------------->8---

It is working fine, but I would like something more general, possibly a
flag or similar.
Maybe you have an idea?

Thanks.

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 


_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to