all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Exit hooks not run at logout on w32
       [not found]             ` <44A3A2DE.4040507@gnu.org>
@ 2006-06-29 14:52               ` Lennart Borgman
  2006-06-29 15:00                 ` David Kastrup
  0 siblings, 1 reply; 12+ messages in thread
From: Lennart Borgman @ 2006-06-29 14:52 UTC (permalink / raw)
  Cc: emacs-pretest-bug, Emacs Devel

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

Jason Rumney wrote:
> Lennart Borgman wrote:
>> Thanks. I did a post_msg and it works as I want it now. My concern 
>> was that data was lost on reboots and logouts (that has happened to 
>> me). Now it works like for other w32 apps:
>
> What other w32 apps are you talking about? The Windows programming 
> guidelines are pretty clear that the only time to interrupt shutdown 
> is when you are performing an operation that cannot be interrupted - 
> CD burning is given as an example. In that case you are supposed to 
> ask the user one Yes/No question about whether they want to abort the 
> shutdown.
I was going to say I am not aware of any other application that throws 
away data without asking the user at logoff. However a test showed that 
Thunderbird behaves that way too ;-|

I guess we are misunderstanding each other in some way. Let us see if we 
can clear this out. To see what I mean look Notepad for example. Edit a 
file without saving the changes and try to log off. You will be prompted 
by Notepad to save the changes before Notepad exits. And the log off 
process waits for Notepad to finish. I think that is good behaviour.

I am a very surprised about what the Windows programming guideline seems 
to say. Can you give me a link to it? There is a message named 
WM_QUERYENDSESSION that I thought was sent for applications to save 
data. (Though Emacs does not receive this. It is not clear to me why.)

>
> As I said at the start of the thread, it would be correct for Emacs to 
> flush its autosave buffers to disk at this point, but not to start 
> asking all the questions that save-buffers-kill-emacs does. What if 
> Emacs is on a secondary monitor, and the Graphics driver shuts it off 
> when it receives the shutdown message? Emacs will be delaying shutdown 
> waiting for a response, while the user cannot see it.
The problem with autosave is that data might be lost if the user happens 
to use some other tool to edit the files afterwards.

Is there some way to discover cases like the one with secondary 
monitors? Should there perhaps be an option telling what Emacs should do 
in these situations (with the choices autosave and ask the user to save 
changed data)?

I attach my patch as it looks now. Please try it to see how it works.

[-- Attachment #2: logout-patch.diff --]
[-- Type: text/plain, Size: 4483 bytes --]

? logout-patch.diff
Index: keyboard.c
===================================================================
RCS file: /sources/emacs/emacs/src/keyboard.c,v
retrieving revision 1.854
diff -u -r1.854 keyboard.c
--- keyboard.c	5 May 2006 06:43:50 -0000	1.854
+++ keyboard.c	29 Jun 2006 06:35:22 -0000
@@ -530,6 +530,9 @@
 #endif
 Lisp_Object Qdrag_n_drop;
 Lisp_Object Qsave_session;
+#ifdef WINDOWSNT
+Lisp_Object Qw32_endsession_event;
+#endif
 #ifdef MAC_OS
 Lisp_Object Qmac_apple_event;
 #endif
@@ -4061,6 +4064,13 @@
           obj = Fcons (Qsave_session, Qnil);
 	  kbd_fetch_ptr = event + 1;
         }
+#ifdef WINDOWSNT
+      else if (event->kind == W32_ENDSESSION_EVENT)
+        {
+          obj = Fcons (Qw32_endsession_event, Qnil);
+	  kbd_fetch_ptr = event + 1;
+        }
+#endif
       /* Just discard these, by returning nil.
 	 With MULTI_KBOARD, these events are used as placeholders
 	 when we need to randomly delete events from the queue.
@@ -5872,6 +5882,11 @@
     case SAVE_SESSION_EVENT:
       return Qsave_session;
 
+#ifdef WINDOWSNT
+    case W32_ENDSESSION_EVENT:
+      return Qw32_endsession_event;
+#endif
+
 #ifdef MAC_OS
     case MAC_APPLE_EVENT:
       {
@@ -10904,6 +10919,11 @@
   Qsave_session = intern ("save-session");
   staticpro (&Qsave_session);
 
+#ifdef WINDOWSNT
+  Qw32_endsession_event = intern ("w32-endsession-event");
+  staticpro (&Qw32_endsession_event);
+#endif
+
 #ifdef MAC_OS
   Qmac_apple_event = intern ("mac-apple-event");
   staticpro (&Qmac_apple_event);
@@ -11531,6 +11551,9 @@
    * 			    "handle-select-window"); */
   initial_define_lispy_key (Vspecial_event_map, "save-session",
 			    "handle-save-session");
+  /* W32 log off event */
+  initial_define_lispy_key (Vspecial_event_map, "w32-endsession-event",
+                            "save-buffers-kill-emacs");
 }
 
 /* Mark the pointers in the kboard objects.
Index: termhooks.h
===================================================================
RCS file: /sources/emacs/emacs/src/termhooks.h,v
retrieving revision 1.74
diff -u -r1.74 termhooks.h
--- termhooks.h	5 May 2006 06:45:04 -0000	1.74
+++ termhooks.h	29 Jun 2006 06:39:35 -0000
@@ -328,6 +328,10 @@
      save yourself before shutdown. */
   SAVE_SESSION_EVENT,
 
+#ifdef WINDOWSNT
+  W32_ENDSESSION_EVENT,
+#endif
+
 #ifdef MAC_OS
   /* Generated when an Apple event, a HICommand event, or a Services
      menu event is received and the corresponding handler is
Index: w32console.c
===================================================================
RCS file: /sources/emacs/emacs/src/w32console.c,v
retrieving revision 1.45
diff -u -r1.45 w32console.c
--- w32console.c	6 Feb 2006 15:23:21 -0000	1.45
+++ w32console.c	29 Jun 2006 12:35:04 -0000
@@ -41,6 +41,7 @@
 #undef HAVE_WINDOW_SYSTEM
 #include "frame.h"
 #include "w32inevt.h"
+#include "w32term.h"
 
 /* from window.c */
 extern Lisp_Object Frecenter ();
@@ -95,8 +96,31 @@
 ctrl_c_handler (unsigned long type)
 {
   /* Only ignore "interrupt" events when running interactively.  */
-  return (!noninteractive
-	  && (type == CTRL_C_EVENT || type == CTRL_BREAK_EVENT));
+/*   return (!noninteractive */
+/* 	  && (type == CTRL_C_EVENT || type == CTRL_BREAK_EVENT)); */
+  if (!noninteractive) {
+    switch (type)
+      {
+      case CTRL_C_EVENT:
+      case CTRL_BREAK_EVENT:
+        return TRUE;
+      case CTRL_CLOSE_EVENT: // 2
+      case CTRL_LOGOFF_EVENT: // 5
+      case CTRL_SHUTDOWN_EVENT: // 6
+        /* Ending session so tell user */
+        //printf("ctrl_c_handler=%d, dwWindowsThreadid=%d\n", type, dwWindowsThreadId); fflush(stdout);
+        {
+          W32Msg wmsg;
+          wmsg.msg.hwnd = 0;
+          wmsg.msg.message = WM_EMACS_KILL;
+          wmsg.msg.wParam = 0;
+          wmsg.msg.lParam = 0;
+          post_msg(&wmsg);
+          return TRUE;
+        }
+      }
+  }
+  return FALSE;
 }
 
 /* If we're updating a frame, use it as the current frame
Index: w32term.c
===================================================================
RCS file: /sources/emacs/emacs/src/w32term.c,v
retrieving revision 1.246
diff -u -r1.246 w32term.c
--- w32term.c	5 Jun 2006 21:20:59 -0000	1.246
+++ w32term.c	29 Jun 2006 12:31:57 -0000
@@ -4668,6 +4668,11 @@
 	    }
 	  break;
 
+        case WM_EMACS_KILL:
+          //printf("w32_read_socket WM_EMACS_KILL\n"); fflush(stdout);
+          inev.kind = W32_ENDSESSION_EVENT;
+	  break;
+
 	case WM_INITMENU:
 	  f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
 

[-- Attachment #3: Type: text/plain, Size: 161 bytes --]

_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

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

* Re: Exit hooks not run at logout on w32
  2006-06-29 14:52               ` Exit hooks not run at logout on w32 Lennart Borgman
