From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christopher Schmidt Newsgroups: gmane.emacs.help Subject: Re: Use *scratch* for startup messages? Date: Thu, 10 Jan 2013 10:45:09 +0000 (GMT) Message-ID: <87wqvl5nbb@ch.ristopher.com> References: <87zk0hap6h@ch.ristopher.com> <2599377.c8py8TQPV1@horus> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1357814730 22566 80.91.229.3 (10 Jan 2013 10:45:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Jan 2013 10:45:30 +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 Jan 10 11:45:48 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TtFdn-0007vk-94 for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Jan 2013 11:45:43 +0100 Original-Received: from localhost ([::1]:33008 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtFdX-0007pP-F0 for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Jan 2013 05:45:27 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtFdP-0007oO-Th for help-gnu-emacs@gnu.org; Thu, 10 Jan 2013 05:45:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TtFdI-0006it-OM for help-gnu-emacs@gnu.org; Thu, 10 Jan 2013 05:45:19 -0500 Original-Received: from ristopher.com ([146.185.21.93]:41358 helo=saturn.ch.ristopher.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtFdI-0006iN-Gb for help-gnu-emacs@gnu.org; Thu, 10 Jan 2013 05:45:12 -0500 Original-Received: by saturn.ch.ristopher.com (Postfix, from userid 0) id 69F43203F6; Thu, 10 Jan 2013 10:45:09 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ch.ristopher.com; s=mail; t=1357814709; bh=CHqmjMCPDrRNx8f/13VvsbPDEBwRWbGqEWXniM8TSSQ=; h=From:To:Subject:In-Reply-To:Message-ID:References:MIME-Version: Content-Type:Date; b=kUAFMT7CRDj9Y292Sq4qQxhlUlxQRrWHQ99Rq5wauG+cnlr1ZBtjM7iiO3DyeME1Q 6oQB6UygXOISLr26Sm9K/++aK0u1kA/7+rpig2Re3siF7sg0D//o1q1vkTDdX6sRBJ TA2pLaZHSQOpHdnvo9B57ETBmZy1+vvDzP2FND6s= In-Reply-To: <2599377.c8py8TQPV1@horus> (Florian Lindner's message of "Thu, 10 Jan 2013 11:14:48 +0100") Mail-Followup-To: help-gnu-emacs@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 146.185.21.93 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:88551 Archived-At: Florian Lindner writes: > (with-current-buffer "*scratch*" > (insert > (save-window-excursion > org-todo-list))) ^^^^^^^^^^^^^ > > but I get: Symbol's value as variable is void: org-todo-list (org-todo-list) (buffer-string) BTW you can evaluate any function or form, e.g. split-window-below (C-x 2), split-window-right (C-x 3) or other-window (C-x o), to build an arbitrary window configuration after startup. (run-at-time nil nil (lambda () (split-window-below) (switch-to-buffer (save-window-excursion (org-todo-list) (current-buffer))) (other-window 1) (switch-to-buffer (with-current-buffer (get-buffer-create "<3") (insert "RMS") (current-buffer))))) I use run-at-time so the configuration is set after Emacs messes with the window configuration due to initial-buffer-choice. Emacs does this after running after-init-hook. Christopher