GNU bug report logs - #48067
28.0.50; Tramp error: cannot determine gio monitor

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thievol <at> posteo.net>

Date: Tue, 27 Apr 2021 17:06:02 UTC

Severity: normal

Found in version 28.0.50

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48067 in the body.
You can then email your comments to 48067 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Tue, 27 Apr 2021 17:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thierry Volpiatto <thievol <at> posteo.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 27 Apr 2021 17:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; Tramp error: cannot determine gio monitor
Date: Tue, 27 Apr 2021 16:58:24 +0000
When adding a file-notify watcher to a remote directory in helm-find-files, I
have an error "cannot determine gio monitor":

Debugger entered--Lisp error: (file-error "Cannot determine gio monitor")
  signal(file-error ("Cannot determine gio monitor"))
  tramp-sh-gio-monitor-process-filter(#<process gio> "\n(gio monitor:15942): GLib-GIO-\33[1;33mWARNING\33[0m ...")
  [...]

This doesn't happen in emacs-27.2.
It happens in emacs-28 compiled with native-comp or not.

which gio returns /usr/bin/gio.

Any ideas?

Thanks.


In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.10)
 of 2021-04-27 built on IPadS340
Repository revision: 6fb80c9ad80bfc0db18285d6e23c3ee08e2aa657
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Linux Mint 19.3

Configured using:
 'configure CFLAGS=-O8 --with-mailutils --with-cairo
 --with-native-compilation'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $LANG: fr_FR.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Elisp

Minor modes in effect:
  bug-reference-prog-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  global-ligature-mode: t
  ligature-mode: t
  psession-mode: t
  psession-savehist-mode: t
  global-git-gutter-mode: t
  git-gutter-mode: t
  display-time-mode: t
  winner-mode: t
  show-paren-mode: t
  helm-epa-mode: t
  helm-descbinds-mode: t
  override-global-mode: t
  helm-adaptive-mode: t
  helm-mode: t
  shell-dirtrack-mode: t
  helm-popup-tip-mode: t
  async-bytecomp-package-mode: t
  dired-async-mode: t
  minibuffer-depth-indicate-mode: t
  straight-use-package-mode: t
  straight-package-neutering-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/thierry/.emacs.d/straight/build/transient/transient hides /usr/local/share/emacs/28.0.50/lisp/transient

Features:
(shadow epa-mail face-remap helm-ring emacsbug help-fns cl-print debug
epa-file cus-start helm-command w3m-form w3m-symbol w3m timezone
w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-favicon w3m-image tab-line
w3m-proc w3m-util qp sort gnus-cite mm-archive smiley mail-extr
helm-firefox helm-addressbook helm-x-files helm-for-files helm-bookmark
smerge-mode view org-agenda org-refile org-element avl-tree generator
ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus
nnselect gnus-search eieio-opt speedbar ezimage dframe ol-docview
ol-bibtex bibtex ol-bbdb ol-w3m addressbook-bookmark mu4e-config
org-mu4e mu4e-patch mu4e-contrib eshell esh-cmd esh-ext esh-opt esh-proc
esh-io esh-arg esh-module esh-groups esh-util bookmark mu4e mu4e-org
mu4e-main mu4e-view mu4e-view-gnus gnus-art mm-uu mml2015 mm-view
mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus
gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int
gnus-range gnus-win gnus nnheader mu4e-view-common mu4e-headers
mu4e-compose mu4e-context mu4e-draft mu4e-actions ido rfc2368 smtpmail
sendmail mu4e-mark mu4e-proc mu4e-utils doc-view image-mode exif
mu4e-lists mu4e-message shr kinsoku svg dom flow-fill hl-line mu4e-vars
message rmc puny rfc822 mml mml-sec gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
mail-prsvr mailabbrev mail-utils gmm-utils mailheader mu4e-meta
tramp-archive tramp-gvfs tramp-cache zeroconf dbus flymake-proc flymake
sh-script smie executable jka-compr vc-rcs cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs conf-mode
bug-reference naquadah-theme solar cal-dst holidays hol-loaddefs
tv-utils undo-tree diff undo-tree-autoloads ligature ligature-autoloads
boxquote rect rainbow-mode-autoloads psession frameset wgrep-helm wgrep
grep compile text-property-search wgrep-autoloads log-view pcvs-util
pcmpl-git pcmpl-git-autoloads toc-org-autoloads cl-indent ffap
markdown-toc-autoloads markdown-mode-autoloads autocrypt ietf-drums
config-w3m w3m-autoloads git-gutter git-gutter-autoloads mule-util appt
diary-lib diary-loaddefs gud anaconda-mode xref project pythonic f dash
s anaconda-mode-autoloads pythonic-autoloads f-autoloads s-autoloads
emamux-autoloads magit-autoloads git-commit-autoloads
with-editor-autoloads transient-autoloads dash-autoloads
pcomplete-extension pcmpl-unix pcmpl-gnu iterator iedit-autoloads
ledger-mode-autoloads wdired dired-extension org-config ob-gnuplot
org-crypt net-utils time all-the-icons all-the-icons-faces data-material
data-weathericons data-octicons data-fileicons data-faicons
data-alltheicons all-the-icons-autoloads winner w3m-wget wget
wget-sysdep autotest-mode autoconf-mode paren woman man ediff ediff-merg
ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util
init-helm helm-fd epa derived epg epg-config helm-epa helm-misc
helm-imenu imenu helm-elisp-package package url-handlers helm-find
helm-org org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro
org-footnote org-src ob-comint org-pcomplete org-list org-faces
org-entities noutline outline org-version ob-emacs-lisp ob-core ob-eval
org-table ol org-keys org-compat org-macs org-loaddefs cal-menu calendar
cal-loaddefs helm-external helm-net browse-url xml url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util url-parse url-vars mailcap isearch-light helm-descbinds
helm-ls-git vc-git diff-mode vc vc-dispatcher helm-ipython helm-elisp
helm-eval edebug backtrace find-func helm-info python tramp-sh
use-package-bind-key bind-key popup helm-adaptive diminish helm-mode
helm-files filenotify tramp tramp-loaddefs trampver tramp-integration
files-x tramp-compat shell pcomplete comint ansi-color ring parse-time
iso8601 time-date ls-lisp auth-source password-cache json map
helm-buffers helm-occur helm-tags helm-locate helm-grep helm-regexp
format-spec helm-utils helm-help helm-types use-package-diminish
cus-edit pp wid-edit helm-extensions-autoloads helm-config
helm-autoloads helm async-bytecomp helm-global-bindings helm-easymenu
helm-source eieio eieio-core eieio-loaddefs helm-multi-match helm-lib
dired-async advice dired-aux dired dired-loaddefs async emms-autoloads
finder-inf use-package-core popup-autoloads diminish-autoloads mb-depth
server edmacro kmacro avoid cus-load use-package-autoloads
bind-key-autoloads straight-autoloads comp comp-cstr warnings rx
cl-extra straight info autoload radix-tree seq easy-mmode pcase cl-seq
subr-x byte-opt checkdoc lisp-mnt thingatpt help-mode cl-macs gv
bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process nativecomp
emacs)