@ 2006-06-29 15:00                 ` David Kastrup
  2006-06-29 16:16                   ` Lennart Borgman
  0 siblings, 1 reply; 12+ messages in thread
From: David Kastrup @ 2006-06-29 15:00 UTC (permalink / raw)
  Cc: emacs-pretest-bug, Emacs Devel, Jason Rumney

Lennart Borgman <lennart.borgman.073@student.lu.se> writes:

> Jason Rumney wrote:
>
>> As I said at the start of the thread, it would be correct for Emacs
>> to flush its autosave buffers to disk at this point, but not to
>> start asking all the questions that save-buffers-kill-emacs
>> does. What if Emacs is on a secondary monitor, and the Graphics
>> driver shuts it off when it receives the shutdown message? Emacs
>> will be delaying shutdown waiting for a response, while the user
>> cannot see it.
> The problem with autosave is that data might be lost if the user
> happens to use some other tool to edit the files afterwards.

Tough.  That's what "editing" means.  I don't want changes saved
without my saying so: that might end up the file in a terminally ill
state, like when I cut out a large region for the purpose of pasting
it somewhere else, and then Emacs shuts down.

Recovering a session is good enough for me.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: Exit hooks not run at logout on w32
  2006-06-29 15:00                 ` David Kastrup
@ 2006-06-29 16:16                   ` Lennart Borgman
  2006-06-29 21:40                     ` Mathias Dahl
  0 siblings, 1 reply; 12+ messages in thread
From: Lennart Borgman @ 2006-06-29 16:16 UTC (permalink / raw)
  Cc: emacs-pretest-bug, Emacs Devel

David Kastrup wrote:
> Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>
>   
>> Jason Rumney wrote:
>>
>>     
>>> As I said at the start of the thread, it would be correct for Emacs
>>> to flush its autosave buffers to disk at this point, but not to
>>> start asking all the questions that save-buffers-kill-emacs
>>> does. What if Emacs is on a secondary monitor, and the Graphics
>>> driver shuts it off when it receives the shutdown message? Emacs
>>> will be delaying shutdown waiting for a response, while the user
>>> cannot see it.
>>>       
>> The problem with autosave is that data might be lost if the user
>> happens to use some other tool to edit the files afterwards.
>>     
>
> Tough.  That's what "editing" means.  I don't want changes saved
> without my saying so: that might end up the file in a terminally ill
> state, like when I cut out a large region for the purpose of pasting
> it somewhere else, and then Emacs shuts down.
>
> Recovering a session is good enough for me.
>   
I think this must be a misunderstanding. No one is talking about saving 
changes without the user saying so. The purpose of the patch is that 
Emacs should be able to ask the user at logooff/shutdown to save the 
changes. The situation now is that the changes are thrown away if they 
are not saved before.

This patch is only for w32 but I really hope the situation is better on 
other platforms. If not I would encourage change.

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

* Re: Exit hooks not run at logout on w32
  2006-06-29 16:16                   ` Lennart Borgman
