Hej!
I try to upgrade emacs from "GNU Emacs 29.4 (build 1,
x86_64-w64-mingw32) of 2025-02-01"
to "GNU Emacs 31.1 (build 2, x86_64-w64-mingw32) of 2026-09-09"
I am using two test files s:/wp/test.boj and s:/wp/test_ny.boj with the
same content.
I have updated emacs by running pacman -S mingw-w64-ucrt-x86_64-emacs.
With the new version of emacs I can not save the edited file.
I am using: Operativsystemets namn: Microsoft Windows 11 Pro,
Version:10.0.26300 version 26300
This is the file I have used to collect information about my problem: ======
(insert(getenv "HOME")) C:\Users\bojoh\AppData\Roaming
Init file c:/Users/bojoh/AppData/Roaming/.emacs.d/init.el
(insert (format "\n = %S" (file-accessible-directory-p
(file-name-directory "c:/Users/bojoh/AppData/Roaming/.emacs.d/init.el"))))
= t
(insert (format "\n = %S %S %S" (user-login-name) (user-real-login-name)
(user-full-name)))
= "bo" "bo" ""
(insert "= " (buffer-file-name))= s:/wp/test.boj
(insert (format "\n = %s %s executable= %s %s %s"
(file-exists-p (buffer-file-name))
(file-readable-p (buffer-file-name))
(file-executable-p (buffer-file-name))
(file-writable-p (buffer-file-name))
(file-accessible-directory-p (file-name-directory
buffer-file-name))
(file-ownership-preserved-p (buffer-file-name))
))
= t t executable= nil t t
(insert (format "\n= %s" (file-attributes (buffer-file-name) 'string)))
= (nil 1 bo Ingen (27335 19606 0 0) (27335 19606 0 0) (27335 19606 0 0)
2896 -rw-rw-rw- t 3377699720529097 3155901136)
Editing s:/wp/test_ny.boj (which is a copy of this file)
using GNU Emacs 31.1 (build 2, x86_64-w64-mingw32) of 2026-09-09
doing
(toggle-debug-on-error)
and saving the file gives the content of buffers gives the following:
(switch-to-buffer "*Backtrace*" nil 'force-same-window)
*Backtrace*
Debugger entered--Lisp error: (file-error "Write error" "Bad file
descriptor" "s:/wp/test_ny.boj")
write-region(nil nil "s:/wp/test_ny.boj" nil t "s:/wp/test_ny.boj")
basic-save-buffer-2()
basic-save-buffer-1()
basic-save-buffer(t)
save-buffer(1)
funcall-interactively(save-buffer 1)
command-execute(save-buffer)
(switch-to-buffer "*Message*" nil 'force-same-window)
*Message*
Start init-file c:/Users/bojoh/AppData/Roaming/.emacs.d/init.el
Loading c:/Users/bojoh/AppData/Roaming/.emacs.d/recentf...done
Cleaning up the recentf list...done (0 removed)
[yas] Prepared just-in-time loading of snippets successfully.
../../Users/bojoh/AppData/Roaming/.emacs.d/init.el: Warning: ‘defadvice’
is an obsolete macro (as of 30.1); use ‘advice-add’ or ‘define-advice’
End init-file c:/Users/bojoh/AppData/Roaming/.emacs.d/init.el.
For information about GNU Emacs and the GNU system, type C-h C-a.
*** Emacs loaded in 1.14 seconds with 11 garbage collections.
Debug on Error enabled globally
t
Saving file s:/wp/test_ny.boj...
Cannot write backup file; backing up in ~/.emacs.d/%backup%~
Entering debugger...
Auto-saving...
(switch-to-buffer "*Warnings*" nil 'force-same-window)
*Warnings*
Error (auto-save): Auto-saving test_ny.boj: Opening output file: No such
file or directory, s:/wp/#test_ny.boj#
============= END file
What can I do to solve the problem.
Best regards Bo Johansson