From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor Date: Wed, 28 Apr 2021 15:57:37 +0200 Message-ID: <87bl9y5x66.fsf@gmx.de> References: <87eeev8xq7.fsf@posteo.net> <87mttjcz6s.fsf@gmx.de> <87pmyfmmo4.fsf@posteo.net> <87h7jrj664.fsf@posteo.net> <87eeeudfkc.fsf@gmx.de> <8735vallc2.fsf@posteo.net> <87tunqbqw9.fsf@gmx.de> <87czuefu94.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18925"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 48067@debbugs.gnu.org To: Thierry Volpiatto Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 28 15:59:01 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lbkiS-0004oa-Tl for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Apr 2021 15:59:01 +0200 Original-Received: from localhost ([::1]:43320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbkiR-0005HL-EJ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Apr 2021 09:58:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbkhW-0003yW-6T for bug-gnu-emacs@gnu.org; Wed, 28 Apr 2021 09:58:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42179) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbkhV-0008NH-TJ for bug-gnu-emacs@gnu.org; Wed, 28 Apr 2021 09:58:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lbkhV-0000at-Sb for bug-gnu-emacs@gnu.org; Wed, 28 Apr 2021 09:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Apr 2021 13:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48067 X-GNU-PR-Package: emacs Original-Received: via spool by 48067-submit@debbugs.gnu.org id=B48067.16196182682263 (code B ref 48067); Wed, 28 Apr 2021 13:58:01 +0000 Original-Received: (at 48067) by debbugs.gnu.org; 28 Apr 2021 13:57:48 +0000 Original-Received: from localhost ([127.0.0.1]:53725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbkhI-0000aR-95 for submit@debbugs.gnu.org; Wed, 28 Apr 2021 09:57:48 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:59881) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbkhF-0000aE-UX for 48067@debbugs.gnu.org; Wed, 28 Apr 2021 09:57:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1619618259; bh=1rr+HI0FVCLFEeqHL+hyoJJdebBrto2gNdZq9Fan9+M=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Ughlpleg5bCc4wcKnBA4fcSHyurqigO8Bwh7jTAkjJ3fUF5gVOlCDEND3cLKs8AQY 00zJOsmxrA7bdMBK4py7akHAyImX7adsZetBRlDHTiVAq0vWnECYAvubJ+BvW5ctfd nN3rxlJcrQUAj5GEoStntbOJUYJ8xLpqouDgs+MU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([213.220.147.93]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mz9Yv-1lOujh3DRj-00wF1G; Wed, 28 Apr 2021 15:57:38 +0200 In-Reply-To: <87czuefu94.fsf@posteo.net> (Thierry Volpiatto's message of "Wed, 28 Apr 2021 12:41:21 +0000") X-Provags-ID: V03:K1:dupgJyEiFN2m0paK0bNqnIuYE2Nd4+DZFwXPOnJj8xIDQ3bDXfS wcs133vHbBTwmRATO25VY0xOPMa+T+WYfpuyvfiwkte/oDOtXyKMHPVSQB68SkRZiOzJvvd o6vW3ktxqRiOFpn315ZfGFMDwZ5knhApFckOYslsjL2HqzTHT5kp7xYm+nYuxyZKlWdzJGE wcNhIuo99K/z1p8gthVzQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:xctWjCZVqZw=:SByMAAEA8nxOYX/MJaaWu7 Sb2PBbGTe0Ti1gpK8lprt1LL278H74VSE2SIAbJW7WNF4Bpd+9l+PIOdllGoyhgN7bYnSMrIz uhjy05xEj5nfeVIef142mJL8QdlaBw8BWtbNurxAAIU38YyLmSt/xqCEmLfcx7b2aPeiGRXu+ hoyeOb2wVTpYCn6mGBi3JZZxKLScMC/U5G3FjVgFfk2FjcfggzZu7YvmMfj5oC57+LQMYjQsc 4QKXsyaAPt52TT6gpS1qdosQdbMiPT4+tPd0Nq3MUOuDEY+JmYe52IC7GbW35o5xM8fZNNmIt +RJYJ7qXrtTU+nD5NLF6X5sOLFc5LZo28BCnT6QB4Gtqf1mSrd0D+o+JBQSjdtOHABIS+EI55 AnCQEm/5aBj7sk/Ll8dG6Yg4aAeaJ8ExHKH5prlz6ZyiToT1XpSroPgyqjojMFQ3s7I+yWoEr EbAnQKaA5NMvTEap5sVZpQiwmHbzDTinHTR+k/hF0nTTuKBimMNu8eTy4z62XYfJJOeQ8VUgC +mVfA8lLqIyGBk+lCF2ZolJPyaGoY9lbnvUP9r0YlWPnWC5/pPMDK5lndTITKKho0uEm4HCo/ sIIZt8v8N7hF8wa0HP3yBhB7pP2Wg8FllS05IZrk23lmYpZNS+lDx9qFNaVPTDrS3QzYWt6bo 7WavCYv+ALtbHkxc3Z74stsWeaaPVPvnT1Frm3pNUNBwYGJQiKa+S0impKkr6zAay/X18zYve Fg7Rua/Z34IiH8jhGFsDYppdIPjSYE+VJA2zytYuPobHWpoujOLCffFPq6r89dIuAb4hyfMD X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:205113 Archived-At: --=-=-= Content-Type: text/plain Thierry Volpiatto writes: > Hello Michael, Hi Thierry, > What I did: M-x helm-find-files => /sudo::/home/thierry/tmp/ > Looks the watchers are recorded with a warning though. That's OK. The warning tells us that it is an older gio version, which doesn't want to speak about its implementation details. Not a big deal, Tramp handles this. > Then I delete test.txt from external terminal. > It seems the watcher catched the event but the notification is with the > local name of directory instead of the remote name. > I.e. /home/thierry/tmp/ instead of /sudo::/home/thierry/tmp/ > not sure if it is normal. That's OK. gio doesn't know Tramp and its syntax :-) > 14:39:28.298343 tramp-sh-gio-monitor-process-filter (6) # # > > (gio monitor:27194): GLib-GIO-%1b[1;33mWARNING%1b[0m **: > %1b[34m14:39:28.217%1b[0m: Can't find module 'help' specified in GIO_USE_FILE_MONITOR And here's the problem. The warning includes escape sequences, which are not known to tramp-sh-gio-monitor-process-filter. So I've reworked the patch as attached, could you pls test? > Thanks. Best regards, Michael. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Transfer-Encoding: quoted-printable *** /tmp/ediffoD9hFR 2021-04-28 15:56:06.972513700 +0200 =2D-- /home/albinus/src/tramp/lisp/tramp-sh.el 2021-04-28 15:49:29.2711844= 11 +0200 *************** *** 3730,3760 **** ;; Determine monitor name. (unless (tramp-connection-property-p proc "gio-file-monitor") ! (cond ! ;; We have seen this on cygwin gio and on emba. Let's make som= e assumptions. ! ((string-match ! "Can't find module 'help' specified in GIO_USE_FILE_MONITOR" = string) ! (cond ! ((getenv "EMACS_EMBA_CI") ! (tramp-set-connection-property ! proc "gio-file-monitor" 'GInotifyFileMonitor)) ! ((eq system-type 'cygwin) ! (tramp-set-connection-property ! proc "gio-file-monitor" 'GPollFileMonitor)) ! (t (tramp-error proc 'file-error "Cannot determine gio monito= r")))) ! ;; TODO: What happens, if several monitor names are reported? ! ((string-match "\ Supported arguments for GIO_USE_FILE_MONITOR environment variable: \\s-*\\([[:alpha:]]+\\) - 20" string) - (tramp-set-connection-property - proc "gio-file-monitor" (intern ! (format "G%sFileMonitor" (capitalize (match-string 1 string)= ))))) ! (t (throw 'doesnt-work nil))) ! (setq string (replace-match "" nil nil string))) ;; Delete empty lines. ! (setq string (tramp-compat-string-replace "\n\n" "\n" string)) (while (string-match (eval-when-compile =2D-- 3730,3758 ---- ;; Determine monitor name. (unless (tramp-connection-property-p proc "gio-file-monitor") ! (tramp-set-connection-property ! proc "gio-file-monitor" ! (cond ! ;; We have seen this on cygwin gio and on emba. Let's make ! ;; some assumptions. ! ((string-match ! "Can't find module 'help' specified in GIO_USE_FILE_MONITOR"= string) ! (cond ! ((getenv "EMACS_EMBA_CI") 'GInotifyFileMonitor) ! ((eq system-type 'cygwin) 'GPollFileMonitor) ! (t tramp-cache-undefined))) ! ;; TODO: What happens, if several monitor names are reported? ! ((string-match "\ Supported arguments for GIO_USE_FILE_MONITOR environment variable: \\s-*\\([[:alpha:]]+\\) - 20" string) (intern ! (format "G%sFileMonitor" (capitalize (match-string 1 string))))) ! (t (throw 'doesnt-work nil)))) ! (setq string (substring string (match-end 0)))) ;; Delete empty lines. ! (setq string (tramp-compat-string-replace "\n\n" "\n" string) ! string (replace-regexp-in-string "^\n" "" string)) (while (string-match (eval-when-compile --=-=-=--