unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save
@ 2022-05-03 16:55 Jacob Faibussowitsch
  2022-05-05 11:16 ` Lars Ingebrigtsen
  2022-05-06  8:43 ` Michael Albinus
  0 siblings, 2 replies; 13+ messages in thread
From: Jacob Faibussowitsch @ 2022-05-03 16:55 UTC (permalink / raw)
  To: 55247

[-- Attachment #1: Type: text/plain, Size: 929 bytes --]

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)

[-- Attachment #2: emacs_state.log --]
[-- Type: application/octet-stream, Size: 8394 bytes --]

In GNU Emacs 29.0.50 (build 7, aarch64-apple-darwin21.4.0)
 of 2022-05-03 built on Jacobs-MacBook-Pro.local
Repository revision: 41e946f46e23756b7c732efdf3c5152fa8241dde
Repository branch: master
System Description:  macOS 12.3.1

Configured using:
 'configure --prefix=/Users/jacobfaibussowitsch/soft CC=clang
 CXX=clang++ 'CFLAGS=-O3 -mtune=native -flto=thin -flto-jobs=7
 -std=gnu17 -Wno-unused-command-line-argument -Wno-unknown-pragmas'
 'CXXFLAGS=-O3 -mtune=native -flto=thin -flto-jobs=7 -std=gnu++20
 -Wno-unused-command-line-argument -Wno-unknown-pragmas'
 LDFLAGS=-L/opt/homebrew/lib -C --with-native-compilation --with-gnutls
 --without-x --with-xml2 --with-dbus --with-modules --with-json
 --without-ns --with-jpeg --with-tiff --with-gif --with-png --with-rsvg
 --with-libsystemd --with-cairo --with-zlib --with-toolkit-scroll-bars
 --disable-gcc-warnings --without-compress-install --with-libgmp’

Configured features:
ACL GMP GNUTLS JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE
PDUMPER SQLITE3 THREADS ZLIB

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

Major mode: C++//law

Minor modes in effect:
  midnight-mode: t
  projectile-mode: t
  counsel-mode: t
  ivy-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  auto-compile-on-load-mode: t
  auto-compile-on-save-mode: t
  doom-modeline-mode: t
  subword-mode: t
  tree-sitter-hl-mode: t
  tree-sitter-mode: t
  yas-minor-mode: t
  shell-dirtrack-mode: t
  mouse-wheel-mode: t
  highlight-parentheses-mode: t
  hl-line-mode: t
  ws-butler-mode: t
  filladapt-mode: t
  flyspell-mode: t
  save-place-mode: t
  simpleclip-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  which-key-mode: t
  global-auto-complete-mode: t
  auto-complete-mode: t
  override-global-mode: t
  global-dash-fontify-mode: t
  electric-pair-mode: t
  global-so-long-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  column-number-mode: t
  line-number-mode: t
  auto-fill-function: yas--auto-fill
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  abbrev-mode: t
  hs-minor-mode: t

Load-path shadows:
/Users/jacobfaibussowitsch/.emacs.d/elpa/transient-20220503.1118/transient hides /Users/jacobfaibussowitsch/soft/share/emacs/29.0.50/lisp/transient

Features:
(shadow sort mail-extr emacsbug cursor-sensor mule-util midnight async
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
org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex ol
org-keys oc org-compat org-macs org-loaddefs cal-menu calendar
cal-loaddefs ibuffer-projectile counsel-projectile projectile lisp-mnt
grep ibuf-ext ibuffer ibuffer-loaddefs visual-regexp-steroids
visual-regexp counsel xdg swiper ivy-hydra ivy delsel ivy-faces
ivy-overlay colir magit-submodule magit-obsolete magit-blame magit-stash
magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-tag magit-merge magit-branch magit-reset magit-files magit-refs
magit-status magit magit-repos magit-apply magit-wip magit-log
which-func magit-diff magit-core magit-autorevert autorevert
magit-margin magit-transient magit-process git-commit log-edit message
sendmail yank-media rfc822 mml mml-sec epa derived gnus-util mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader
pcvs-util add-log magit-mode transient magit-git magit-base
magit-section crm compat-27 compat-26 with-editor server smerge-mode
hl-line+ auto-compile packed compat face-remap crux vc-svn vc
doom-modeline doom-modeline-segments doom-modeline-env
doom-modeline-core shrink-path all-the-icons all-the-icons-faces
data-material data-weathericons data-octicons data-fileicons
data-faicons data-alltheicons term/xterm xterm vc-hg vc-git diff-mode
vc-dispatcher header2 lsp-zig lsp-steep lsp-svelte lsp-sqls lsp-yaml
lsp-xml lsp-vimscript lsp-vhdl lsp-volar lsp-vetur lsp-html lsp-verilog
lsp-vala lsp-v lsp-typeprof lsp-ttcn3 lsp-toml lsp-terraform lsp-tex
lsp-sorbet lsp-solargraph lsp-rust lsp-rf lsp-remark lsp-r
lsp-purescript lsp-pylsp lsp-pyls lsp-pwsh lsp-php lsp-perlnavigator
lsp-perl lsp-openscad lsp-ocaml lsp-magik lsp-nix lsp-nim lsp-nginx
lsp-markdown lsp-lua lsp-kotlin lsp-json lsp-javascript lsp-idris
lsp-haxe lsp-groovy lsp-hack lsp-graphql lsp-go lsp-completion
lsp-gdscript lsp-fsharp lsp-fortran lsp-eslint lsp-erlang lsp-emmet
lsp-elixir lsp-elm lsp-dockerfile lsp-dhall lsp-d lsp-css lsp-csharp
gnutls lsp-crystal lsp-cmake lsp-clojure lsp-semantic-tokens lsp-clangd
dom lsp-beancount lsp-bash lsp-ansible lsp-angular lsp-ada
lsp-actionscript lsp-mode lsp-protocol xref spinner network-stream puny
nsm rmc markdown-mode color noutline outline inline imenu ht filenotify
ewoc epg rfc6068 epg-config cap-words superword subword
tree-sitter-langs tree-sitter-langs-build tar-mode arc-mode archive-mode
tree-sitter-hl tree-sitter tree-sitter-load tree-sitter-cli tsc tsc-dyn
tsc-dyn-get dired-aux dired dired-loaddefs tsc-obsolete yasnippet
ppindent cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs tramp-cache tramp-sh tramp tramp-loaddefs
trampver tramp-integration cus-edit pp cus-start cus-load files-x
tramp-compat shell pcomplete parse-time iso8601 time-date ls-lisp
format-spec flycheck find-func flymake-proc flymake project mwheel
compile text-property-search comint ansi-color hideshow
highlight-parentheses hl-line ws-butler filladapt flyspell ispell
saveplace time setup-dashboard dashboard dashboard-widgets image recentf
tree-widget wid-edit ffap thingatpt setup-org setup-maintenance
setup-movelines setup-yasnippet setup-projectile setup-checkers
setup-zop-to-char setup-simpleclip simpleclip setup-tex setup-undo-tree
undo-tree diff queue setup-clang-format setup-avy avy setup-mwim mwim
setup-crux setup-tree-sitter setup-doom-modeline setup-which-key
which-key setup-tramp setup-filladapt setup-ibuffer ibuf-macs
setup-search setup-hydra hydra ring lv setup-tags setup-progmodes
setup-completion auto-complete popup setup-diminish diminish
setup-bindings align setup-magit use-package-delight setup-builtin
edmacro kmacro use-package-diminish use-package-bind-key bind-key
easy-mmode advice setup-utility util f dash s setup-packages
use-package-ensure use-package-core setup-core elec-pair so-long pcase
custom-file jka-compr abyss-theme comp regexp-opt comp-cstr warnings rx
cl-extra help-mode tex-site info tool-bar package browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars
seq gv subr-x byte-opt bytecomp byte-compile cconv cl-loaddefs cl-lib
early-init iso-transl tooltip eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice simple 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 emoji-zwj charscript charprop
case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads kqueue
lcms2 multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 626056 539416)
 (symbols 48 45889 1)
 (strings 32 164648 80190)
 (string-bytes 1 5733648)
 (vectors 16 87419)
 (vector-slots 8 1599134 546914)
 (floats 8 811 1543)
 (intervals 56 6435 1427)
 (buffers 992 17))

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save
  2022-05-03 16:55 bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save Jacob Faibussowitsch