Memory information:
((conses 16 849478 250397)
 (symbols 48 45932 13)
 (strings 32 196999 46909)
 (string-bytes 1 6772063)
 (vectors 16 92466)
 (vector-slots 8 2285295 303392)
 (floats 8 2023 3104)
 (intervals 56 20423 4877)
 (buffers 992 125))
<#secure method=pgpmime mode=sign>

-- 
Thierry




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Tue, 27 Apr 2021 19:21:02 GMT) Full text and rfc822 format available.

Message #8 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Tue, 27 Apr 2021 21:19:55 +0200
Thierry Volpiatto <thievol <at> posteo.net> writes:

Hi Thierry,

> When adding a file-notify watcher to a remote directory in helm-find-files, I
> have an error "cannot determine gio monitor":
>
> Debugger entered--Lisp error: (file-error "Cannot determine gio monitor")
>   signal(file-error ("Cannot determine gio monitor"))
>   tramp-sh-gio-monitor-process-filter(#<process gio> "\n(gio monitor:15942): GLib-GIO-\33[1;33mWARNING\33[0m ...")
>   [...]
>
> This doesn't happen in emacs-27.2.
> It happens in emacs-28 compiled with native-comp or not.
>
> which gio returns /usr/bin/gio.
>
> Any ideas?

Tramp searches for the gio monitor on the remote host. Does it exist there?

> Thanks.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Tue, 27 Apr 2021 21:41:01 GMT) Full text and rfc822 format available.

Message #11 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Tue, 27 Apr 2021 21:38:45 +0000
[Message part 1 (text/plain, inline)]
Hi Michael,

Michael Albinus <michael.albinus <at> gmx.de> writes:

> [[PGP Encrypted Part:OK]]
> Thierry Volpiatto <thievol <at> posteo.net> writes:
>
> Hi Thierry,
>
>> When adding a file-notify watcher to a remote directory in helm-find-files, I
>> have an error "cannot determine gio monitor":
>>
>> Debugger entered--Lisp error: (file-error "Cannot determine gio monitor")
>>   signal(file-error ("Cannot determine gio monitor"))
>>   tramp-sh-gio-monitor-process-filter(#<process gio> "\n(gio monitor:15942): GLib-GIO-\33[1;33mWARNING\33[0m ...")
>>   [...]
>>
>> This doesn't happen in emacs-27.2.
>> It happens in emacs-28 compiled with native-comp or not.
>>
>> which gio returns /usr/bin/gio.
>>
>> Any ideas?
>
> Tramp searches for the gio monitor on the remote host. Does it exist there?

Yes, and anyway this happen as well with sudo method on same machine.

>> Thanks.
>
> Best regards, Michael.
>
>
> [[End of PGP Encrypted Part]]


-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Wed, 28 Apr 2021 06:06:02 GMT) Full text and rfc822 format available.

Message #14 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Wed, 28 Apr 2021 05:59:29 +0000
[Message part 1 (text/plain, inline)]
Thierry Volpiatto <thievol <at> posteo.net> writes:

