[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs ignores modified state of "untitled" buffer
From: |
Stefan Vollmar |
Subject: |
Re: Emacs ignores modified state of "untitled" buffer |
Date: |
Fri, 21 May 2010 22:49:15 +0200 |
Dear Lennart,
On 21.05.2010, at 19:15, Lennart Borgman wrote:
> On Fri, May 21, 2010 at 3:17 PM, Kevin Rodgers
> <kevin.d.rodgers@gmail.com> 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
smime.p7s
Description: S/MIME cryptographic signature
- Re: Emacs ignores modified state of "untitled" buffer, (continued)
- Re: Emacs ignores modified state of "untitled" buffer, Kevin Rodgers, 2010/05/20
- Re: Emacs ignores modified state of "untitled" buffer, Stefan Vollmar, 2010/05/21
- Re: Emacs ignores modified state of "untitled" buffer, Kevin Rodgers, 2010/05/21
- Re: Emacs ignores modified state of "untitled" buffer, Stefan Vollmar, 2010/05/21
- Re: Emacs ignores modified state of "untitled" buffer, Kevin Rodgers, 2010/05/21
- Re: Emacs ignores modified state of "untitled" buffer, Stefan Vollmar, 2010/05/21
- Re: Emacs ignores modified state of "untitled" buffer, Lennart Borgman, 2010/05/21
- Re: Emacs ignores modified state of "untitled" buffer,
Stefan Vollmar <=
- Re: Emacs ignores modified state of "untitled" buffer, Lennart Borgman, 2010/05/21
- RE: Emacs ignores modified state of "untitled" buffer, Drew Adams, 2010/05/21
- Re: Emacs ignores modified state of "untitled" buffer, Kevin Rodgers, 2010/05/28
- RE: Emacs ignores modified state of "untitled" buffer, Drew Adams, 2010/05/28
- Re: Emacs ignores modified state of "untitled" buffer, Stefan Vollmar, 2010/05/28