@ 2022-05-05 11:16 ` Lars Ingebrigtsen
  2022-05-05 14:32   ` Manuel Giraud
  2022-05-06  8:43 ` Michael Albinus
  1 sibling, 1 reply; 13+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-05 11:16 UTC (permalink / raw)
  To: Jacob Faibussowitsch; +Cc: 55247

Jacob Faibussowitsch <jacob.fai@gmail.com> writes:

> 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:

[...]

> $ diff file.c file_tmp.c

Changing the timestamp may also trigger the "really edit the buffer"
message.  Have you checked that something isn't altering the timestamp
of the file on the remote system?

> $ 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)

I'm unable to reproduce this problem in Emacs 29.

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





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save
  2022-05-05 11:16 ` Lars Ingebrigtsen
@ 2022-05-05 14:32   ` Manuel Giraud
  2022-05-05 14:42     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 13+ messages in thread
From: Manuel Giraud @ 2022-05-05 14:32 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 55247, Michael Albinus, Jacob Faibussowitsch

Hi all,

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.

Best regards,
-- 
Manuel Giraud





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save
  2022-05-05 14:32   ` Manuel Giraud
@ 2022-05-05 14:42     ` Lars Ingebrigtsen
  2022-05-05 14:50       ` Jacob Faibussowitsch
  2022-05-05 15:05       ` Michael Albinus
  0 siblings, 2 replies; 13+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-05 14:42 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: 55247, Michael Albinus, Jacob Faibussowitsch

Manuel Giraud <manuel@ledu-giraud.fr> 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





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save
  2022-05-05 14:42     ` Lars Ingebrigtsen
