Subject: bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 05 May 2022 16:42:36 +0200

Manuel Giraud <[email-masked]> writes:

> I'm also affected by this rather annoying bug when editing a file over
> TRAMP. FWIW, I've just bisected it to this patch 47fe7a5983.

Sorry; I was testing with an Emacs that was a couple days old.  With the
current trunk, I can indeed reproduce the problem.  I'm also getting
further errors:

Debugger entered--Lisp error: (wrong-type-argument "number-or-marker-p nil")
  signal(wrong-type-argument ("number-or-marker-p nil"))
  tramp-error((tramp-file-name "ssh" nil nil "stories" nil "/tmp/foo" nil) wrong-type-argument "number-or-marker-p nil")
  tramp-signal-hook-function(wrong-type-argument (number-or-marker-p nil))
  tramp-sh-handle-write-region(nil nil "/ssh:stories:/tmp/foo" nil t "/ssh:stories:/tmp/foo" nil)
  apply(tramp-sh-handle-write-region (nil nil "/ssh:stories:/tmp/foo" nil t "/ssh:stories:/tmp/foo" nil))
  tramp-sh-file-name-handler(write-region nil nil "/ssh:stories:/tmp/foo" nil t "/ssh:stories:/tmp/foo" nil)
  apply(tramp-sh-file-name-handler write-region (nil nil "/ssh:stories:/tmp/foo" nil t "/ssh:stories:/tmp/foo" nil))
  tramp-file-name-handler(write-region nil nil "/ssh:stories:/tmp/foo" nil t "/ssh:stories:/tmp/foo" nil)
  write-region(nil nil "/ssh:stories:/tmp/foo" nil t "/ssh:stories:/tmp/foo")
  basic-save-buffer-2()
  basic-save-buffer-1()
  basic-save-buffer(t)
  save-buffer(1)

This is on Debian/bookworm writing to a different Debian/bookworm
machine, if that makes a difference.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no