--- Begin Message ---
Subject: |
[29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save |
Date: |
Tue, 3 May 2022 11:55:40 -0500 |
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
Description: Binary data
--- End Message ---
--- Begin Message ---
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Version: 29.1
Manuel Giraud <manuel@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.
--- End Message ---