Eli Zaretskii writes: >> From: Spencer Baugh >> Cc: dmitry@gutov.dev, 66993@debbugs.gnu.org >> Date: Thu, 09 Nov 2023 13:01:09 -0500 >> >> Eli Zaretskii writes: >> > Please show the result of this change on what Emacs prints in batch >> > mode when this error is signaled. >> >> Before: >> >> $ ./src/emacs -Q --batch --eval '(write-region "foo" nil "~/file")' >> /home/sbaugh/file locked by sbaugh@igm-qw... (pid 3781848): (s, q, p, ?)? >> >> Error: error ("Cannot resolve lock conflict in batch mode") >> mapbacktrace(#f(compiled-function (evald func args flags) #)) >> debug-early-backtrace() >> debug-early(error (error "Cannot resolve lock conflict in batch mode")) >> signal(error ("Cannot resolve lock conflict in batch mode")) >> error("Cannot resolve lock conflict in batch mode") >> ask-user-about-lock("/home/sbaugh/file" "sbaugh@igm-qws-u22796a (pid 3781848)") >> write-region("foo" nil "~/file") >> eval((write-region "foo" nil "~/file") t) >> command-line-1(("--eval" "(write-region \"foo\" nil \"~/file\")")) >> command-line() >> normal-top-level() >> Cannot resolve lock conflict in batch mode >> >> >> After: >> >> $ ./src/emacs -Q --batch --eval '(write-region "foo" nil "~/file")' >> /home/sbaugh/file locked by sbaugh@igm-qw... (pid 3781848): (s, q, p, ?)? >> >> Error: file-locked ("/home/sbaugh/file" "sbaugh@igm-qws-u22796a (pid 3781848)") >> mapbacktrace(#f(compiled-function (evald func args flags) #)) >> debug-early-backtrace() >> debug-early(error (file-locked "/home/sbaugh/file" "sbaugh@igm-qws-u22796a (pid 3781848)")) >> signal(file-locked ("/home/sbaugh/file" "sbaugh@igm-qws-u22796a (pid 3781848)")) >> ask-user-about-lock("/home/sbaugh/file" "sbaugh@igm-qws-u22796a (pid 3781848)") >> write-region("foo" nil "~/file") >> eval((write-region "foo" nil "~/file") t) >> command-line-1(("--eval" "(write-region \"foo\" nil \"~/file\")")) >> command-line() >> normal-top-level() >> /home/sbaugh/file: sbaugh@igm-qws-u22796a (pid 3781848) > > Thanks, that's what I thought: this loses information. The "Cannot > resolve lock conflict in batch mode" part is important, since it > explains the "file-locked" part. So please include the missing text > in the list passed to 'signal' as its DATA argument, so as not to lose > this explanation. OK, how about this? Which makes Emacs print: Error: file-locked ("/home/sbaugh/file" "sbaugh@earth (pid 1852838)" "Cannot resolve lock conflict in batch mode") mapbacktrace(#f(compiled-function (evald func args flags) #)) debug-early-backtrace() debug-early(error (file-locked "/home/sbaugh/file" "sbaugh@earth (pid 1852838)" "Cannot resolve lock conflict in batch mode")) signal(file-locked ("/home/sbaugh/file" "sbaugh@earth (pid 1852838)" "Cannot resolve lock conflict in batch mode")) ask-user-about-lock("/home/sbaugh/file" "sbaugh@earth (pid 1852838)") write-region("foo" nil "~/file") eval((write-region "foo" nil "~/file") t) command-line-1(("--eval" "(write-region \"foo\" nil \"~/file\")")) command-line() normal-top-level() /home/sbaugh/file: sbaugh@earth (pid 1852838), Cannot resolve lock conflict in batch mode