From unknown Thu Jun 19 14:02:12 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#23483 <23483@debbugs.gnu.org> To: bug#23483 <23483@debbugs.gnu.org> Subject: Status: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down Reply-To: bug#23483 <23483@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:02:12 +0000 retitle 23483 24.5; cygwin emacs w32 doesn not ask to save files when windo= ws shuts down reassign 23483 emacs submitter 23483 "Strozzi, David J." severity 23483 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Sun May 08 14:18:09 2016 Received: (at submit) by debbugs.gnu.org; 8 May 2016 18:18:09 +0000 Received: from localhost ([127.0.0.1]:43427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1azTHM-0006Hs-N6 for submit@debbugs.gnu.org; Sun, 08 May 2016 14:18:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34035) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1azOpx-00088e-ON for submit@debbugs.gnu.org; Sun, 08 May 2016 09:33:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azOpq-0000LE-9C for submit@debbugs.gnu.org; Sun, 08 May 2016 09:33:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:33939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azOpq-0000L8-65 for submit@debbugs.gnu.org; Sun, 08 May 2016 09:33:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azOpm-0008Db-NI for bug-gnu-emacs@gnu.org; Sun, 08 May 2016 09:33:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azOpg-0000JE-CF for bug-gnu-emacs@gnu.org; Sun, 08 May 2016 09:33:21 -0400 Received: from prdiron-2.llnl.gov ([128.15.143.172]:45314) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azOpf-0000IZ-Rr for bug-gnu-emacs@gnu.org; Sun, 08 May 2016 09:33:16 -0400 X-Attachments: Received: from prdexhub-01-snat.llnl.gov (HELO PRDEXHUB-01.the-lab.llnl.gov) ([128.15.143.213]) by prdiron-2.llnl.gov with ESMTP; 08 May 2016 06:33:13 -0700 Received: from PRDEXMBX-01.the-lab.llnl.gov ([169.254.1.49]) by PRDEXHUB-01.the-lab.llnl.gov ([128.15.143.150]) with mapi id 14.03.0279.002; Sun, 8 May 2016 06:33:13 -0700 From: "Strozzi, David J." To: "bug-gnu-emacs@gnu.org" Subject: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down Thread-Topic: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down Thread-Index: AdGpLiJxFN+uDPStSByfeIIGwNtftg== Date: Sun, 8 May 2016 13:33:11 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [128.15.244.130] Content-Type: multipart/alternative; boundary="_000_B5B0B301BBD57E40B9BEBAEFFE1C3FCE011855D703PRDEXMBX01the_" MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 08 May 2016 14:18:06 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) --_000_B5B0B301BBD57E40B9BEBAEFFE1C3FCE011855D703PRDEXMBX01the_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I am running the Windows 32 native emacs build that is part of cygwin. Running on Windows 7. When I shut down windows (from the Start Menu), emacs does not ask to save edited files. That means I lose work unless I remember to separately quit emancs manually before shutting down. Not a big deal, but can it be fixed? Thanks. In GNU Emacs 24.5.1 (x86_64-unknown-cygwin) of 2015-06-23 on desktop-new Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --srcdir=3D/home/kbrown/src/cygemacs/emacs-24.5-2.x86_64/src/emacs-24.5 --prefix=3D/usr --exec-prefix=3D/usr --localstatedir=3D/var --sysconfdir=3D= /etc --docdir=3D/usr/share/doc/emacs --htmldir=3D/usr/share/doc/emacs/html -C --with-w32 'CFLAGS=3D-ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=3D/home/kbrown/src/cygemacs/emacs-24.5-2.x86_64/build=3D= /usr/src/debug/emacs-24.5-2 -fdebug-prefix-map=3D/home/kbrown/src/cygemacs/emacs-24.5-2.x86_64/src/emac= s-24.5=3D/usr/src/debug/emacs-24.5-2' CPPFLAGS=3D LDFLAGS=3D' Important settings: locale-coding-system: nil Major mode: Fundamental Minor modes in effect: recentf-mode: t global-linum-mode: t linum-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Encrypting /cygdrive/c/Users/strozzi2/.cacher/mellon_16feb16_llnl.gpg... [3= times] Wrote /cygdrive/c/Users/strozzi2/.cacher/mellon_16feb16_llnl.gpg [2 times] Mark saved where search started Mark set [2 times] Mark saved where search started Mark set Read-Only mode enabled Mark saved where search started Mark set [2 times] Read-Only mode disabled Load-path shadows: /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/tex-site hides /usr= /share/emacs/site-lisp/tex-site /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/auctex hides /usr/s= hare/emacs/site-lisp/auctex /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/toolbar-x hides /us= r/share/emacs/site-lisp/auctex/toolbar-x /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/texmathp hides /usr= /share/emacs/site-lisp/auctex/texmathp /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/tex hides /usr/shar= e/emacs/site-lisp/auctex/tex /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/tex-style hides /us= r/share/emacs/site-lisp/auctex/tex-style /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/tex-mik hides /usr/= share/emacs/site-lisp/auctex/tex-mik /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/tex-jp hides /usr/s= hare/emacs/site-lisp/auctex/tex-jp /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/tex-info hides /usr= /share/emacs/site-lisp/auctex/tex-info /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/tex-font hides /usr= /share/emacs/site-lisp/auctex/tex-font /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/tex-fold hides /usr= /share/emacs/site-lisp/auctex/tex-fold /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/tex-buf hides /usr/= share/emacs/site-lisp/auctex/tex-buf /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/tex-bar hides /usr/= share/emacs/site-lisp/auctex/tex-bar /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/prv-emacs hides /us= r/share/emacs/site-lisp/auctex/prv-emacs /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/preview hides /usr/= share/emacs/site-lisp/auctex/preview /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/plain-tex hides /us= r/share/emacs/site-lisp/auctex/plain-tex /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/multi-prompt hides = /usr/share/emacs/site-lisp/auctex/multi-prompt /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/latex hides /usr/sh= are/emacs/site-lisp/auctex/latex /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/font-latex hides /u= sr/share/emacs/site-lisp/auctex/font-latex /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/context hides /usr/= share/emacs/site-lisp/auctex/context /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/context-nl hides /u= sr/share/emacs/site-lisp/auctex/context-nl /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/context-en hides /u= sr/share/emacs/site-lisp/auctex/context-en /cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.88.8/bib-cite hides /usr= /share/emacs/site-lisp/auctex/bib-cite Features: (shadow sort mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils epa-file epa derived epg browse-url url-util url-parse auth-source eieio byte-opt bytecomp byte-compile cl-extra cconv eieio-core gnus-util mm-util help-fns mail-prsvr password-cache url-vars misearch multi-isearch info tex-site package epg-config setup-cygwin cygwin-mount ange-ftp comint ansi-color ring edmacro kmacro recentf tree-widget wid-edit cl-loaddefs cl-lib easymenu server linum time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify w32 multi-tty emacs) Memory information: ((conses 16 305859 30398) (symbols 48 25221 0) (miscs 40 328 390) (strings 32 37818 9581) (string-bytes 1 1002066) (vectors 16 35864) (vector-slots 8 1129009 101036) (floats 8 81 576) (intervals 56 515 375) (buffers 960 14)) --_000_B5B0B301BBD57E40B9BEBAEFFE1C3FCE011855D703PRDEXMBX01the_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I am running the Windows 32 native emacs build that = is part of cygwin.