> Hi Michael,
>
> Michael Albinus <michael.albinus <at> gmx.de> writes:
>
>> [[PGP Encrypted Part:OK]]
>> Thierry Volpiatto <thievol <at> posteo.net> writes:
>>
>> Hi Thierry,
>>
>>> When adding a file-notify watcher to a remote directory in helm-find-files, I
>>> have an error "cannot determine gio monitor":
>>>
>>> Debugger entered--Lisp error: (file-error "Cannot determine gio monitor")
>>>   signal(file-error ("Cannot determine gio monitor"))
>>>   tramp-sh-gio-monitor-process-filter(#<process gio> "\n(gio monitor:15942): GLib-GIO-\33[1;33mWARNING\33[0m ...")
>>>   [...]
>>>
>>> This doesn't happen in emacs-27.2.
>>> It happens in emacs-28 compiled with native-comp or not.
>>>
>>> which gio returns /usr/bin/gio.
>>>
>>> Any ideas?
>>
>> Tramp searches for the gio monitor on the remote host. Does it exist there?
>
> Yes, and anyway this happen as well with sudo method on same machine.

More exactly, it seems gio command is correctly extracted in
`tramp-sh-handle-file-notify-add-watch` with
(tramp-get-remote-gio-monitor v) but later in the process filter
(tramp-connection-property-p proc "gio-file-monitor") returns nil.

Thanks.

>>> Thanks.
>>
>> Best regards, Michael.
>>
>>
>> [[End of PGP Encrypted Part]]


-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Wed, 28 Apr 2021 07:39:01 GMT) Full text and rfc822 format available.

Message #17 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Wed, 28 Apr 2021 09:38:27 +0200
[Message part 1 (text/plain, inline)]
Thierry Volpiatto <thievol <at> posteo.net> writes:

>> Hi Michael,

Hi Thierry,

> More exactly, it seems gio command is correctly extracted in
> `tramp-sh-handle-file-notify-add-watch` with
> (tramp-get-remote-gio-monitor v) but later in the process filter
> (tramp-connection-property-p proc "gio-file-monitor") returns nil.

Does the appended patch fixes this?

> Thanks.

Best regards, Michael.

[Message part 2 (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Wed, 28 Apr 2021 11:07:02 GMT) Full text and rfc822 format available.

Message #20 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Wed, 28 Apr 2021 10:56:23 +0000
[Message part 1 (text/plain, inline)]
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Thierry Volpiatto <thievol <at> posteo.net> writes:
>
>>> Hi Michael,
>
> Hi Thierry,
>
>> More exactly, it seems gio command is correctly extracted in
>> `tramp-sh-handle-file-notify-add-watch` with
>> (tramp-get-remote-gio-monitor v) but later in the process filter
>> (tramp-connection-property-p proc "gio-file-monitor") returns nil.
>
> Does the appended patch fixes this?

Partially. No more error but the watcher have no effect like on
emacs-27.
helm-find-files is caching the directories it visits and for each
directory is adding a watcher, for example on emacs-27:

M-x helm-find-files => navigate to /sudo::/home/me/tmp/ directory:

foo.txt
bar.txt
baz.txt

Now from a shell:

touch ~/tmp/test.txt

M-x helm-find-files => navigate to /sudo::/home/me/tmp/ directory:

foo.txt
bar.txt
baz.txt
test.txt

test.txt is not added with emacs-28, that's mean the watcher didn't
notify helm to remove tmp directory from cache.

Thanks.

-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Wed, 28 Apr 2021 11:17:02 GMT) Full text and rfc822 format available.

Message #23 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Wed, 28 Apr 2021 13:16:38 +0200
Thierry Volpiatto <thievol <at> posteo.net> writes:

Hi Thierry,

>> Does the appended patch fixes this?
>
> Partially. No more error but the watcher have no effect like on
> emacs-27.
> helm-find-files is caching the directories it visits and for each
> directory is adding a watcher, for example on emacs-27:
>
> M-x helm-find-files => navigate to /sudo::/home/me/tmp/ directory:
>
> foo.txt
> bar.txt
> baz.txt
>
> Now from a shell:
>
> touch ~/tmp/test.txt
>
> M-x helm-find-files => navigate to /sudo::/home/me/tmp/ directory:
>
> foo.txt
> bar.txt
> baz.txt
> test.txt
>
> test.txt is not added with emacs-28, that's mean the watcher didn't
> notify helm to remove tmp directory from cache.

I need Tramp traces with tramp-verbose set to 10. Please start a fresh
session via "emacs -Q".

You can send the traces direct to me, w/o debbugs.gnu.org in Cc, in
order not to trash the debbugs database and ML.

> Thanks.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Wed, 28 Apr 2021 13:58:01 GMT) Full text and rfc822 format available.

