From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: emacs exiting Date: Thu, 08 Dec 2011 08:20:06 +0100 Message-ID: <87d3bz4jix.fsf@tsdh.uni-koblenz.de> References: <4EDFE5C7.6020005@sergio.spb.ru> <4EE058C3.7000005@sergio.spb.ru> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1323328836 28782 80.91.229.12 (8 Dec 2011 07:20:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 8 Dec 2011 07:20:36 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 08 08:20:32 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RYYHP-0005Yr-55 for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Dec 2011 08:20:31 +0100 Original-Received: from localhost ([::1]:44997 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYYHO-0005Iy-Hy for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Dec 2011 02:20:30 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:35166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYYHI-0005Is-Jd for help-gnu-emacs@gnu.org; Thu, 08 Dec 2011 02:20:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RYYHH-0001cK-7a for help-gnu-emacs@gnu.org; Thu, 08 Dec 2011 02:20:24 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:33867) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYYHH-0001cG-1t for help-gnu-emacs@gnu.org; Thu, 08 Dec 2011 02:20:23 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RYYHG-0005WA-8D for help-gnu-emacs@gnu.org; Thu, 08 Dec 2011 08:20:22 +0100 Original-Received: from tsdh.uni-koblenz.de ([141.26.67.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Dec 2011 08:20:22 +0100 Original-Received: from tassilo by tsdh.uni-koblenz.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Dec 2011 08:20:22 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 34 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: tsdh.uni-koblenz.de User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.92 (gnu/linux) Cancel-Lock: sha1:Cg5LrDxiRY/UaA6aQOBhrVXq9X0= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:83160 Archived-At: sergio writes: Hi Sergio, >>> How to leave emacs without saving after some modification were made >>> without leaving #file# (with moving it or switching off)? > >> I'm not sure what you're asking but try C-x C-c. > > This leaves auto save #file# after exit. But only if you say "no" when being queried if the changes should be saved to the file. Well, in that case it might be ok not to auto-save, because the user already stated that he doesn't want to persist his changes. But I don't see how that could be done easily. One way would be to write your own version of `server-kill-emacs-query-function' and replace the original with yours in `kill-emacs-query-functions'... You could also disable auto-saving completely: ,----[ C-h v auto-save-default RET ] | auto-save-default is a variable defined in `files.el'. | Its value is t | | Documentation: | Non-nil says by default do auto-saving of every file-visiting buffer. | | You can customize this variable. `---- But I don't think it's a good idea to turn off auto saving. Bye, Tassilo