[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Exit hooks not run at logout on w32

From: Lennart Borgman
Subject: Exit hooks not run at logout on w32
Date: Mon, 26 Jun 2006 18:05:11 +0200
User-agent: Thunderbird (Windows/20060516)

As far as I can see the exit hooks for Emacs are not run when a user logs out from Windows 2000 or reboots the pc. I do not know however if this problem is specific to w32. It is in my opinion a serious problem that ought to be fixed before the release.

To show the problem eval the code below and then

  1) Just exit Emacs. In this case the log file will be written.

2) Instead log out from w2k. In this case the log file will not be written.

The test code:

 ;; Change the file name to something suiteable:
(defvar test-exit-file "c:/test/test-exit.tmp")

 (defun test-exit-write-stamp(from)
   (let ((old-buf (get-file-buffer test-exit-file)))
     (find-file test-exit-file)
     (goto-char (point-max))
     (unless old-buf
       (insert "\n")))
   (insert "From ") (insert from) (insert ": ")
   (insert (current-time-string))
   (insert "\n")

    (test-exit-write-stamp "kill-emacs-query-functions")
    (message "From kill-emacs-query-functions")
    (sit-for 5)))

    (test-exit-write-stamp "kill-emacs-hook")
    (message "From kill-emacs-hook")
    (sit-for 5)))

In GNU Emacs (i386-mingw-nt5.0.2195)
of 2006-06-25

reply via email to

[Prev in Thread] Current Thread [Next in Thread]