From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Davis Herring" Newsgroups: gmane.emacs.devel Subject: Re: A wish, a plea Date: Thu, 21 Jun 2007 12:12:31 -0700 (PDT) Message-ID: <49854.128.165.123.18.1182453151.squirrel@webmail.lanl.gov> References: <4679F561.4030600@hacksaw.org> <49750.128.165.123.18.1182451810.squirrel@webmail.lanl.gov> Reply-To: herring@lanl.gov NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1182453166 3618 80.91.229.12 (21 Jun 2007 19:12:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 21 Jun 2007 19:12:46 +0000 (UTC) Cc: emacs-devel@gnu.org, Hacksaw To: "Stefan Monnier" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 21 21:12:45 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I1S5E-0000xg-LG for ged-emacs-devel@m.gmane.org; Thu, 21 Jun 2007 21:12:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I1S5D-0001Gr-OV for ged-emacs-devel@m.gmane.org; Thu, 21 Jun 2007 15:12:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I1S5A-0001Gm-Kk for emacs-devel@gnu.org; Thu, 21 Jun 2007 15:12:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I1S59-0001Ga-8a for emacs-devel@gnu.org; Thu, 21 Jun 2007 15:12:39 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I1S59-0001GX-2A for emacs-devel@gnu.org; Thu, 21 Jun 2007 15:12:39 -0400 Original-Received: from mailwasher.lanl.gov ([192.65.95.54] helo=mailwasher-b.lanl.gov) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I1S58-0003ZX-FS for emacs-devel@gnu.org; Thu, 21 Jun 2007 15:12:38 -0400 Original-Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101]) by mailwasher-b.lanl.gov (8.13.8/8.13.6/(ccn-5)) with ESMTP id l5LJCVHQ031327 for ; Thu, 21 Jun 2007 13:12:32 -0600 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay1.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id l5LJCVtB012508; Thu, 21 Jun 2007 13:12:31 -0600 Original-Received: from webmail1.lanl.gov (localhost.localdomain [127.0.0.1]) by webmail1.lanl.gov (8.12.11.20060308/8.12.11) with ESMTP id l5LJCVg6024805; Thu, 21 Jun 2007 13:12:31 -0600 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id l5LJCVdU024803; Thu, 21 Jun 2007 12:12:31 -0700 X-Authentication-Warning: webmail1.lanl.gov: apache set sender to herring@lanl.gov using -f Original-Received: from 128.165.123.18 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Thu, 21 Jun 2007 12:12:31 -0700 (PDT) In-Reply-To: User-Agent: SquirrelMail/1.4.8-6.el3.2lanl X-Priority: 3 (Normal) Importance: Normal X-PMX-Version: 4.7.1.128075 X-CTN-5-MailScanner-Information: Please see http://network.lanl.gov/email/virus-scan.php X-CTN-5-MailScanner: Found to be clean X-CTN-5-MailScanner-From: herring@lanl.gov X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:73550 Archived-At: >> The simple answer here is M-x auto-save-mode. You can of course put >> (auto-save-mode 1) in .emacs, since *scratch* is current when it runs. > > It may work. Does for me as the only line in .emacs, if you were doubting. >> Actually getting rid of *scratch* is somewhat harder. > > Maybe an alternative is to make it read-only. > Or maybe add a first-change-hook that requests a file name from the user? That's a neat idea, the hook. Perhaps: (defun set-buffer-file-name (name) "Set the current buffer's file name, prompting interactively." (interactive "FNew file name: ") (setq buffer-file-name name)) (defun guarantee-buffer-file-name () "Prompt the user for a file name for the current buffer. Do nothing if that buffer has a file name already or is in a special mode." (unless (or buffer-file-name (eq (get major-mode 'mode-class) 'special)) (call-interactively 'set-buffer-file-name))) (add-hook 'first-change-hook 'guarantee-buffer-file-name) Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.