Message #26 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Wed, 28 Apr 2021 15:57:37 +0200
[Message part 1 (text/plain, inline)]
Thierry Volpiatto <thievol <at> posteo.net> 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) # #<process gio>
>
> (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.

[Message part 2 (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Wed, 28 Apr 2021 16:27:01 GMT) Full text and rfc822 format available.

Message #29 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Wed, 28 Apr 2021 18:25:54 +0200
Thierry Volpiatto <thievol <at> posteo.net> writes:

Hi Thierry,

> If it can help here the relevant part of the tramp log from emacs-27:
>
> 17:01:06.548820 tramp-get-file-property (8) # /home/thierry/tmp file-exists-p t
> 17:01:09.974262 tramp-get-file-property (8) # /home/thierry/tmp file-directory-p t
> 17:01:14.119915 tramp-sh-gio-monitor-process-filter (6) # #<process gio>
> /home/thierry/tmp: /home/thierry/tmp/test.txt: created
> /home/thierry/tmp: /home/thierry/tmp/test.txt: changes done
> /home/thierry/tmp: /home/thierry/tmp/test.txt: attributes changed

As you see, there're also local file names.

> 17:01:14.121499 tramp-accept-process-output (10) # gio 0 run nil
> 17:01:14.121681 tramp-handle-file-notify-rm-watch (6) # Kill #<process gio>
> 17:01:14.121981 tramp-file-notify-process-sentinel (5) # Sentinel
> called: `#<process gio>' `processus arrêté
> '
> 17:01:14.122501 tramp-accept-process-output (10) # gio 0 signal nil
> 17:01:14.122652 tramp-handle-file-notify-rm-watch (6) # Kill #<process gio>
> 17:01:14.122948 tramp-sh-gio-monitor-process-filter (10) # Rest string:
>
> 17:01:18.684045 tramp-get-file-property (8) # /home/thierry/tmp file-directory-p undef
>
> As you can see the *rm-watch is called.

Yes. But we don't see why. And I also don't know how this is related to
your problem.

OK, a test. I use the handler from the elisp manual:

--8<---------------cut here---------------start------------->8---
(defun my-notify-callback (event)
  (message "Event %S" event))
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
1. Use Emacs 27

[albinus <at> gandalf ~]$ ~/src/emacs-27/src/emacs

M-: tramp-version
=> "2.4.5.27.2"

M-: (file-notify-add-watch "/ssh:freebsd12:/tmp" '(change attribute-change) 'my-notify-callback)
=> #<process gio>

albinus <at> freebsd12:~ % touch /tmp/test.txt
=> Event (#<process gio> created "/ssh:freebsd12:/tmp/test.txt")

albinus <at> freebsd12:~ % rm /tmp/test.txt
=> Event (#<process gio> deleted "/ssh:freebsd12:/tmp/test.txt")
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
2. Use Emacs 28

[albinus <at> gandalf ~]$ ~/src/emacs/src/emacs

M-: tramp-version
=> "2.5.1-pre"

M-: (file-notify-add-watch "/ssh:freebsd12:/tmp" '(change attribute-change) 'my-notify-callback)
=> #<process gio>

albinus <at> freebsd12:~ % touch /tmp/test.txt
=> Event (#<process gio> created "/ssh:freebsd12:/tmp/test.txt")

albinus <at> freebsd12:~ % rm /tmp/test.txt
=> Event (#<process gio> deleted "/ssh:freebsd12:/tmp/test.txt")
--8<---------------cut here---------------end--------------->8---

Exactly the same events.

> Thanks.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Wed, 28 Apr 2021 17:40:02 GMT) Full text and rfc822 format available.

Message #32 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Wed, 28 Apr 2021 19:39:04 +0200
Thierry Volpiatto <thievol <at> posteo.net> writes:

Hi Thierry,
>>> 17:01:06.548820 tramp-get-file-property (8) # /home/thierry/tmp file-exists-p t
>>> 17:01:09.974262 tramp-get-file-property (8) # /home/thierry/tmp file-directory-p t
>>> 17:01:14.119915 tramp-sh-gio-monitor-process-filter (6) # #<process gio>
>>> /home/thierry/tmp: /home/thierry/tmp/test.txt: created
>>> /home/thierry/tmp: /home/thierry/tmp/test.txt: changes done
>>> /home/thierry/tmp: /home/thierry/tmp/test.txt: attributes changed
>>
>> As you see, there're also local file names.
>
> Yes, I saw this it is why I don't understand how it could work on 27 and
> not on 28.

What exactly does not work on Emacs 28? Events do not arrive? Events
have wrong values?

>>> 17:01:14.121499 tramp-accept-process-output (10) # gio 0 run nil
>>> 17:01:14.121681 tramp-handle-file-notify-rm-watch (6) # Kill #<process gio>
>>> 17:01:14.121981 tramp-file-notify-process-sentinel (5) # Sentinel
>>> called: `#<process gio>' `processus arrêté
>>> '
>>> 17:01:14.122501 tramp-accept-process-output (10) # gio 0 signal nil
>>> 17:01:14.122652 tramp-handle-file-notify-rm-watch (6) # Kill #<process gio>
>>> 17:01:14.122948 tramp-sh-gio-monitor-process-filter (10) # Rest string:
>>>
>>> 17:01:18.684045 tramp-get-file-property (8) # /home/thierry/tmp file-directory-p undef
>>>
>>> As you can see the *rm-watch is called.
>>
>> Yes. But we don't see why.
>
> This is what I would like to know ;-)
>
>> And I also don't know how this is related to your problem.
>
> I am not sure it is related to my problem, I just suspect it is.

Maybe you can set file-notify-debug to t? You will see how events go
around.

>> OK, a test. I use the handler from the elisp manual:
>
> Yes, I already tried similar tests.

So I've lost you. What works, and what not?

> Anyway, perhaps you can push your changes? They are an improvement over
> what is actually in master.

Done.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Wed, 28 Apr 2021 18:33:02 GMT) Full text and rfc822 format available.

Message #35 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Wed, 28 Apr 2021 18:28:54 +0000
[Message part 1 (text/plain, inline)]
Michael Albinus <michael.albinus <at> gmx.de> writes:

> [[PGP Encrypted Part:OK]]
> Thierry Volpiatto <thievol <at> posteo.net> writes:
>
> Hi Thierry,
>>>> 17:01:06.548820 tramp-get-file-property (8) # /home/thierry/tmp file-exists-p t
>>>> 17:01:09.974262 tramp-get-file-property (8) # /home/thierry/tmp file-directory-p t
>>>> 17:01:14.119915 tramp-sh-gio-monitor-process-filter (6) # #<process gio>
>>>> /home/thierry/tmp: /home/thierry/tmp/test.txt: created
>>>> /home/thierry/tmp: /home/thierry/tmp/test.txt: changes done
>>>> /home/thierry/tmp: /home/thierry/tmp/test.txt: attributes changed
>>>
>>> As you see, there're also local file names.
>>
>> Yes, I saw this it is why I don't understand how it could work on 27 and
>> not on 28.
>
> What exactly does not work on Emacs 28?

helm-find-files cache is not updated when something change in a remote
directory.


> Events do not arrive?

Yes.

> Events have wrong values?


>>>> 17:01:14.121499 tramp-accept-process-output (10) # gio 0 run nil
>>>> 17:01:14.121681 tramp-handle-file-notify-rm-watch (6) # Kill #<process gio>
>>>> 17:01:14.121981 tramp-file-notify-process-sentinel (5) # Sentinel
>>>> called: `#<process gio>' `processus arrêté
>>>> '
>>>> 17:01:14.122501 tramp-accept-process-output (10) # gio 0 signal nil
>>>> 17:01:14.122652 tramp-handle-file-notify-rm-watch (6) # Kill #<process gio>
>>>> 17:01:14.122948 tramp-sh-gio-monitor-process-filter (10) # Rest string:
>>>>
>>>> 17:01:18.684045 tramp-get-file-property (8) # /home/thierry/tmp file-directory-p undef
>>>>
>>>> As you can see the *rm-watch is called.
>>>
>>> Yes. But we don't see why.
>>
>> This is what I would like to know ;-)
>>
>>> And I also don't know how this is related to your problem.
>>
>> I am not sure it is related to my problem, I just suspect it is.
>
> Maybe you can set file-notify-debug to t? You will see how events go
> around.
>
>>> OK, a test. I use the handler from the elisp manual:
>>
>> Yes, I already tried similar tests.
>
> So I've lost you. What works, and what not?
>
>> Anyway, perhaps you can push your changes? They are an improvement over
>> what is actually in master.
>
> Done.
>
> Best regards, Michael.
>
>
> [[End of PGP Encrypted Part]]


-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Wed, 28 Apr 2021 18:51:02 GMT) Full text and rfc822 format available.

Message #38 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Wed, 28 Apr 2021 18:47:07 +0000
[Message part 1 (text/plain, inline)]
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Maybe you can set file-notify-debug to t? You will see how events go
> around.

Thanks for this, it helps.

This happen on emacs-27:

;; file-notify-handle-event (file-notify (#<process gio<4>> (changes-done-hint) "/sudo:root <at> IPadS340:/home/thierry/tmp/test.txt" nil) file-notify-callback)
;; file-notify-handle-event (file-notify (#<process gio<4>> (attribute-changed) "/sudo:root <at> IPadS340:/home/thierry/tmp/test.txt" nil) file-notify-callback)

On emacs-28 nothing happen when modifying externally same directory
(tmp).


-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Wed, 28 Apr 2021 18:57:01 GMT) Full text and rfc822 format available.

Message #41 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Wed, 28 Apr 2021 20:56:27 +0200
Thierry Volpiatto <thievol <at> posteo.net> writes:

> This happen on emacs-27:
>
> ;; file-notify-handle-event (file-notify (#<process gio<4>> (changes-done-hint) "/sudo:root <at> IPadS340:/home/thierry/tmp/test.txt" nil) file-notify-callback)
> ;; file-notify-handle-event (file-notify (#<process gio<4>> (attribute-changed) "/sudo:root <at> IPadS340:/home/thierry/tmp/test.txt" nil) file-notify-callback)
>
> On emacs-28 nothing happen when modifying externally same directory
> (tmp).

Strange. Have you tried "M-x tramp-cleanup-all-connections"? Prior to
connecting the remote machine.

Otherwise, I have no idea (it works for me as I have shown). Is there a
chance I could debug, connecting your remote machine?

Otherwise, I would need to write special instrumentations in
tramp-sh-gio-monitor-process-filter just for you.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Thu, 29 Apr 2021 05:49:01 GMT) Full text and rfc822 format available.

Message #44 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Thu, 29 Apr 2021 05:33:08 +0000
[Message part 1 (text/plain, inline)]
Michael Albinus <michael.albinus <at> gmx.de> writes:

> [[PGP Encrypted Part:OK]]
> Thierry Volpiatto <thievol <at> posteo.net> writes:
>
>> This happen on emacs-27:
>>
>> ;; file-notify-handle-event (file-notify (#<process gio<4>> (changes-done-hint) "/sudo:root <at> IPadS340:/home/thierry/tmp/test.txt" nil) file-notify-callback)
>> ;; file-notify-handle-event (file-notify (#<process gio<4>> (attribute-changed) "/sudo:root <at> IPadS340:/home/thierry/tmp/test.txt" nil) file-notify-callback)
>>
>> On emacs-28 nothing happen when modifying externally same directory
>> (tmp).
>
> Strange. Have you tried "M-x tramp-cleanup-all-connections"? Prior to
> connecting the remote machine.

I always start a new emacs session for debugging.

> Otherwise, I have no idea (it works for me as I have shown).

No, it is not the same example, please bear with me, try with same
conditions and with tramp-debug and file-notify-debug set:

1) Install helm

2) open a terminal outside emacs

3) run in emacs helm-find-files and navigate to /sudo::/home/you/tmp/

4) go to the terminal opened in 2) and touch ~/tmp/test.txt

5) go back to emacs and see nothing happened

Now do the same from emacs-27 and see in 5) that an *rm-watch happened.

Here the relevant logs for emacs-28 and emacs-27:

;; Emacs 28
001 07:12:50.967691 tramp-sh-gio-monitor-process-filter (6) # #<process gio<4>>
002 (gio monitor:29342): GLib-GIO-1;33mWARNING0m **: 34m07:12:50.946[0m: Can't find module 'help' specified in GIO_USE_FILE_MONITOR
003 07:12:50.967794 tramp-get-connection-property (7) # gio-file-monitor undef; cache used: nil
004 07:12:50.967879 tramp-set-connection-property (7) # gio-file-monitor undef
005 07:12:54.974248 tramp-get-file-property (8) # /home/thierry/tmp file-directory-p t; inhibit: 10; cache used: t; cached at: 07:12:50
006 07:13:00.401319 tramp-sh-gio-monitor-process-filter (6) # #<process gio<4>>
007 /home/thierry/tmp: /home/thierry/tmp/test.txt: created
008 /home/thierry/tmp: /home/thierry/tmp/test.txt: changes done
009 /home/thierry/tmp: /home/thierry/tmp/test.txt: attributes changed
010 07:13:00.401503 tramp-get-connection-property (7) # gio-file-monitor undef; cache used: nil
011 07:13:00.401656 tramp-sh-gio-monitor-process-filter (10) # Rest string:
012 /home/thierry/tmp: /home/thierry/tmp/test.txt: created
013 /home/thierry/tmp: /home/thierry/tmp/test.txt: changes-done-hint
014 /home/thierry/tmp: /home/thierry/tmp/test.txt: attribute-changed
015 07:13:10.485947 tramp-get-file-property (8) # /home/thierry/tmp file-directory-p undef; inhibit: 10; cache used: nil; cached at: 07:12:50


;; Emacs 27
001 07:21:11.964043 tramp-sh-gio-monitor-process-filter (6) # #<process gio<4>>
002 /home/thierry/tmp: /home/thierry/tmp/test.txt: created
003 /home/thierry/tmp: /home/thierry/tmp/test.txt: changes done
004 /home/thierry/tmp: /home/thierry/tmp/test.txt: attributes changed
005 07:21:11.980001 tramp-accept-process-output (10) # gio<4> 0 run nil
006 07:21:11.980151 tramp-handle-file-notify-rm-watch (6) # Kill #<process gio<4>>
007 07:21:11.980343 tramp-file-notify-process-sentinel (5) # Sentinel called: `#<process gio<4>>' `processus arrêté'
008 07:21:11.980657 tramp-accept-process-output (10) # gio<4> 0 signal nil
009 07:21:11.980747 tramp-handle-file-notify-rm-watch (6) # Kill #<process gio<4>>
010 07:21:11.988139 tramp-sh-gio-monitor-process-filter (10) # Rest string:

You can see that in line 009 in emacs-27 log an *rm-watch happen whereas
in emacs28 it doesn't happen.

> Is there a chance I could debug, connecting your remote machine?

Yes sure, I have just to create an account with an installed emacs28 for
you, but please try first on your side with same recipe.

> Otherwise, I would need to write special instrumentations in
> tramp-sh-gio-monitor-process-filter just for you.
>
> Best regards, Michael.
>
>
> [[End of PGP Encrypted Part]]


-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Thu, 29 Apr 2021 06:13:01 GMT) Full text and rfc822 format available.

Message #47 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Thu, 29 Apr 2021 06:09:48 +0000
[Message part 1 (text/plain, inline)]
Update:

After commenting a block of code in
`tramp-sh-gio-monitor-process-filter` it is now working properly, events
are created, here the diff:

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 4a3072ee346..3f5ec76864b 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -3732,23 +3732,24 @@ Fall back to normal file name handler if no Tramp handler exists."
       (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))))
+         tramp-cache-undefined))
+;;          (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)