@ 2006-06-29 21:40                     ` Mathias Dahl
  2006-06-29 22:42                       ` Lennart Borgman
  0 siblings, 1 reply; 12+ messages in thread
From: Mathias Dahl @ 2006-06-29 21:40 UTC (permalink / raw)
  Cc: emacs-pretest-bug, Jason Rumney, Emacs Devel

> I think this must be a misunderstanding. No one is talking about saving
> changes without the user saying so. The purpose of the patch is that
> Emacs should be able to ask the user at logooff/shutdown to save the
> changes. The situation now is that the changes are thrown away if they
> are not saved before.

If Microsoft's guide lines are what someone stated here, maybe the
reason for them is that the shutdown process is considered to have
higher priority than a user's unsaved data? If that is the case,
halting that process maybe isn't such a good idea. Someone said that
the autosave is enough and I agree. Your argument against it, that
someone might edit the file from some other program before using the
auto save data, does not seem like a very likely scenario. Or is it?

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

* Re: Exit hooks not run at logout on w32
  2006-06-29 21:40                     ` Mathias Dahl
@ 2006-06-29 22:42                       ` Lennart Borgman
  2006-07-04  6:55                         ` Lennart Borgman
  0 siblings, 1 reply; 12+ messages in thread
From: Lennart Borgman @ 2006-06-29 22:42 UTC (permalink / raw)
  Cc: emacs-pretest-bug, David Kastrup, Emacs Devel

Mathias Dahl wrote:
>> I think this must be a misunderstanding. No one is talking about saving
>> changes without the user saying so. The purpose of the patch is that
>> Emacs should be able to ask the user at logooff/shutdown to save the
>> changes. The situation now is that the changes are thrown away if they
>> are not saved before.
>
> If Microsoft's guide lines are what someone stated here, maybe the
> reason for them is that the shutdown process is considered to have
> higher priority than a user's unsaved data? If that is the case,
> halting that process maybe isn't such a good idea. Someone said that
> the autosave is enough and I agree. Your argument against it, that
> someone might edit the file from some other program before using the
> auto save data, does not seem like a very likely scenario. Or is it?

I am unsure about that guideline since I have never seen it. However the 
InitiateSystemShutdown API has a parameter called bForceAppsClosed with 
the following description:

    If this parameter is TRUE, applications with unsaved changes are to 
be forcibly closed. Note that this can result in data loss.
    If this parameter is FALSE, the system displays a dialog box 
instructing the user to close the applications.

(See http://windowssdk.msdn.microsoft.com/en-us/library/ms723171.aspx)

So the system can be rebooted or shutdown whatever the software running 
on it does. During normal system shutdown however the parameter is TRUE 
as far as I can see from the behaviour.

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

* Re: Exit hooks not run at logout on w32
  2006-06-29 22:42                       ` Lennart Borgman
