Dear Lennart, On 21.05.2010, at 19:15, Lennart Borgman wrote: > On Fri, May 21, 2010 at 3:17 PM, Kevin Rodgers > wrote: > >> ;; Protect against kill-emacs: >> (setq buffer-offer-save t) > >>> I guess changing the mode somehow overwrites the kill protections in >>> switch-to-new-buffer? >> >> Yes, via kill-all-local-variables. > > You have to use > > (put 'buffer-offer-save 'permanent-local t) > > to protect against kill-all-local-variables. I think it is a bug that > this is not already done in Emacs. excellent! With (require 'switch-to-new-buffer) (put 'buffer-offer-save 'permanent-local t) (let ((default-major-mode 'org-mode)) (switch-to-new-untitled-buffer)) (setq initial-buffer-choice 'none) in site-start.el and Kevin's last version of switch-to-new-buffer, Emacs will now start with an "untitled" buffer (in Org-mode; no splashscreen), always ask to save data in a dirty "untitled" buffer and also dropping a file on the Emacs Windows icon shortcut will open it. Thank you! Warm regards, Stefan -- Dr. Stefan Vollmar, Dipl.-Phys. Head of IT group Max-Planck-Institut für neurologische Forschung Gleuelerstr. 50, 50931 Köln, Germany Tel.: +49-221-4726-213 FAX +49-221-4726-298 Tel.: +49-221-478-5713 Mobile: 0160-93874279 Email: vollmar@nf.mpg.de http://www.nf.mpg.de