Running on Windows 7.  When I shut down windows= (from the Start Menu),

emacs does not ask to save edited files.  That = means I lose work unless

I remember to separately quit emancs manually before= shutting down.

 

Not a big deal, but can it be fixed?

 

Thanks.

 

In GNU Emacs 24.5.1 (x86_64-unknown-cygwin)

of 2015-06-23 on desktop-new

Windowing system distributor `Microsoft Corp.', vers= ion 6.1.7601

Configured using:

`configure

--srcdir=3D/home/kbrown/src/cygemacs/emacs-24.5-2.x8= 6_64/src/emacs-24.5

--prefix=3D/usr --exec-prefix=3D/usr --localstatedir= =3D/var --sysconfdir=3D/etc

--docdir=3D/usr/share/doc/emacs --htmldir=3D/usr/sha= re/doc/emacs/html -C

--with-w32 'CFLAGS=3D-ggdb -O2 -pipe -Wimplicit-func= tion-declaration

-fdebug-prefix-map=3D/home/kbrown/src/cygemacs/emacs= -24.5-2.x86_64/build=3D/usr/src/debug/emacs-24.5-2

-fdebug-prefix-map=3D/home/kbrown/src/cygemacs/emacs= -24.5-2.x86_64/src/emacs-24.5=3D/usr/src/debug/emacs-24.5-2'

CPPFLAGS=3D LDFLAGS=3D'

 

Important settings:

  locale-coding-system: nil

 

Major mode: Fundamental

 

Minor modes in effect:

  recentf-mode: t

  global-linum-mode: t

  linum-mode: t

  tooltip-mode: t

  electric-indent-mode: t

  mouse-wheel-mode: t

  menu-bar-mode: t

  file-name-shadow-mode: t

  global-font-lock-mode: t

  font-lock-mode: t

  blink-cursor-mode: t

  auto-composition-mode: t

  auto-encryption-mode: t

  auto-compression-mode: t

  line-number-mode: t

  transient-mark-mode: t

 

Recent messages:

Encrypting /cygdrive/c/Users/strozzi2/.cacher/mellon= _16feb16_llnl.gpg... [3 times]

Wrote /cygdrive/c/Users/strozzi2/.cacher/mellon_16fe= b16_llnl.gpg [2 times]

Mark saved where search started

Mark set [2 times]

Mark saved where search started

Mark set

Read-Only mode enabled

Mark saved where search started

Mark set [2 times]

Read-Only mode disabled

 

Load-path shadows:

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/tex-site hides /usr/share/emacs/site-lisp/tex-site

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/auctex hides /usr/share/emacs/site-lisp/auctex

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/toolbar-x hides /usr/share/emacs/site-lisp/auctex/toolbar-x<= /p>

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/texmathp hides /usr/share/emacs/site-lisp/auctex/texmathp

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/tex hides /usr/share/emacs/site-lisp/auctex/tex

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/tex-style hides /usr/share/emacs/site-lisp/auctex/tex-style<= /p>

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/tex-mik hides /usr/share/emacs/site-lisp/auctex/tex-mik

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/tex-jp hides /usr/share/emacs/site-lisp/auctex/tex-jp

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/tex-info hides /usr/share/emacs/site-lisp/auctex/tex-info

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/tex-font hides /usr/share/emacs/site-lisp/auctex/tex-font

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/tex-fold hides /usr/share/emacs/site-lisp/auctex/tex-fold

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/tex-buf hides /usr/share/emacs/site-lisp/auctex/tex-buf

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/tex-bar hides /usr/share/emacs/site-lisp/auctex/tex-bar

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/prv-emacs hides /usr/share/emacs/site-lisp/auctex/prv-emacs<= /p>

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/preview hides /usr/share/emacs/site-lisp/auctex/preview

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/plain-tex hides /usr/share/emacs/site-lisp/auctex/plain-tex<= /p>

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/multi-prompt hides /usr/share/emacs/site-lisp/auctex/multi-prompt<= /o:p>

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/latex hides /usr/share/emacs/site-lisp/auctex/latex

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/font-latex hides /usr/share/emacs/site-lisp/auctex/font-latex

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/context hides /usr/share/emacs/site-lisp/auctex/context

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/context-nl hides /usr/share/emacs/site-lisp/auctex/context-nl

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/context-en hides /usr/share/emacs/site-lisp/auctex/context-en

/cygdrive/c/Users/strozzi2/.emacs.d/elpa/auctex-11.8= 8.8/bib-cite hides /usr/share/emacs/site-lisp/auctex/bib-cite

 

Features:

(shadow sort mail-extr emacsbug message format-spec = rfc822 mml mml-sec

mm-decode mm-bodies mm-encode mail-parse rfc2231 mai= labbrev gmm-utils

mailheader sendmail rfc2047 rfc2045 ietf-drums mail-= utils epa-file epa

derived epg browse-url url-util url-parse auth-sourc= e eieio byte-opt

bytecomp byte-compile cl-extra cconv eieio-core gnus= -util mm-util

help-fns mail-prsvr password-cache url-vars misearch= multi-isearch info

tex-site package epg-config setup-cygwin cygwin-moun= t ange-ftp comint

ansi-color ring edmacro kmacro recentf tree-widget w= id-edit cl-loaddefs

cl-lib easymenu server linum time-date tooltip elect= ric uniquify

ediff-hook vc-hooks lisp-float-type mwheel w32-commo= n-fns disp-table

w32-win w32-vars tool-bar dnd fontset image regexp-o= pt fringe

tabulated-list newcomment lisp-mode prog-mode regist= er page menu-bar

rfn-eshadow timer select scroll-bar mouse jit-lock f= ont-lock syntax

facemenu font-core frame cham georgian utf-8-lang mi= sc-lang vietnamese

tibetan thai tai-viet lao korean japanese hebrew gre= ek romanian slovak

czech european ethiopic indian cyrillic chinese case= -table epa-hook

jka-cmpr-hook help simple abbrev minibuffer nadvice = loaddefs button

faces cus-face macroexp files text-properties overla= y sha1 md5 base64

format env code-pages mule custom widget hashtable-p= rint-readable

backquote make-network-process dbusbind gfilenotify = w32 multi-tty emacs)

 