Michael Albinus <michael.albinus <at> gmx.de> writes:

> [[PGP Encrypted Part:OK]]
> Thierry Volpiatto <thievol <at> posteo.net> writes:
>
>> This happen on emacs-27:
>>
>> ;; file-notify-handle-event (file-notify (#<process gio<4>> (changes-done-hint) "/sudo:root <at> IPadS340:/home/thierry/tmp/test.txt" nil) file-notify-callback)
>> ;; file-notify-handle-event (file-notify (#<process gio<4>> (attribute-changed) "/sudo:root <at> IPadS340:/home/thierry/tmp/test.txt" nil) file-notify-callback)
>>
>> On emacs-28 nothing happen when modifying externally same directory
>> (tmp).
>
> Strange. Have you tried "M-x tramp-cleanup-all-connections"? Prior to
> connecting the remote machine.
>
> Otherwise, I have no idea (it works for me as I have shown). Is there a
> chance I could debug, connecting your remote machine?
>
> Otherwise, I would need to write special instrumentations in
> tramp-sh-gio-monitor-process-filter just for you.
>
> Best regards, Michael.
>
>
> [[End of PGP Encrypted Part]]


-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Thu, 29 Apr 2021 06:52:02 GMT) Full text and rfc822 format available.

Message #50 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Thu, 29 Apr 2021 06:46:45 +0000
[Message part 1 (text/plain, inline)]
Update2:
More exactly the error occur when setting 'string':

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 4a3072ee346..8885bd55846 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -3748,7 +3748,8 @@ Supported arguments for GIO_USE_FILE_MONITOR environment variable:
            (intern
 	    (format "G%sFileMonitor" (capitalize (match-string 1 string)))))
           (t (throw 'doesnt-work nil))))
-	(setq string (substring string (match-end 0))))
+	;(setq string (substring string (match-end 0)))
+        )
 
       ;; Delete empty lines.
       (setq string (tramp-compat-string-replace "\n\n" "\n" string)

With this commented line events occur as expected.

-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Thu, 29 Apr 2021 07:19:02 GMT) Full text and rfc822 format available.

Message #53 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Thu, 29 Apr 2021 09:17:50 +0200
Thierry Volpiatto <thievol <at> posteo.net> writes:

Hi Thierry,

>> Is there a chance I could debug, connecting your remote machine?
>
> Yes sure, I have just to create an account with an installed emacs28 for
> you, but please try first on your side with same recipe.

Thanks. In case we go this way, you don't need to install a local
Emacs. It would be sufficient for me to have ssh access to a restricted
account on that machine.

For the time being I will see, whether your other messages give me
enough input to improve. Thanks for their analysis anyway!

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Thu, 29 Apr 2021 07:56:02 GMT) Full text and rfc822 format available.

Message #56 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Thu, 29 Apr 2021 07:48:01 +0000
[Message part 1 (text/plain, inline)]
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Thierry Volpiatto <thievol <at> posteo.net> writes:
>
> Hi Thierry,
>
>>> Is there a chance I could debug, connecting your remote machine?
>>
>> Yes sure, I have just to create an account with an installed emacs28 for
>> you, but please try first on your side with same recipe.
>
> Thanks. In case we go this way, you don't need to install a local
> Emacs.

Ok, if needed you will be able to run helm from system install with just
helm -nw from command line without the need of installing anything else.

> It would be sufficient for me to have ssh access to a restricted
> account on that machine.

Ok, let me know when you need it, I will send you an encrypted message
privately with instructions to connect.

> For the time being I will see, whether your other messages give me
> enough input to improve. Thanks for their analysis anyway!

Thanks!

-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Thu, 29 Apr 2021 08:13:01 GMT) Full text and rfc822 format available.

Message #59 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Thu, 29 Apr 2021 10:11:50 +0200
[Message part 1 (text/plain, inline)]
Thierry Volpiatto <thievol <at> posteo.net> writes:

> Update2:
> More exactly the error occur when setting 'string':
>
> diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
> index 4a3072ee346..8885bd55846 100644
> --- a/lisp/net/tramp-sh.el
> +++ b/lisp/net/tramp-sh.el
> @@ -3748,7 +3748,8 @@ Supported arguments for GIO_USE_FILE_MONITOR environment variable:
>             (intern
>  	    (format "G%sFileMonitor" (capitalize (match-string 1 string)))))
>            (t (throw 'doesnt-work nil))))
> -	(setq string (substring string (match-end 0))))
> +	;(setq string (substring string (match-end 0)))
> +        )
>
>        ;; Delete empty lines.
>        (setq string (tramp-compat-string-replace "\n\n" "\n" string)
>
> With this commented line events occur as expected.

So the problem is the match-end call. Here's a patch which might fix
this. In case it doesn't work, pls give me ssh access to your machine. I
would send you my public ssh key for access.

Best regards, Michael.

[Message part 2 (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Thu, 29 Apr 2021 08:48:02 GMT) Full text and rfc822 format available.

Message #62 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Thu, 29 Apr 2021 08:42:57 +0000
[Message part 1 (text/plain, inline)]
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Thierry Volpiatto <thievol <at> posteo.net> writes:
>
>> Update2:
>> More exactly the error occur when setting 'string':
>>
>> diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
>> index 4a3072ee346..8885bd55846 100644
>> --- a/lisp/net/tramp-sh.el
>> +++ b/lisp/net/tramp-sh.el
>> @@ -3748,7 +3748,8 @@ Supported arguments for GIO_USE_FILE_MONITOR environment variable:
>>             (intern
>>  	    (format "G%sFileMonitor" (capitalize (match-string 1 string)))))
>>            (t (throw 'doesnt-work nil))))
>> -	(setq string (substring string (match-end 0))))
>> +	;(setq string (substring string (match-end 0)))
>> +        )
>>
>>        ;; Delete empty lines.
>>        (setq string (tramp-compat-string-replace "\n\n" "\n" string)
>>
>> With this commented line events occur as expected.
>
> So the problem is the match-end call. Here's a patch which might fix
> this.

No, it doesn't fix it, as long as string is set with 
(setq string (substring string (match-end 0))) it doesn't work,
*rm-watch is never called.

> In case it doesn't work, pls give me ssh access to your machine.

Ok will prepare it.

> I would send you my public ssh key for access.

No thanks, PAM login will be enabled.

-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Thu, 29 Apr 2021 10:56:02 GMT) Full text and rfc822 format available.

Message #65 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Thu, 29 Apr 2021 12:55:25 +0200
[Message part 1 (text/plain, inline)]
Hi Thierry,

> It works, and I can reproduce the problem. Now debugging.

With the appended patch, it works for me on your machine. Could you pls check?

Best regards, Michael.

[Message part 2 (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Thu, 29 Apr 2021 11:28:02 GMT) Full text and rfc822 format available.

Message #68 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Thu, 29 Apr 2021 11:26:47 +0000
[Message part 1 (text/plain, inline)]
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Hi Thierry,
>
>> It works, and I can reproduce the problem. Now debugging.
>
> With the appended patch, it works for me on your machine. Could you pls check?

I confirm it works, great! Thanks!

-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Thu, 29 Apr 2021 11:33:01 GMT) Full text and rfc822 format available.

Message #71 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Thu, 29 Apr 2021 11:30:02 +0000
[Message part 1 (text/plain, inline)]
Thierry Volpiatto <thievol <at> posteo.net> writes:

> Michael Albinus <michael.albinus <at> gmx.de> writes:
>
>> Hi Thierry,
>>
>>> It works, and I can reproduce the problem. Now debugging.
>>
>> With the appended patch, it works for me on your machine. Could you pls check?
>
> I confirm it works, great! Thanks!

While we are at it perhaps you can use ansi-color-apply in tramp log
unless it cause performance problems (seems it doesn't)?

-- 
Thierry
[Capture d’écran_2021-04-29_09-40-13.png (image/png, attachment)]
[signature.asc (application/pgp-signature, inline)]

Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Thu, 29 Apr 2021 13:08:01 GMT) Full text and rfc822 format available.

Notification sent to Thierry Volpiatto <thievol <at> posteo.net>:
bug acknowledged by developer. (Thu, 29 Apr 2021 13:08:01 GMT) Full text and rfc822 format available.

Message #76 received at 48067-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: 48067-done <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Thu, 29 Apr 2021 15:07:26 +0200
Thierry Volpiatto <thievol <at> posteo.net> writes:

Hi Thierry,

>>> It works, and I can reproduce the problem. Now debugging.
>>
>> With the appended patch, it works for me on your machine. Could you pls check?
>
> I confirm it works, great! Thanks!

Thanks for the feedback, and for your kind hosting of my tests.

I've pushed to latest changes to master, slightly modified. Closing the bug.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Thu, 29 Apr 2021 13:11:02 GMT) Full text and rfc822 format available.

Message #79 received at 48067 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: 48067 <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Thu, 29 Apr 2021 15:09:52 +0200
Thierry Volpiatto <thievol <at> posteo.net> writes:

Hi Thierry,

> While we are at it perhaps you can use ansi-color-apply in tramp log
> unless it cause performance problems (seems it doesn't)?

No, that's not to idea of Tramp's debug buffer. It is important to see
every single char, also ANSI escape sequences, for debugging. Often, the
problems are hidden there.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48067; Package emacs. (Thu, 29 Apr 2021 13:22:01 GMT) Full text and rfc822 format available.

Message #82 received at 48067-done <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 48067-done <at> debbugs.gnu.org
Subject: Re: bug#48067: 28.0.50; Tramp error: cannot determine gio monitor
Date: Thu, 29 Apr 2021 13:20:37 +0000
[Message part 1 (text/plain, inline)]
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Thierry Volpiatto <thievol <at> posteo.net> writes:
>
> Hi Thierry,
>
>>>> It works, and I can reproduce the problem. Now debugging.
>>>
>>> With the appended patch, it works for me on your machine. Could you pls check?
>>
>> I confirm it works, great! Thanks!
>
> Thanks for the feedback, and for your kind hosting of my tests.
>
> I've pushed to latest changes to master, slightly modified. Closing the bug.

Great! Thanks.

-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 28 May 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 332 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.