@ 2022-05-05 14:50       ` Jacob Faibussowitsch
  2022-05-05 15:05       ` Michael Albinus
  1 sibling, 0 replies; 13+ messages in thread
From: Jacob Faibussowitsch @ 2022-05-05 14:50 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 55247, Michael Albinus, Manuel Giraud

> I'm also getting further errors:

Yes I was just about to mail with the same problems :). FWIW here are the log messages I get

```
Tramp: Checking ‘vc-registered’ for /ssh:<ssh login>:/home/jacob/tmp.c...done
Tramp: Encoding local file ‘/var/folders/9w/7dlszmmn6q1gd5yf3r9n79bc0000gn/T/tramp.luvXdR.c’ using ‘base64-encode-region’...done
Tramp: Decoding remote file ‘/ssh:<ssh login>:/home/jacob/tmp.c’ using ‘base64 -d -i >%s’...done
Wrong type argument: "Wrong type argument", "number-or-marker-p nil"
tramp-error: Wrong type argument: "number-or-marker-p nil”
```

Perhaps related but I also get this rather strange message on C-g:

```
Quit: “"
```

I have not been able to reliably reproduce it unfortunately, but I believe it occurs if you hit C-g after saving the remote buffer.

>> 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.


Glad someone else took the time to bisect, I was not looking forward to it...

Best regards,

Jacob Faibussowitsch
(Jacob Fai - booss - oh - vitch)

> On May 5, 2022, at 09:42, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> 
> Manuel Giraud <manuel@ledu-giraud.fr> 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






^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save
  2022-05-05 14:42     ` Lars Ingebrigtsen
  2022-05-05 14:50       ` Jacob Faibussowitsch
@ 2022-05-05 15:05       ` Michael Albinus
  1 sibling, 0 replies; 13+ messages in thread
From: Michael Albinus @ 2022-05-05 15:05 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 55247, Manuel Giraud, Jacob Faibussowitsch

Lars Ingebrigtsen <larsi@gnus.org> writes:

Hi,

> Manuel Giraud <manuel@ledu-giraud.fr> 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:

I've seen this report, and it is already on my TODO. Just a matter of
available time to work on this.

Shall be fixed latest tomorrow, I hope.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save
  2022-05-03 16:55 bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save Jacob Faibussowitsch
  2022-05-05 11:16 ` Lars Ingebrigtsen
@ 2022-05-06  8:43 ` Michael Albinus
  2022-05-06  9:39   ` Manuel Giraud
  1 sibling, 1 reply; 13+ messages in thread
From: Michael Albinus @ 2022-05-06  8:43 UTC (permalink / raw)
  To: Jacob Faibussowitsch; +Cc: 55247, Manuel Giraud

Jacob Faibussowitsch <jacob.fai@gmail.com> writes:

> Hello,

Hi,

> 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)
> ```

Should be fixed now in master, there was a race condition in clearing
the cache.

Since this is fixed in a macro, all files this macro is used must be
recompiled. So please run

rm lisp/net/tramp*.elc; make

> Best regards,
>
> Jacob Faibussowitsch

Best regards, Michael.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save
  2022-05-06  8:43 ` Michael Albinus