Memory information:

((conses 16 305859 30398)

(symbols 48 25221 0)

(miscs 40 328 390)

(strings 32 37818 9581)

(string-bytes 1 1002066)

(vectors 16 35864)

(vector-slots 8 1129009 101036)

(floats 8 81 576)

(intervals 56 515 375)

(buffers 960 14))

--_000_B5B0B301BBD57E40B9BEBAEFFE1C3FCE011855D703PRDEXMBX01the_-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 08 14:40:53 2016 Received: (at 23483) by debbugs.gnu.org; 8 May 2016 18:40:53 +0000 Received: from localhost ([127.0.0.1]:43444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1azTdN-0006pB-J6 for submit@debbugs.gnu.org; Sun, 08 May 2016 14:40:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43357) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1azTdL-0006oz-Ud for 23483@debbugs.gnu.org; Sun, 08 May 2016 14:40:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azTdC-0001cA-Jg for 23483@debbugs.gnu.org; Sun, 08 May 2016 14:40:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azTdC-0001c4-Dv; Sun, 08 May 2016 14:40:42 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3199 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1azTdA-00047a-FY; Sun, 08 May 2016 14:40:41 -0400 Date: Sun, 08 May 2016 21:40:40 +0300 Message-Id: <83a8k0e6l3.fsf@gnu.org> From: Eli Zaretskii To: "Strozzi\, David J." In-reply-to: (strozzi2@llnl.gov) Subject: Re: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.1 (-------) X-Debbugs-Envelope-To: 23483 Cc: 23483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.1 (-------) > From: "Strozzi, David J." > Date: Sun, 8 May 2016 13:33:11 +0000 > > I am running the Windows 32 native emacs build that is part of cygwin. > Running on Windows 7. When I shut down windows (from the Start Menu), > emacs does not ask to save edited files. That means I lose work unless > I remember to separately quit emancs manually before shutting down. > Not a big deal, but can it be fixed? If someone submits patches that listen to system shutdown messages, and auto-save files when they arrive, this can be fixed. Patches welcome. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue May 10 11:16:55 2016 Received: (at 23483) by debbugs.gnu.org; 10 May 2016 15:16:55 +0000 Received: from localhost ([127.0.0.1]:46021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b09P5-0000P5-MV for submit@debbugs.gnu.org; Tue, 10 May 2016 11:16:55 -0400 Received: from limerock03.mail.cornell.edu ([128.84.13.243]:47964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b09P3-0000Or-Po for 23483@debbugs.gnu.org; Tue, 10 May 2016 11:16:54 -0400 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock03.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id u4AFGkQp032141; Tue, 10 May 2016 11:16:46 -0400 Received: from [192.168.1.5] (mta-68-175-148-36.twcny.rr.com [68.175.148.36] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id u4AFGhLd010911 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 10 May 2016 11:16:44 -0400 Subject: Re: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down To: Eli Zaretskii , "Strozzi, David J." References: <83a8k0e6l3.fsf@gnu.org> From: Ken Brown Message-ID: Date: Tue, 10 May 2016 11:16:44 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <83a8k0e6l3.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-PMX-Cornell-Gauge: Gauge=XXXXX X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: 23483 Cc: 23483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.4 (----) On 5/8/2016 2:40 PM, Eli Zaretskii wrote: >> From: "Strozzi, David J." >> Date: Sun, 8 May 2016 13:33:11 +0000 >> >> I am running the Windows 32 native emacs build that is part of cygwin. >> Running on Windows 7. When I shut down windows (from the Start Menu), >> emacs does not ask to save edited files. That means I lose work unless >> I remember to separately quit emancs manually before shutting down. >> Not a big deal, but can it be fixed? > > If someone submits patches that listen to system shutdown messages, > and auto-save files when they arrive, this can be fixed. Patches > welcome. I asked about this on the Cygwin list (https://www.cygwin.com/ml/cygwin/2016-05/msg00085.html). Based on the response I got, I tried the following, which seems to work: diff --git a/src/w32fns.c b/src/w32fns.c index ede8f6b..705b978 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -4795,6 +4795,9 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) my_post_msg (&wmsg, hwnd, msg, wParam, lParam); return 0; + case WM_ENDSESSION: + terminate_due_to_signal (SIGTERM, 0); + case WM_WINDOWPOSCHANGING: /* Don't restrict the sizing of any kind of frames. If the window manager doesn't, there's no reason to do it ourselves. */ Ken From debbugs-submit-bounces@debbugs.gnu.org Tue May 10 12:32:37 2016 Received: (at 23483) by debbugs.gnu.org; 10 May 2016 16:32:37 +0000 Received: from localhost ([127.0.0.1]:46096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0AaK-0002Ad-Pw for submit@debbugs.gnu.org; Tue, 10 May 2016 12:32:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0AaJ-0002AS-Ms for 23483@debbugs.gnu.org; Tue, 10 May 2016 12:32:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0AaA-0006Wv-Gr for 23483@debbugs.gnu.org; Tue, 10 May 2016 12:32:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0AaA-0006WU-EO; Tue, 10 May 2016 12:32:26 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2898 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b0Aa6-0004im-Qh; Tue, 10 May 2016 12:32:24 -0400 Date: Tue, 10 May 2016 19:32:26 +0300 Message-Id: <83y47hc1r9.fsf@gnu.org> From: Eli Zaretskii To: Ken Brown In-reply-to: (message from Ken Brown on Tue, 10 May 2016 11:16:44 -0400) Subject: Re: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down References: <83a8k0e6l3.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.1 (-------) X-Debbugs-Envelope-To: 23483 Cc: strozzi2@llnl.gov, 23483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.1 (-------) > Cc: 23483@debbugs.gnu.org > From: Ken Brown > Date: Tue, 10 May 2016 11:16:44 -0400 > > > If someone submits patches that listen to system shutdown messages, > > and auto-save files when they arrive, this can be fixed. Patches > > welcome. > > I asked about this on the Cygwin list (https://www.cygwin.com/ml/cygwin/2016-05/msg00085.html). Based on the response I got, I tried the following, which seems to work: > > diff --git a/src/w32fns.c b/src/w32fns.c > index ede8f6b..705b978 100644 > --- a/src/w32fns.c > +++ b/src/w32fns.c > @@ -4795,6 +4795,9 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) > my_post_msg (&wmsg, hwnd, msg, wParam, lParam); > return 0; > > + case WM_ENDSESSION: > + terminate_due_to_signal (SIGTERM, 0); > + Thanks. However, w32_wnd_proc runs in a separate thread, so I don't think you can safely call terminate_due_to_signal from there, because the latter will call Lisp. IOW, the above can crash in "interesting" ways. What I think we need to do instead is send a message to the main thread that will produce a special event, and then bind that event to kill-emacs (probably in special-event-map). From debbugs-submit-bounces@debbugs.gnu.org Thu May 12 09:58:07 2016 Received: (at 23483) by debbugs.gnu.org; 12 May 2016 13:58:07 +0000 Received: from localhost ([127.0.0.1]:49106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0r7u-0004Jw-SO for submit@debbugs.gnu.org; Thu, 12 May 2016 09:58:07 -0400 Received: from limerock04.mail.cornell.edu ([128.84.13.244]:56465) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0r7t-0004JS-Bg for 23483@debbugs.gnu.org; Thu, 12 May 2016 09:58:05 -0400 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock04.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id u4CDvxnM002844; Thu, 12 May 2016 09:57:59 -0400 Received: from [192.168.1.3] (mta-68-175-148-36.twcny.rr.com [68.175.148.36] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id u4CDvvwK024950 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 12 May 2016 09:57:58 -0400 Subject: Re: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down To: Eli Zaretskii References: <83a8k0e6l3.fsf@gnu.org> <83y47hc1r9.fsf@gnu.org> From: Ken Brown Message-ID: <86773dca-93da-e643-74df-a80cafcbf716@cornell.edu> Date: Thu, 12 May 2016 09:57:58 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <83y47hc1r9.fsf@gnu.org> Content-Type: multipart/mixed; boundary="------------CAEB524CA94C1283CFB04E19" X-PMX-Cornell-Gauge: Gauge=XXXXX X-Spam-Score: -3.7 (---) X-Debbugs-Envelope-To: 23483 Cc: strozzi2@llnl.gov, 23483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.7 (---) This is a multi-part message in MIME format. --------------CAEB524CA94C1283CFB04E19 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 5/10/2016 12:32 PM, Eli Zaretskii wrote: > What I think we need to do instead is send a message to the main > thread that will produce a special event, and then bind that event to > kill-emacs (probably in special-event-map). Thanks. My attempt to implement this is attached. Ken --------------CAEB524CA94C1283CFB04E19 Content-Type: text/plain; charset=UTF-8; name="endsession.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="endsession.patch" diff --git a/src/keyboard.c b/src/keyboard.c index 92d5c30..fe04b3f 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3893,6 +3893,16 @@ kbd_buffer_get_event (KBOARD **kbp, kbd_fetch_ptr = event + 1; } #endif + +#ifdef HAVE_NTGUI + else if (event->kind == END_SESSION_EVENT) + { + /* Make an event (end-session). */ + obj = list1 (Qend_session); + kbd_fetch_ptr = event + 1; + } +#endif + #if defined (HAVE_X11) || defined (HAVE_NTGUI) \ || defined (HAVE_NS) else if (event->kind == ICONIFY_EVENT) @@ -10984,6 +10994,7 @@ syms_of_keyboard (void) #ifdef HAVE_NTGUI DEFSYM (Qlanguage_change, "language-change"); + DEFSYM (Qend_session, "end-session"); #endif #ifdef HAVE_DBUS @@ -11758,6 +11769,10 @@ keys_of_keyboard (void) initial_define_lispy_key (Vspecial_event_map, "delete-frame", "handle-delete-frame"); +#ifdef HAVE_NTGUI + initial_define_lispy_key (Vspecial_event_map, "end-session", + "kill-emacs"); +#endif initial_define_lispy_key (Vspecial_event_map, "ns-put-working-text", "ns-put-working-text"); initial_define_lispy_key (Vspecial_event_map, "ns-unput-working-text", diff --git a/src/termhooks.h b/src/termhooks.h index d21d6ce..ff74d99 100644 --- a/src/termhooks.h +++ b/src/termhooks.h @@ -158,6 +158,9 @@ enum event_kind SELECTION_CLEAR_EVENT, /* Another X client cleared our selection. */ BUFFER_SWITCH_EVENT, /* A process filter has switched buffers. */ DELETE_WINDOW_EVENT, /* An X client said "delete this window". */ +#ifdef HAVE_NTGUI + END_SESSION_EVENT, /* The user is logging out or shutting down. */ +#endif MENU_BAR_EVENT, /* An event generated by the menu bar. The frame_or_window field's cdr holds the Lisp-level event value. diff --git a/src/w32fns.c b/src/w32fns.c index ede8f6b..7a1f84a 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -4795,6 +4795,11 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) my_post_msg (&wmsg, hwnd, msg, wParam, lParam); return 0; + case WM_ENDSESSION: + my_post_msg (&wmsg, hwnd, msg, wParam, lParam); + /* If we return, the process will be terminated immediately. */ + sleep (1000); + case WM_WINDOWPOSCHANGING: /* Don't restrict the sizing of any kind of frames. If the window manager doesn't, there's no reason to do it ourselves. */ diff --git a/src/w32term.c b/src/w32term.c index 74ea6b5..72e1245 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -5260,6 +5260,10 @@ w32_read_socket (struct terminal *terminal, } break; + case WM_ENDSESSION: + inev.kind = END_SESSION_EVENT; + break; + case WM_INITMENU: f = x_window_to_frame (dpyinfo, msg.msg.hwnd); --------------CAEB524CA94C1283CFB04E19-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 12 12:56:52 2016 Received: (at 23483) by debbugs.gnu.org; 12 May 2016 16:56:52 +0000 Received: from localhost ([127.0.0.1]:49225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0tuu-0001oD-K1 for submit@debbugs.gnu.org; Thu, 12 May 2016 12:56:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0tus-0001o0-Fb for 23483@debbugs.gnu.org; Thu, 12 May 2016 12:56:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0tuk-0007Pe-B0 for 23483@debbugs.gnu.org; Thu, 12 May 2016 12:56:45 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0tuk-0007PZ-8N; Thu, 12 May 2016 12:56:42 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3509 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b0tuc-0005l5-UF; Thu, 12 May 2016 12:56:41 -0400 Date: Thu, 12 May 2016 19:56:44 +0300 Message-Id: <83shxn9pv7.fsf@gnu.org> From: Eli Zaretskii To: Ken Brown In-reply-to: <86773dca-93da-e643-74df-a80cafcbf716@cornell.edu> (message from Ken Brown on Thu, 12 May 2016 09:57:58 -0400) Subject: Re: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down References: <83a8k0e6l3.fsf@gnu.org> <83y47hc1r9.fsf@gnu.org> <86773dca-93da-e643-74df-a80cafcbf716@cornell.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23483 Cc: strozzi2@llnl.gov, 23483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > Cc: strozzi2@llnl.gov, 23483@debbugs.gnu.org > From: Ken Brown > Date: Thu, 12 May 2016 09:57:58 -0400 > > On 5/10/2016 12:32 PM, Eli Zaretskii wrote: > > What I think we need to do instead is send a message to the main > > thread that will produce a special event, and then bind that event to > > kill-emacs (probably in special-event-map). > > Thanks. My attempt to implement this is attached. Thanks. Did you try this when some of the buffers have unsaved changes? I'm thinking about questions Emacs might ask then. If that is not a problem, feel free to commit to master. From debbugs-submit-bounces@debbugs.gnu.org Thu May 12 15:58:33 2016 Received: (at 23483-done) by debbugs.gnu.org; 12 May 2016 19:58:33 +0000 Received: from localhost ([127.0.0.1]:49355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0wki-0000qi-Tc for submit@debbugs.gnu.org; Thu, 12 May 2016 15:58:33 -0400 Received: from limerock03.mail.cornell.edu ([128.84.13.243]:59849) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0wkh-0000qW-H3 for 23483-done@debbugs.gnu.org; Thu, 12 May 2016 15:58:31 -0400 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock03.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id u4CJwPRq003846; Thu, 12 May 2016 15:58:25 -0400 Received: from [192.168.1.3] (mta-68-175-148-36.twcny.rr.com [68.175.148.36] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id u4CJwNjg009689 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 12 May 2016 15:58:24 -0400 Subject: Re: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down To: Eli Zaretskii References: <83a8k0e6l3.fsf@gnu.org> <83y47hc1r9.fsf@gnu.org> <86773dca-93da-e643-74df-a80cafcbf716@cornell.edu> <83shxn9pv7.fsf@gnu.org> From: Ken Brown Message-ID: Date: Thu, 12 May 2016 15:58:24 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <83shxn9pv7.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Cornell-Gauge: Gauge=XXXXX X-Spam-Score: -3.7 (---) X-Debbugs-Envelope-To: 23483-done Cc: 23483-done@debbugs.gnu.org, strozzi2@llnl.gov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.7 (---) On 5/12/2016 12:56 PM, Eli Zaretskii wrote: > Did you try this when some of the buffers have unsaved changes? I'm > thinking about questions Emacs might ask then. Yes, I tried it. Emacs just auto-saved the changed buffers with no questions asked. > If that is not a problem, feel free to commit to master. Done as git commit 6435f41. Thanks for your help, Eli. Closing. Ken From debbugs-submit-bounces@debbugs.gnu.org Fri May 13 12:22:53 2016 Received: (at 23483-done) by debbugs.gnu.org; 13 May 2016 16:22:53 +0000 Received: from localhost ([127.0.0.1]:50148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b1FrY-00078b-PV for submit@debbugs.gnu.org; Fri, 13 May 2016 12:22:53 -0400 Received: from prdiron-1.llnl.gov ([128.15.143.171]:55327) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b1FrX-00078I-0y for 23483-done@debbugs.gnu.org; Fri, 13 May 2016 12:22:51 -0400 X-Attachments: Received: from prdexhub-01-snat.llnl.gov (HELO PRDEXHUB-01.the-lab.llnl.gov) ([128.15.143.213]) by prdiron-1.llnl.gov with ESMTP; 13 May 2016 09:22:44 -0700 Received: from PRDEXMBX-01.the-lab.llnl.gov ([169.254.1.49]) by PRDEXHUB-01.the-lab.llnl.gov ([128.15.143.150]) with mapi id 14.03.0279.002; Fri, 13 May 2016 09:22:44 -0700 From: "Strozzi, David J." To: Ken Brown , Eli Zaretskii Subject: RE: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down Thread-Topic: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down Thread-Index: AQHRqs8DvUJmerh/90ex5TTIJKtDlp+yXYvDgANuwwD//7yqFYAAqAsAgADgGgA= Date: Fri, 13 May 2016 16:22:43 +0000 Message-ID: References: <83a8k0e6l3.fsf@gnu.org> <83y47hc1r9.fsf@gnu.org> <86773dca-93da-e643-74df-a80cafcbf716@cornell.edu> <83shxn9pv7.fsf@gnu.org> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.252.171.18] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -3.7 (---) X-Debbugs-Envelope-To: 23483-done Cc: "23483-done@debbugs.gnu.org" <23483-done@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.7 (---) Hi folks, Thanks for addressing this! The usual behavior of windows programs on rest= art or shutdown is to ask the user to save unsaved files, rather than savin= g them silently. The current patch to save automatically is better than lo= sing data, but prompting the user I think would be the best thing. Or even= having emacs abort the shutdown and give a message like "emacs cancelled s= hutdown due to unsaved files." Dave -----Original Message----- From: Ken Brown [mailto:kbrown@cornell.edu]=20 Sent: Thursday, May 12, 2016 12:58 PM To: Eli Zaretskii Cc: Strozzi, David J.; 23483-done@debbugs.gnu.org Subject: Re: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files = when windows shuts down On 5/12/2016 12:56 PM, Eli Zaretskii wrote: > Did you try this when some of the buffers have unsaved changes? I'm=20 > thinking about questions Emacs might ask then. Yes, I tried it. Emacs just auto-saved the changed buffers with no questio= ns asked. > If that is not a problem, feel free to commit to master. Done as git commit 6435f41. Thanks for your help, Eli. Closing. Ken From debbugs-submit-bounces@debbugs.gnu.org Fri May 13 13:46:56 2016 Received: (at 23483) by debbugs.gnu.org; 13 May 2016 17:46:56 +0000 Received: from localhost ([127.0.0.1]:50204 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b1HAt-0002fK-IU for submit@debbugs.gnu.org; Fri, 13 May 2016 13:46:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58853) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b1HAs-0002f7-8U for 23483@debbugs.gnu.org; Fri, 13 May 2016 13:46:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b1HAi-0006v2-Jg for 23483@debbugs.gnu.org; Fri, 13 May 2016 13:46:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41458) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1HAi-0006uo-G2; Fri, 13 May 2016 13:46:44 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4995 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b1HAf-0003Fw-Ez; Fri, 13 May 2016 13:46:43 -0400 Date: Fri, 13 May 2016 20:46:47 +0300 Message-Id: <83inyh97g8.fsf@gnu.org> From: Eli Zaretskii To: "Strozzi\, David J." In-reply-to: (strozzi2@llnl.gov) Subject: Re: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down References: <83a8k0e6l3.fsf@gnu.org> <83y47hc1r9.fsf@gnu.org> <86773dca-93da-e643-74df-a80cafcbf716@cornell.edu> <83shxn9pv7.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23483 Cc: kbrown@cornell.edu, 23483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: "Strozzi, David J." > CC: "23483-done@debbugs.gnu.org" <23483-done@debbugs.gnu.org> > Date: Fri, 13 May 2016 16:22:43 +0000 > > Thanks for addressing this! The usual behavior of windows programs on restart or shutdown is to ask the user to save unsaved files, rather than saving them silently. The current patch to save automatically is better than losing data, but prompting the user I think would be the best thing. Or even having emacs abort the shutdown and give a message like "emacs cancelled shutdown due to unsaved files." The patch doesn't save files automatically, it performs "auto-save", which saves the modified buffers into separate files, from which you can restore afterwards. FWIW, I don't see why asking the user would be better. From debbugs-submit-bounces@debbugs.gnu.org Fri May 13 14:05:29 2016 Received: (at 23483) by debbugs.gnu.org; 13 May 2016 18:05:29 +0000 Received: from localhost ([127.0.0.1]:50209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b1HSr-00036j-F7 for submit@debbugs.gnu.org; Fri, 13 May 2016 14:05:29 -0400 Received: from limerock04.mail.cornell.edu ([128.84.13.244]:54134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b1HSp-00036W-9X for 23483@debbugs.gnu.org; Fri, 13 May 2016 14:05:27 -0400 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock04.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id u4DI5Jwp020113; Fri, 13 May 2016 14:05:19 -0400 Received: from [192.168.1.5] (mta-68-175-148-36.twcny.rr.com [68.175.148.36] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id u4DI5H1Z026609 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 13 May 2016 14:05:19 -0400 Subject: Re: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down To: Eli Zaretskii , "Strozzi, David J." References: <83a8k0e6l3.fsf@gnu.org> <83y47hc1r9.fsf@gnu.org> <86773dca-93da-e643-74df-a80cafcbf716@cornell.edu> <83shxn9pv7.fsf@gnu.org> <83inyh97g8.fsf@gnu.org> From: Ken Brown Message-ID: <9f6d64ef-03d3-d8d6-2afe-2465ee27dc91@cornell.edu> Date: Fri, 13 May 2016 14:05:22 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <83inyh97g8.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Cornell-Gauge: Gauge=XXXXX X-Spam-Score: -3.7 (---) X-Debbugs-Envelope-To: 23483 Cc: 23483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.7 (---) On 5/13/2016 1:46 PM, Eli Zaretskii wrote: >> From: "Strozzi, David J." >> CC: "23483-done@debbugs.gnu.org" <23483-done@debbugs.gnu.org> >> Date: Fri, 13 May 2016 16:22:43 +0000 >> >> Thanks for addressing this! The usual behavior of windows programs on restart or shutdown is to ask the user to save unsaved files, rather than saving them silently. The current patch to save automatically is better than losing data, but prompting the user I think would be the best thing. Or even having emacs abort the shutdown and give a message like "emacs cancelled shutdown due to unsaved files." > > The patch doesn't save files automatically, it performs "auto-save", > which saves the modified buffers into separate files, from which you > can restore afterwards. > > FWIW, I don't see why asking the user would be better. Agreed. I would just add that the next time you try to edit one of the affected files, Emacs will warn you that there's an auto-save file and will suggest that you consider running M-x recover-this-file. Ken From debbugs-submit-bounces@debbugs.gnu.org Fri May 13 16:39:38 2016 Received: (at 23483) by debbugs.gnu.org; 13 May 2016 20:39:38 +0000 Received: from localhost ([127.0.0.1]:50267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b1Js1-0001n9-O7 for submit@debbugs.gnu.org; Fri, 13 May 2016 16:39:37 -0400 Received: from prdiron-1.llnl.gov ([128.15.143.171]:5333) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b1Jrz-0001mp-VS for 23483@debbugs.gnu.org; Fri, 13 May 2016 16:39:36 -0400 X-Attachments: Received: from prdexhub-04-snat.llnl.gov (HELO PRDEXHUB-04.the-lab.llnl.gov) ([128.15.143.216]) by prdiron-1.llnl.gov with ESMTP; 13 May 2016 13:02:09 -0700 Received: from PRDEXMBX-01.the-lab.llnl.gov ([169.254.1.49]) by PRDEXHUB-04.the-lab.llnl.gov ([128.15.143.143]) with mapi id 14.03.0279.002; Fri, 13 May 2016 13:02:09 -0700 From: "Strozzi, David J." To: Eli Zaretskii Subject: RE: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down Thread-Topic: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down Thread-Index: AQHRqs8DvUJmerh/90ex5TTIJKtDlp+yXYvDgANuwwD//7yqFYAAqAsAgADgGgCAABg4s4AAAvug Date: Fri, 13 May 2016 20:02:08 +0000 Message-ID: References: <83a8k0e6l3.fsf@gnu.org> <83y47hc1r9.fsf@gnu.org> <86773dca-93da-e643-74df-a80cafcbf716@cornell.edu> <83shxn9pv7.fsf@gnu.org> <83inyh97g8.fsf@gnu.org> In-Reply-To: <83inyh97g8.fsf@gnu.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.252.171.18] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -3.7 (---) X-Debbugs-Envelope-To: 23483 Cc: "kbrown@cornell.edu" , "23483@debbugs.gnu.org" <23483@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.7 (---) Hmmm, this doesn't sound like a great fix. It's really a "failsafe", but n= ot what Windows users expect. When you open the file again, how will you k= now that there's another auto-save file? Will emacs tell you? What if you= open the file in another program? Or you're editing source code / script = and then make / run it, nothing will tell you about the auto-saved file. Perhaps better is to have emacs simply abort a restart / shutdown and requi= re the user to manually close emacs. If it doesn't behave like other windo= ws programs (query user to save unsaved files), then we have to remember em= acs is special. You could have a parameter for whether emacs aborts a wind= ows shutdown, default to yes, and then users and consciously shut it off if= they want. Dave -----Original Message----- From: Eli Zaretskii [mailto:eliz@gnu.org]=20 Sent: Friday, May 13, 2016 10:47 AM To: Strozzi, David J. Cc: kbrown@cornell.edu; 23483@debbugs.gnu.org Subject: Re: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files = when windows shuts down > From: "Strozzi, David J." > CC: "23483-done@debbugs.gnu.org" <23483-done@debbugs.gnu.org> > Date: Fri, 13 May 2016 16:22:43 +0000 >=20 > Thanks for addressing this! The usual behavior of windows programs on re= start or shutdown is to ask the user to save unsaved files, rather than sav= ing them silently. The current patch to save automatically is better than = losing data, but prompting the user I think would be the best thing. Or ev= en having emacs abort the shutdown and give a message like "emacs cancelled= shutdown due to unsaved files." The patch doesn't save files automatically, it performs "auto-save", which = saves the modified buffers into separate files, from which you can restore = afterwards. FWIW, I don't see why asking the user would be better. From debbugs-submit-bounces@debbugs.gnu.org Fri May 13 19:12:28 2016 Received: (at 23483) by debbugs.gnu.org; 13 May 2016 23:12:28 +0000 Received: from localhost ([127.0.0.1]:50335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b1MFw-0007Ft-NF for submit@debbugs.gnu.org; Fri, 13 May 2016 19:12:28 -0400 Received: from limerock01.mail.cornell.edu ([128.84.13.241]:55100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b1MFu-0007Ff-Uv for 23483@debbugs.gnu.org; Fri, 13 May 2016 19:12:27 -0400 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock01.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id u4DNCImO008856; Fri, 13 May 2016 19:12:18 -0400 Received: from [192.168.1.3] (mta-68-175-148-36.twcny.rr.com [68.175.148.36] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id u4DNCDOY020164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 13 May 2016 19:12:14 -0400 Subject: Re: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down To: "Strozzi, David J." , Eli Zaretskii References: <83a8k0e6l3.fsf@gnu.org> <83y47hc1r9.fsf@gnu.org> <86773dca-93da-e643-74df-a80cafcbf716@cornell.edu> <83shxn9pv7.fsf@gnu.org> <83inyh97g8.fsf@gnu.org> From: Ken Brown Message-ID: <8f6dd645-859e-a03a-2e5c-3a119b453b0e@cornell.edu> Date: Fri, 13 May 2016 19:12:14 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Cornell-Gauge: Gauge=XXXXX X-Spam-Score: -3.7 (---) X-Debbugs-Envelope-To: 23483 Cc: "23483@debbugs.gnu.org" <23483@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.7 (---) On 5/13/2016 4:02 PM, Strozzi, David J. wrote: > Hmmm, this doesn't sound like a great fix. It's really a "failsafe", but not what Windows users expect. When you open the file again, how will you know that there's another auto-save file? Will emacs tell you? What if you open the file in another program? Or you're editing source code / script and then make / run it, nothing will tell you about the auto-saved file. > > Perhaps better is to have emacs simply abort a restart / shutdown and require the user to manually close emacs. If it doesn't behave like other windows programs (query user to save unsaved files), then we have to remember emacs is special. You could have a parameter for whether emacs aborts a windows shutdown, default to yes, and then users and consciously shut it off if they want. I'm not convinced that this is better. But as an experiment, I decided to see if I could make emacs do what you want by having a system shutdown trigger 'save-buffers-kill-emacs' instead of 'kill-emacs'. What happened was that Windows complained that emacs was preventing it from shutting down, and it gave me the choice of shutting down anyway or canceling the shutdown. I chose the latter, at which point I was faced with a non-responsive emacs that had to be killed. I don't have any further ideas. Ken From debbugs-submit-bounces@debbugs.gnu.org Sat May 14 03:23:19 2016 Received: (at 23483) by debbugs.gnu.org; 14 May 2016 07:23:19 +0000 Received: from localhost ([127.0.0.1]:50400 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b1Tux-00026n-4T for submit@debbugs.gnu.org; Sat, 14 May 2016 03:23:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b1Tuu-00026a-TR for 23483@debbugs.gnu.org; Sat, 14 May 2016 03:23:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b1Tum-0005cq-Jw for 23483@debbugs.gnu.org; Sat, 14 May 2016 03:23:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1Tum-0005cm-Ge; Sat, 14 May 2016 03:23:08 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1397 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b1Tty-00056a-Pe; Sat, 14 May 2016 03:23:07 -0400 Date: Sat, 14 May 2016 10:22:34 +0300 Message-Id: <83eg9585ol.fsf@gnu.org> From: Eli Zaretskii To: "Strozzi\, David J." In-reply-to: (strozzi2@llnl.gov) Subject: Re: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down References: <83a8k0e6l3.fsf@gnu.org> <83y47hc1r9.fsf@gnu.org> <86773dca-93da-e643-74df-a80cafcbf716@cornell.edu> <83shxn9pv7.fsf@gnu.org> <83inyh97g8.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23483 Cc: kbrown@cornell.edu, 23483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: "Strozzi, David J." > CC: "kbrown@cornell.edu" , "23483@debbugs.gnu.org" > <23483@debbugs.gnu.org> > Date: Fri, 13 May 2016 20:02:08 +0000 > > Hmmm, this doesn't sound like a great fix. It's really a "failsafe", but not what Windows users expect. Windows users expect that a program either asks or silently does The Right Thing. Emacs will now do the latter. I don't see why we should emulate annoying behavior of programs that insist on asking. I have always hated to answer gobs of these questions when I restart a busy system. Most of those questions are redundant anyway, e.g., if I change the size of a column in an Excel spreadsheet. > When you open the file again, how will you know that there's another auto-save file? Will emacs tell you? Yes, Emacs will tell you the file has auto-saved changes, and will propose a command to restore them. > What if you open the file in another program? Or you're editing source code / script and then make / run it, nothing will tell you about the auto-saved file. But the system didn't just go down on its own, at least that's not what happens frequently. _You_ shut it down, so why won't you restore the files after it comes up (or save them before you shut down) in the first place? It makes very little sense to me. > Perhaps better is to have emacs simply abort a restart / shutdown and require the user to manually close emacs. No, this is even worse. When I want to restart my system, I want it to come up quickly enough, and I frequently turn to other things while it restarts. > If it doesn't behave like other windows programs (query user to save unsaved files), then we have to remember emacs is special. You could have a parameter for whether emacs aborts a windows shutdown, default to yes, and then users and consciously shut it off if they want. The feature that got coded is a safety feature, a kind of fire escape. Normally, you are expected to shut down Emacs before you turn off the system. For a "fire escape", having an option that controls it makes no sense to me, because safety features should be always active. From debbugs-submit-bounces@debbugs.gnu.org Sat May 14 03:56:40 2016 Received: (at 23483) by debbugs.gnu.org; 14 May 2016 07:56:41 +0000 Received: from localhost ([127.0.0.1]:50418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b1URE-0002uf-L7 for submit@debbugs.gnu.org; Sat, 14 May 2016 03:56:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50763) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b1URC-0002uQ-M4 for 23483@debbugs.gnu.org; Sat, 14 May 2016 03:56:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b1UR3-00039U-I8 for 23483@debbugs.gnu.org; Sat, 14 May 2016 03:56:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1UR3-00039O-Ez; Sat, 14 May 2016 03:56:29 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1461 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b1UR1-00078U-Hv; Sat, 14 May 2016 03:56:28 -0400 Date: Sat, 14 May 2016 10:56:42 +0300 Message-Id: <8360uh843p.fsf@gnu.org> From: Eli Zaretskii To: Ken Brown In-reply-to: <8f6dd645-859e-a03a-2e5c-3a119b453b0e@cornell.edu> (message from Ken Brown on Fri, 13 May 2016 19:12:14 -0400) Subject: Re: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down References: <83a8k0e6l3.fsf@gnu.org> <83y47hc1r9.fsf@gnu.org> <86773dca-93da-e643-74df-a80cafcbf716@cornell.edu> <83shxn9pv7.fsf@gnu.org> <83inyh97g8.fsf@gnu.org> <8f6dd645-859e-a03a-2e5c-3a119b453b0e@cornell.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23483 Cc: strozzi2@llnl.gov, 23483@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > Cc: "23483@debbugs.gnu.org" <23483@debbugs.gnu.org> > From: Ken Brown > Date: Fri, 13 May 2016 19:12:14 -0400 > > > Perhaps better is to have emacs simply abort a restart / shutdown and require the user to manually close emacs. If it doesn't behave like other windows programs (query user to save unsaved files), then we have to remember emacs is special. You could have a parameter for whether emacs aborts a windows shutdown, default to yes, and then users and consciously shut it off if they want. > > I'm not convinced that this is better. But as an experiment, I decided > to see if I could make emacs do what you want by having a system > shutdown trigger 'save-buffers-kill-emacs' instead of 'kill-emacs'. > What happened was that Windows complained that emacs was preventing it > from shutting down, and it gave me the choice of shutting down anyway or > canceling the shutdown. I chose the latter, at which point I was faced > with a non-responsive emacs that had to be killed. > > I don't have any further ideas. AFAIK, doing what David wants is tricky technically (because our message pump runs in a separate thread, which cannot run Lisp), and is IMO not important enough for us to try getting out of our way. Like I said, having to answer all those questions always annoys me. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat May 14 16:02:19 2016 Received: (at 23483) by debbugs.gnu.org; 14 May 2016 20:02:19 +0000 Received: from localhost ([127.0.0.1]:51732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b1flQ-0006Ok-3e for submit@debbugs.gnu.org; Sat, 14 May 2016 16:02:19 -0400 Received: from prdiron-2.llnl.gov ([128.15.143.172]:42039) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b1flO-0006OY-Kf for 23483@debbugs.gnu.org; Sat, 14 May 2016 16:02:15 -0400 X-Attachments: Received: from prdexhub-01-snat.llnl.gov (HELO PRDEXHUB-01.the-lab.llnl.gov) ([128.15.143.213]) by prdiron-2.llnl.gov with ESMTP; 14 May 2016 13:02:08 -0700 Received: from PRDEXMBX-01.the-lab.llnl.gov ([169.254.1.49]) by PRDEXHUB-01.the-lab.llnl.gov ([128.15.143.150]) with mapi id 14.03.0279.002; Sat, 14 May 2016 13:02:08 -0700 From: "Strozzi, David J." To: Eli Zaretskii Subject: RE: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down Thread-Topic: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files when windows shuts down Thread-Index: AQHRqs8DvUJmerh/90ex5TTIJKtDlp+yXYvDgANuwwD//7yqFYAAqAsAgADgGgCAABg4s4AAAvuggADhHX2AANDwqA== Date: Sat, 14 May 2016 20:02:08 +0000 Message-ID: References: <83a8k0e6l3.fsf@gnu.org> <83y47hc1r9.fsf@gnu.org> <86773dca-93da-e643-74df-a80cafcbf716@cornell.edu> <83shxn9pv7.fsf@gnu.org> <83inyh97g8.fsf@gnu.org> , <83eg9585ol.fsf@gnu.org> In-Reply-To: <83eg9585ol.fsf@gnu.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [128.15.245.15] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -3.7 (---) X-Debbugs-Envelope-To: 23483 Cc: "kbrown@cornell.edu" , "23483@debbugs.gnu.org" <23483@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.7 (---) Hi,=0A= =0A= I appreciate your viewpoint, and am glad the current improvement was made. = You should feel free to close this issue and move on, but let me just say:= =0A= =0A= When _you_ quit a windows program, it asks you to save changes. Emacs does= this too, when you quit with C-x C-c. or click on the X in the upper-right= corner of the window. When _Windows_ closes a program as part of restart = / shutdown / logout, it behaves the same way. Except for emacs. Maybe thi= s is what I find unsettling: "I quit the program" and "Windows quits the pr= ogram" behave the same way for all programs I use, except emacs.=0A= =0A= So, what would you think about emacs doing C-x C-c when windows tells it to= quit?=0A= =0A= The advantage of the typical Windows-shutdown behavior is I can tell window= s to shut down, and each program will prompt me if anything's changed, else= is silently quits. Much faster than me manually switching to and quitting= every program.=0A= =0A= Dave=0A= =0A= ________________________________________=0A= From: Eli Zaretskii [eliz@gnu.org]=0A= Sent: Saturday, May 14, 2016 12:22 AM=0A= To: Strozzi, David J.=0A= Cc: kbrown@cornell.edu; 23483@debbugs.gnu.org=0A= Subject: Re: bug#23483: 24.5; cygwin emacs w32 doesn not ask to save files = when windows shuts down=0A= =0A= > From: "Strozzi, David J." =0A= > CC: "kbrown@cornell.edu" , "23483@debbugs.gnu.org"=0A= > <23483@debbugs.gnu.org>=0A= > Date: Fri, 13 May 2016 20:02:08 +0000=0A= >=0A= > Hmmm, this doesn't sound like a great fix. It's really a "failsafe", but= not what Windows users expect.=0A= =0A= Windows users expect that a program either asks or silently does The=0A= Right Thing. Emacs will now do the latter. I don't see why we should=0A= emulate annoying behavior of programs that insist on asking. I have=0A= always hated to answer gobs of these questions when I restart a busy=0A= system. Most of those questions are redundant anyway, e.g., if I=0A= change the size of a column in an Excel spreadsheet.=0A= =0A= > When you open the file again, how will you know that there's another auto= -save file? Will emacs tell you?=0A= =0A= Yes, Emacs will tell you the file has auto-saved changes, and will=0A= propose a command to restore them.=0A= =0A= > What if you open the file in another program? Or you're editing source co= de / script and then make / run it, nothing will tell you about the auto-sa= ved file.=0A= =0A= But the system didn't just go down on its own, at least that's not=0A= what happens frequently. _You_ shut it down, so why won't you restore=0A= the files after it comes up (or save them before you shut down) in the=0A= first place? It makes very little sense to me.=0A= =0A= > Perhaps better is to have emacs simply abort a restart / shutdown and req= uire the user to manually close emacs.=0A= =0A= No, this is even worse. When I want to restart my system, I want it=0A= to come up quickly enough, and I frequently turn to other things while=0A= it restarts.=0A= =0A= > If it doesn't behave like other windows programs (query user to save unsa= ved files), then we have to remember emacs is special. You could have a pa= rameter for whether emacs aborts a windows shutdown, default to yes, and th= en users and consciously shut it off if they want.=0A= =0A= The feature that got coded is a safety feature, a kind of fire escape.=0A= Normally, you are expected to shut down Emacs before you turn off the=0A= system. For a "fire escape", having an option that controls it makes=0A= no sense to me, because safety features should be always active.=0A= From unknown Thu Jun 19 14:02:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 12 Jun 2016 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator