[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get rid of *GNU Emacs* buffer on start-up?
From: |
Xah Lee |
Subject: |
Re: How to get rid of *GNU Emacs* buffer on start-up? |
Date: |
Wed, 24 Sep 2008 04:42:38 -0700 (PDT) |
User-agent: |
G2/1.0 |
i wrote:
> PS thanks for the (setq buffer-offer-save t) in your code. It is a
> solution to my kludge in my create-new-buffer code about forcing emacs
> to offer save.
oops, my mistake.
I actually have the line
(setq buffer-offer-save t)
in my code for new-empty-buffer, but emacs still closes the buffer
without saving, seemingly contrary to its doc.
The solution i made, is to create a close-current-buffer which offers
to save.
The snipped of code is here:
;; offer to save buffers that are non-empty and modified, even for
non-file visiting buffer. (because kill-buffer does not offer to save
buffers that are not associated with files)
(when (and (buffer-modified-p)
(not isEmacsBufferBefore)
(not (string-equal mode-name "Dired by name"))
(not (string-equal mode-name "Dired by date"))
(not (string-equal "" (save-restriction (widen) (buffer-
string)))))
(if (y-or-n-p
(concat "Buffer " (buffer-name) " modified; Do you want to
save?"))
(save-buffer)
(set-buffer-modified-p nil)))
The complete code, again, is here:
http://xahlee.org/emacs/ergonomic_keybinding_dvorak.el
http://xahlee.org/emacs/ergonomic_keybinding_qwerty.el
Xah
∑ http://xahlee.org/
☄
- Re: How to get rid of *GNU Emacs* buffer on start-up?, (continued)
- Message not available
- Re: How to get rid of *GNU Emacs* buffer on start-up?, Xah Lee, 2008/09/19
- Re: How to get rid of *GNU Emacs* buffer on start-up?, Chetan, 2008/09/19
- Re: How to get rid of *GNU Emacs* buffer on start-up?, Kevin Rodgers, 2008/09/19
- Re: How to get rid of *GNU Emacs* buffer on start-up?, Kevin Rodgers, 2008/09/24
- Message not available
- Re: How to get rid of *GNU Emacs* buffer on start-up?, Xah Lee, 2008/09/24
- Re: How to get rid of *GNU Emacs* buffer on start-up?, Kevin Rodgers, 2008/09/26
- Message not available
- Re: How to get rid of *GNU Emacs* buffer on start-up?, Xah, 2008/09/26
- Message not available
- Re: How to get rid of *GNU Emacs* buffer on start-up?, Xah Lee, 2008/09/19
- Re: How to get rid of *GNU Emacs* buffer on start-up?, Kevin Rodgers, 2008/09/24
- Message not available
- Re: How to get rid of *GNU Emacs* buffer on start-up?, Xah Lee, 2008/09/24
- Re: How to get rid of *GNU Emacs* buffer on start-up?,
Xah Lee <=
- Re: How to get rid of *GNU Emacs* buffer on start-up?, rustom, 2008/09/24
- Bug? buffer-offer-save, Xah Lee, 2008/09/24
- Re: Bug? buffer-offer-save, Juanma Barranquero, 2008/09/24
- Re: Bug? buffer-offer-save, Juanma Barranquero, 2008/09/24
- Re: How to get rid of *GNU Emacs* buffer on start-up?, Kevin Rodgers, 2008/09/26
- Message not available
- Re: How to get rid of *GNU Emacs* buffer on start-up?, Xah, 2008/09/26
- Re: How to get rid of *GNU Emacs* buffer on start-up?, Alan Mackenzie, 2008/09/26
- Re: How to get rid of *GNU Emacs* buffer on start-up?, Kevin Rodgers, 2008/09/26
- Message not available
- Re: How to get rid of *GNU Emacs* buffer on start-up?, Chetan, 2008/09/26
- Re: How to get rid of *GNU Emacs* buffer on start-up?, Andreas Politz, 2008/09/27