@ 2006-07-04  6:55                         ` Lennart Borgman
  2006-07-04  8:13                           ` Jason Rumney
  2006-07-04  8:36                           ` Mathias Dahl
  0 siblings, 2 replies; 12+ messages in thread
From: Lennart Borgman @ 2006-07-04  6:55 UTC (permalink / raw)
  Cc: emacs-pretest-bug, Emacs Devel, Mathias Dahl

Lennart Borgman wrote:
>> If Microsoft's guide lines are what someone stated here, maybe the
>> reason for them is that the shutdown process is considered to have
>> higher priority than a user's unsaved data? If that is the case,
>> halting that process maybe isn't such a good idea. Someone said that
>> the autosave is enough and I agree. Your argument against it, that
>> someone might edit the file from some other program before using the
>> auto save data, does not seem like a very likely scenario. Or is it?
>
> I am unsure about that guideline since I have never seen it. However 
> the InitiateSystemShutdown API has a parameter called bForceAppsClosed 
> with the following description:
>
>    If this parameter is TRUE, applications with unsaved changes are to 
> be forcibly closed. Note that this can result in data loss.
>    If this parameter is FALSE, the system displays a dialog box 
> instructing the user to close the applications.
>
> (See http://windowssdk.msdn.microsoft.com/en-us/library/ms723171.aspx)
>
> So the system can be rebooted or shutdown whatever the software 
> running on it does. During normal system shutdown however the 
> parameter is TRUE as far as I can see from the behaviour.


Could the problem that users unsaved data are not saved on w32 in this 
situation be put in FOR-RELEASE? I think it is a serious bug.

I have already sent a patch for this, but I have got no response on 
that. There is possibly disagreement on what to do, but something should 
be done and I do believe that the correct fix should make Emacs follow 
the guidelines on w32. Jason said he had read them. I asked for a link 
to them, but I have not seen it yet. Instead I provided the above snippet.

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

* Re: Exit hooks not run at logout on w32
  2006-07-04  6:55                         ` Lennart Borgman
