From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ken Newsgroups: gmane.emacs.help Subject: Re: Load specific files at startup? Date: Sat, 09 Aug 2008 02:41:19 -0400 Message-ID: <489D3C0F.5080702@speakeasy.net> References: <5005c865-1513-4ac8-aabe-9e359480afc6@x35g2000hsb.googlegroups.com> Reply-To: gebser@mousecar.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1218264118 29998 80.91.229.12 (9 Aug 2008 06:41:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Aug 2008 06:41:58 +0000 (UTC) To: GNU Emacs List Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 09 08:42:49 2008 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 1KRiA2-0003V5-Ol for geh-help-gnu-emacs@m.gmane.org; Sat, 09 Aug 2008 08:42:47 +0200 Original-Received: from localhost ([127.0.0.1]:53031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KRi97-0000pp-6u for geh-help-gnu-emacs@m.gmane.org; Sat, 09 Aug 2008 02:41:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KRi8p-0000oB-5t for help-gnu-emacs@gnu.org; Sat, 09 Aug 2008 02:41:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KRi8o-0000nQ-Cl for help-gnu-emacs@gnu.org; Sat, 09 Aug 2008 02:41:30 -0400 Original-Received: from [199.232.76.173] (port=48602 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KRi8o-0000nL-6p for help-gnu-emacs@gnu.org; Sat, 09 Aug 2008 02:41:30 -0400 Original-Received: from mail1.sea5.speakeasy.net ([69.17.117.3]:50219) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KRi8n-0005Sn-K3 for help-gnu-emacs@gnu.org; Sat, 09 Aug 2008 02:41:29 -0400 Original-Received: (qmail 9205 invoked from network); 9 Aug 2008 06:41:26 -0000 Original-Received: from dsl093-011-017.cle1.dsl.speakeasy.net (HELO [192.168.0.26]) (gebser@[66.93.11.17]) (envelope-sender ) by mail1.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 9 Aug 2008 06:41:26 -0000 User-Agent: Thunderbird 2.0.0.0 (X11/20070326) In-Reply-To: <5005c865-1513-4ac8-aabe-9e359480afc6@x35g2000hsb.googlegroups.com> X-Enigmail-Version: 0.95.6 OpenPGP: id=5AD091E7 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:56344 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/08/2008 11:55 PM ssecorp wrote: | How can I set emacs to open some specific files at startup, maybe even | split the windows for me? | | Can I save the state of shutdown so I can reopen and just continue | where I left off? | | This would be nice since I work with the same project almost the whole | time. | | | Could this even be set as a menu where I could have different projects | that I could choose to load? Except for the menu for different projects, this does what you're asking for. I've been using it for years. Perhaps it could be hacked a bit to provide a menu. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;Save the current emacs session for the next emacs session. ;; automatically save the desktop to a user-specified file periodically, like auto-save (defun desktop-save-in-home-dir () ~ "save current emacs desktop in file in home directory" ~ (if (buffer-file-name) ;; do only for real files ~ (let (find-file-hooks ;; must - do not loop on this function ~ kill-buffer-hook) ;; must - do not loop on this function ~ (desktop-save "~/") ~ )) ~ nil) (add-hook 'find-file-hooks 'desktop-save-in-home-dir t) (add-hook 'kill-buffer-hook 'desktop-save-in-home-dir t) (defun desktop-auto-save () ~ "Added to auto-save-hook so the desktop is not lost." ~ (desktop-save "~/") ; (message "Wrote desktop.") ~ ) (add-hook 'auto-save-hook 'desktop-auto-save t) ;; load the desktop on startup (desktop-load-default) ;; automatically save the desktop on exit. (setq desktop-enable t) ;;Manually, just do M-x desktop-read to load the last saved desktop. ;;; end auto-saving of desktop ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -- Please note that I will be changing this email address soon. The PGP signature should ensure for everyone that, though the email address will be different, I will be the same person. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFInTwL8CeNiFrQkecRArqIAJ9g3zcOnysptPI/KsydhhN3bFRWuACdF8Hs Il7spZh9iXlnafk16073a80= =Je9P -----END PGP SIGNATURE-----