@ 2022-05-06  9:39   ` Manuel Giraud
  2022-05-06  9:53     ` Michael Albinus
  2022-05-06 10:08     ` Lars Ingebrigtsen
  0 siblings, 2 replies; 13+ messages in thread
From: Manuel Giraud @ 2022-05-06  9:39 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 55247, Jacob Faibussowitsch

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

[...]

> Should be fixed now in master, there was a race condition in clearing
> the cache.
>
> Since this is fixed in a macro, all files this macro is used must be
> recompiled. So please run
>
> rm lisp/net/tramp*.elc; make

Hi Michael,

I've just rebuild emacs on current HEAD (with your fix) but I'm still
facing this issue. Would you need tramp trace for this?
-- 
Manuel Giraud





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save
  2022-05-06  9:39   ` Manuel Giraud
@ 2022-05-06  9:53     ` Michael Albinus
  2022-05-06 10:08     ` Lars Ingebrigtsen
  1 sibling, 0 replies; 13+ messages in thread
From: Michael Albinus @ 2022-05-06  9:53 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: 55247, Jacob Faibussowitsch

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

> Hi Michael,

Hi Manuel,

> I've just rebuild emacs on current HEAD (with your fix) but I'm still
> facing this issue. Would you need tramp trace for this?

Yes, pls do. Running "emacs -Q --eval '(setq tramp-verbose 10)'".
I need the cached properties.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save
  2022-05-06  9:39   ` Manuel Giraud
  2022-05-06  9:53     ` Michael Albinus
@ 2022-05-06 10:08     ` Lars Ingebrigtsen
  2022-05-06 11:17       ` Manuel Giraud
  1 sibling, 1 reply; 13+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-06 10:08 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: 55247, Michael Albinus, Jacob Faibussowitsch

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

>> rm lisp/net/tramp*.elc; make
>
> Hi Michael,
>
> I've just rebuild emacs on current HEAD (with your fix) but I'm still
> facing this issue. Would you need tramp trace for this?

Is this after deleting the .elc files?  (Or a "make bootstrap" to make
sure.)

I'm not able to reproduce the problem any longer after Michael's fixes.

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





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save
  2022-05-06 10:08     ` Lars Ingebrigtsen
@ 2022-05-06 11:17       ` Manuel Giraud
  2022-05-06 11:22         ` Michael Albinus
  0 siblings, 1 reply; 13+ messages in thread
From: Manuel Giraud @ 2022-05-06 11:17 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 55247, Michael Albinus, Jacob Faibussowitsch

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Manuel Giraud <manuel@ledu-giraud.fr> writes:
>
>>> rm lisp/net/tramp*.elc; make
>>
>> Hi Michael,
>>
>> I've just rebuild emacs on current HEAD (with your fix) but I'm still
>> facing this issue. Would you need tramp trace for this?
>
> Is this after deleting the .elc files?  (Or a "make bootstrap" to make
> sure.)

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

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





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save
  2022-05-06 11:17       ` Manuel Giraud
@ 2022-05-06 11:22         ` Michael Albinus
  2022-05-06 11:54           ` Manuel Giraud
  0 siblings, 1 reply; 13+ messages in thread
From: Michael Albinus @ 2022-05-06 11:22 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: 55247-done, Lars Ingebrigtsen, Jacob Faibussowitsch

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.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save
  2022-05-06 11:22         ` Michael Albinus
@ 2022-05-06 11:54           ` Manuel Giraud
  0 siblings, 0 replies; 13+ messages in thread
From: Manuel Giraud @ 2022-05-06 11:54 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 55247-done, Lars Ingebrigtsen, Jacob Faibussowitsch

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

[...]

> 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.

(haha I'm dumb). Thanks for the fix *and* this explanation.
Best regards,
-- 
Manuel Giraud





^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-05-06 11:54 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-03 16:55 bug#55247: [29.0.50; TRAMP] Tramp Always Thinks Buffer Changed On Disk After Edit -> Save Jacob Faibussowitsch
2022-05-05 11:16 ` Lars Ingebrigtsen
2022-05-05 14:32   ` Manuel Giraud
2022-05-05 14:42     ` Lars Ingebrigtsen
2022-05-05 14:50       ` Jacob Faibussowitsch
2022-05-05 15:05       ` Michael Albinus
2022-05-06  8:43 ` Michael Albinus
2022-05-06  9:39   ` Manuel Giraud
2022-05-06  9:53     ` Michael Albinus
2022-05-06 10:08     ` Lars Ingebrigtsen
2022-05-06 11:17       ` Manuel Giraud
2022-05-06 11:22         ` Michael Albinus
2022-05-06 11:54           ` Manuel Giraud

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).