@ 2006-07-04  8:13                           ` Jason Rumney
  2006-07-05 15:36                             ` Stuart D. Herring
  2006-07-04  8:36                           ` Mathias Dahl
  1 sibling, 1 reply; 12+ messages in thread
From: Jason Rumney @ 2006-07-04  8:13 UTC (permalink / raw)
  Cc: emacs-pretest-bug, Emacs Devel, Mathias Dahl

Lennart Borgman wrote:
> Could the problem that users unsaved data are not saved on w32 in this 
> situation be put in FOR-RELEASE? I think it is a serious bug.
The user has requested a shutdown of the system, without saving their 
data first. How is it a bug that Emacs respects their wishes?

> I have already sent a patch for this, but I have got no response on 
> that. There is possibly disagreement on what to do, but something 
> should be done and I do believe that the correct fix should make Emacs 
> follow the guidelines on w32. Jason said he had read them. I asked for 
> a link to them, but I have not seen it yet. Instead I provided the 
> above snippet.

Here are the guidelines I was referring to:

http://windowssdk.msdn.microsoft.com/en-us/library/ms723653.aspx

    Applications that have unsaved data could save the data to a temporary
    location and restore it the next time the application starts, or simply
    respect the user's request to shut down the system even though it will
    cause data loss.



http://windowssdk.msdn.microsoft.com/en-us/library/ms723654.aspx

    If your application receives a shutdown notification while it is in the
    middle of an operation that should not be aborted, such as burning media
    or making a backup, it should display a dialog box. Warn the user what
    might happen if the operation is interrupted and enable the user to
    choose whether to cancel or continue the shutdown. If the user would
    like to cancel the shutdown, the application should return FALSE for
    this message.
    ...
    Applications should respond to this message as quickly as possible,
    saving time-consuming cleanup operations for the processing of the
    *WM_ENDSESSION* message.

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

* Re: Exit hooks not run at logout on w32
  2006-07-04  6:55                         ` Lennart Borgman
  2006-07-04  8:13                           ` Jason Rumney
@ 2006-07-04  8:36                           ` Mathias Dahl
  2006-07-04  8:49                             ` Jason Rumney
  2006-07-04  9:24                             ` Kim F. Storm
  1 sibling, 2 replies; 12+ messages in thread
From: Mathias Dahl @ 2006-07-04  8:36 UTC (permalink / raw)
  Cc: emacs-devel

Lennart Borgman <lennart.borgman.073@student.lu.se> writes:

> Lennart Borgman wrote:

> I have already sent a patch for this, but I have got no response on
> that. There is possibly disagreement on what to do, but something
> should be done and I do believe that the correct fix should make Emacs
> follow the guidelines on w32. Jason said he had read them. I asked for
> a link to them, but I have not seen it yet. Instead I provided the
> above snippet.

I found a document that hopefully will end this discussion:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shutdown/base/shutting_down.asp

IMHO, a relevant part from that page:

    Shutdown Notifications

    Applications with a window and message queue receive shutdown
    notifications through the WM_QUERYENDSESSION message. These
    applications should perform any required cleanup while processing
    this message and return TRUE to indicate that they can be
    terminated. 

    Applications should not block system shutdown unless it is
    absolutely necessary to prevent corrupting the system or media
    that is being burned. 

This section is especially interesting:

    Applications that have unsaved data ***could save the data to a
    temporary location and restore it the next time the application
    starts***...

