From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.help Subject: Re: Emacs ignores modified state of "untitled" buffer Date: Wed, 19 May 2010 22:34:10 +0200 Message-ID: <87y6ffaawt.fsf@escher.home> References: <51707DDA-8D52-4D9F-9FD4-461987F2DEDE@nf.mpg.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1274301288 18671 80.91.229.12 (19 May 2010 20:34:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 19 May 2010 20:34:48 +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 May 19 22:34:47 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1OEpyX-0001ML-4m for geh-help-gnu-emacs@m.gmane.org; Wed, 19 May 2010 22:34:45 +0200 Original-Received: from localhost ([127.0.0.1]:50168 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEpyW-0002rT-LG for geh-help-gnu-emacs@m.gmane.org; Wed, 19 May 2010 16:34:44 -0400 Original-Received: from [140.186.70.92] (port=56578 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEpy9-0002pn-2w for help-gnu-emacs@gnu.org; Wed, 19 May 2010 16:34:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEpy7-0002gT-D6 for help-gnu-emacs@gnu.org; Wed, 19 May 2010 16:34:20 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:53155) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEpy7-0002g8-7A for help-gnu-emacs@gnu.org; Wed, 19 May 2010 16:34:19 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OEpy5-00017f-HW for help-gnu-emacs@gnu.org; Wed, 19 May 2010 22:34:17 +0200 Original-Received: from i59f54beb.versanet.de ([89.245.75.235]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 19 May 2010 22:34:17 +0200 Original-Received: from stephen.berman by i59f54beb.versanet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 19 May 2010 22:34:17 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory Original-Lines: 19 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: i59f54beb.versanet.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:73680 Archived-At: On Wed, 19 May 2010 16:52:12 +0200 Stefan Vollmar wrote: > we have a user who wants to always open Emacs with a new "untitled" > buffer so he can start writing right away without having to think of a > file name first (similar to a "New Document" feature in Mac and > Windows programs). If we try this in site-start.el: > > (generate-new-buffer "untitled") > (switch-to-buffer "untitled") > > we are almost there - Emacs starts with the new "untitled" > buffer. However, if he then exits Emacs, Emacs does not warn about a > modified buffer and potential data loss, although the buffer is marked > dirty. How can we get the usual behaviour for this new buffer? How about setting buffer-offer-save to t (with setq-default if you want it for all buffers)? Steve Berman