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

Previous Next

Package: emacs;

Reported by: Jacob Faibussowitsch <jacob.fai <at> gmail.com>

Date: Tue, 3 May 2022 16:56:01 UTC

Severity: normal

Tags: moreinfo

Fixed in version 29.1

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#55247: closed ([29.0.50; TRAMP] Tramp Always Thinks Buffer
 Changed On Disk After Edit -> Save)
Date: Fri, 06 May 2022 11:23:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 06 May 2022 13:22:50 +0200
with message-id <87czgqj46t.fsf <at> gmx.de>
and subject line Re: bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save
has caused the debbugs.gnu.org bug report #55247,
regarding [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
55247: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55247
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jacob Faibussowitsch <jacob.fai <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After
 Edit -> Save
Date: Tue, 3 May 2022 11:55:40 -0500
[Message part 3 (text/plain, inline)]
Hello,

Note: anything between angled brackets “< >” is not literal, but rather a description.

Problem:

Any time I edit and save a remote buffer over tramp, I get

```
<file name> changed on disk; really edit the buffer? (y, n, r or C-h)
```

The next time I try to edit the file. I know for a fact that the file has not changed, as I have compared copies of the file:

1. 
```
$ cp remote/file.c remote/file_tmp.c
```
2. Make a change in `file.c`, save, revert it, and save again (prompted each time with “buffer changed on disk”).
3. 
```
$ diff file.c file_tmp.c
```

And they are identical.

Reproduce:

1. 
```
$ emacs -Q /ssh:<ssh alias>:path/to/file
```
2. Change something
3. C-x C-s
4. Try to change something else
5.
```
<file name> changed on disk; really edit the buffer? (y, n, r or C-h)
```

Best regards,

Jacob Faibussowitsch
(Jacob Fai - booss - oh - vitch)
[emacs_state.log (application/octet-stream, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Michael Albinus <michael.albinus <at> gmx.de>
To: Manuel Giraud <manuel <at> ledu-giraud.fr>
Cc: 55247-done <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>,
 Jacob Faibussowitsch <jacob.fai <at> gmail.com>
Subject: Re: bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed
 On Disk After Edit -> Save
Date: Fri, 06 May 2022 13:22:50 +0200
Version: 29.1

Manuel Giraud <manuel <at> ledu-giraud.fr> writes:

Hi Manuel,

> Sorry my bad. It works after a "make bootstrap". Thanks Michael!

Thanks for confirmation, I'm closing the bug.

> But how come emacs does not install the new .elc for a freshly patch .el
> with a classical "make && make install"?

I've patched tramp-skeleton-write-region, a macro in tramp.el. This file
has been recompiled.

However, in your use case the function tramp-sh-handle-write-region of
file tramp-sh.el is called, which uses that macro. Since tramp-sh.el
hasn't been recompiled, the old (erroneous) macro definition was still
used.

Best regards, Michael.


This bug report was last modified 3 years and 16 days ago.

Previous Next


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