So, I conclude that displaying a dialog box ("Do you want to save bla
bla?") would violate the "rules" above, wouldn't they?

/Mathias

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

* Re: Exit hooks not run at logout on w32
  2006-07-04  8:36                           ` Mathias Dahl
@ 2006-07-04  8:49                             ` Jason Rumney
  2006-07-04 16:49                               ` Lennart Borgman
  2006-07-04  9:24                             ` Kim F. Storm
  1 sibling, 1 reply; 12+ messages in thread
From: Jason Rumney @ 2006-07-04  8:49 UTC (permalink / raw)
  Cc: emacs-devel

Mathias Dahl wrote:
>     Applications with a window and message queue receive shutdown
>     notifications through the WM_QUERYENDSESSION message. These
>     applications should perform any required cleanup while processing
>     this message and return TRUE to indicate that they can be
>     terminated. 
>   

> So, I conclude that displaying a dialog box ("Do you want to save bla
> bla?") would violate the "rules" above, wouldn't they?
>   

That was my same conclusion, based on reading the documentation of the 
actual system messages. But it is interesting that the advice above 
contradicts the advice in the documentation for WM_QUERYENDSESSION, 
which says you should NOT perform cleanup while processing that message, 
but save it for WM_ENDSESSION. I think the contradictions in Microsoft's 
documentation about shutdown are what is causing the confusion here. 
Lennart posted another contradiction, where in the documentation for 
InitiateSystemShutdown, there is advice that applications can delay 
shutdown if they have unsaved data if a particular flag is passed. But 
that advice is for users of InitiateSystemShutdown, not for recipients 
of the shutdown messages, so my opinion is that it is informing of worst 
case expectations for code that wants to shut the system down (assuming 
that not all applications will take the advice elsewhere - apparently 
some of Microsoft's own products do not).

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

* Re: Exit hooks not run at logout on w32
  2006-07-04  8:36                           ` Mathias Dahl
  2006-07-04  8:49                             ` Jason Rumney
@ 2006-07-04  9:24                             ` Kim F. Storm
  1 sibling, 0 replies; 12+ messages in thread
From: Kim F. Storm @ 2006-07-04  9:24 UTC (permalink / raw)
  Cc: emacs-pretest-bug, emacs-devel

Mathias Dahl <brakjoller@gmail.com> writes:

> This section is especially interesting:
>
>     Applications that have unsaved data ***could save the data to a
>     temporary location and restore it the next time the application
>     starts***...
>
> So, I conclude that displaying a dialog box ("Do you want to save bla
> bla?") would violate the "rules" above, wouldn't they?

Try to open and edit a Word document -- then shutdown windoze.

Last time I tried that, Word asked me whether I wanted to save the document.

So M$ doesn't follow their own rules (surprise :-).

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: Exit hooks not run at logout on w32
  2006-07-04  8:49                             ` Jason Rumney
@ 2006-07-04 16:49                               ` Lennart Borgman
  0 siblings, 0 replies; 12+ messages in thread
From: Lennart Borgman @ 2006-07-04 16:49 UTC (permalink / raw)
  Cc: emacs-devel, Mathias Dahl

Jason Rumney wrote:
> That was my same conclusion, based on reading the documentation of the 
> actual system messages. But it is interesting that the advice above 
> contradicts the advice in the documentation for WM_QUERYENDSESSION, 
> which says you should NOT perform cleanup while processing that 
> message, but save it for WM_ENDSESSION. I think the contradictions in 
> Microsoft's documentation about shutdown are what is causing the 
> confusion here. Lennart posted another contradiction, where in the 
> documentation for InitiateSystemShutdown, there is advice that 
> applications can delay shutdown if they have unsaved data if a 
> particular flag is passed. But that advice is for users of 
> InitiateSystemShutdown, not for recipients of the shutdown messages, 
> so my opinion is that it is informing of worst case expectations for 
> code that wants to shut the system down (assuming that not all 
> applications will take the advice elsewhere - apparently some of 
> Microsoft's own products do not).

Thanks for posting the links. I think we all can understand the 
confusion now.

I tested some programs to see how they behaved at logoff:

    - OpenOffice Writer: Asked to save.
    -  GIMP: Just throwed away the changes.
    - MS Word: Asked.
    - Notepad: Asked.
    - Another commercial drawing package: Asked. Even got so upset that 
I could not choose not to save during logoff.
    - Thunderbird: Just throws away the changes.
    - Inno Setup: Asked.

The GIMP w32 interface has several weaknesses unfortunately (it is a 
good program otherwise). It diverges from the w32 standard on several 
points. I guess that is because of lack of resources on the w32 side. So 
I am not so surprised that it throws away the changes.

Thunderbird also diverges from the standard w32 interface. Even though 
it has many good solutions it is sometimes just unnecessary clumsy in my 
opinion. It is a rather new application and I hope it will mature. I 
really like it despite that it is sometimes clumsy.


Now looking at the MS documentation again I guess that it reflects the 
problem from two different standpoints: the operating system experts and 
the user program user interface experts. From an operating system point 
of view it makes sense to save data to temporary files or even just 
throw away the changes sometimes. From a users view it seldoms makes sense.

I suggest that we do as most of the other programs do: Ask to save.

Perhaps there could be an option to save data and state temporary too. I 
think however that it will be mostly confusing to the users.

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

* Re: Exit hooks not run at logout on w32
  2006-07-04  8:13                           ` Jason Rumney
@ 2006-07-05 15:36                             ` Stuart D. Herring
  0 siblings, 0 replies; 12+ messages in thread
From: Stuart D. Herring @ 2006-07-05 15:36 UTC (permalink / raw)
  Cc: emacs-pretest-bug, Mathias Dahl, Emacs Devel

>> Could the problem that users unsaved data are not saved on w32 in this
>> situation be put in FOR-RELEASE? I think it is a serious bug.
> The user has requested a shutdown of the system, without saving their
> data first. How is it a bug that Emacs respects their wishes?

It's worth considering that the user may have requested the shutdown
without remembering that Emacs was open (or that data remained unsaved in
it), or that something else (e.g., an installer program) may have
initiated the shutdown unexpectedly.  I believe that the question of "save
or discard data" has an obvious answer.  It's just a question of

1) Auto-save, to protect files from bad unsaved edits
2) Save really, assuming that the user didn't break things and then shut
down, and avoiding the issue of recovering the files
3) Ask the user (probably best, but is it in line with the UI guidelines?)

For what it's worth, all sorts of W32 applications interrupt a normal
shutdown just to offer to save files, IIRC.

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

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

end of thread, other threads:[~2006-07-05 15:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <44A005B7.2080904@student.lu.se>
     [not found] ` <44A01733.4010600@gnu.org>
     [not found]   ` <44A03B61.8080501@student.lu.se>
     [not found]     ` <ufyhrva9u.fsf@jasonrumney.net>
     [not found]       ` <44A2B99B.1020002@student.lu.se>
     [not found]         ` <44A2F974.7040609@gnu.org>
     [not found]           ` <44A31C19.5050000@student.lu.se>
     [not found]             ` <44A3A2DE.4040507@gnu.org>
2006-06-29 14:52               ` Exit hooks not run at logout on w32 Lennart Borgman
2006-06-29 15:00                 ` David Kastrup
2006-06-29 16:16                   ` Lennart Borgman
2006-06-29 21:40                     ` Mathias Dahl
2006-06-29 22:42                       ` Lennart Borgman
2006-07-04  6:55                         ` Lennart Borgman
2006-07-04  8:13                           ` Jason Rumney
2006-07-05 15:36                             ` Stuart D. Herring
2006-07-04  8:36                           ` Mathias Dahl
2006-07-04  8:49                             ` Jason Rumney
2006-07-04 16:49                               ` Lennart Borgman
2006-07-04  9:24                             ` Kim F. Storm

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.