From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: Re: How to get rid of *GNU Emacs* buffer on start-up? Date: Wed, 24 Sep 2008 04:42:38 -0700 (PDT) Organization: http://groups.google.com Message-ID: <98bb399f-e2e7-4d6f-8d5f-4e56475b6ad1@v13g2000pro.googlegroups.com> References: <873ajzwoqu.fsf@kobe.laptop> <823901dd-c54c-4e3b-b6ad-512d52724a46@z11g2000prl.googlegroups.com> <87ljxoffs6.fsf@atthis.clsnet.nl> <71208e97-140c-445d-8eda-1705f11b14b3@r15g2000prd.googlegroups.com> <095ef0c0-c7f4-494d-8bf6-8a5ee43fd934@i20g2000prf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1222260051 15946 80.91.229.12 (24 Sep 2008 12:40:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Sep 2008 12:40:51 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 24 14:41:49 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KiTgi-0000Kj-LG for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Sep 2008 14:41:48 +0200 Original-Received: from localhost ([127.0.0.1]:52093 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KiTfg-0005M7-IH for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Sep 2008 08:40:44 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!v13g2000pro.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 41 Original-NNTP-Posting-Host: 24.6.185.159 Original-X-Trace: posting.google.com 1222256559 10715 127.0.0.1 (24 Sep 2008 11:42:39 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 24 Sep 2008 11:42:39 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v13g2000pro.googlegroups.com; posting-host=24.6.185.159; posting-account=qPxGtQkAAADb6PWdLGiWVucht1ZDR6fn User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:162654 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57997 Archived-At: 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 =E2=88=91 http://xahlee.org/ =E2=98=84