all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Schmidt <christopher@ch.ristopher.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Use *scratch* for startup messages?
Date: Thu, 10 Jan 2013 10:45:09 +0000 (GMT)	[thread overview]
Message-ID: <87wqvl5nbb@ch.ristopher.com> (raw)
In-Reply-To: <2599377.c8py8TQPV1@horus> (Florian Lindner's message of "Thu, 10 Jan 2013 11:14:48 +0100")

Florian Lindner <mailinglists@xgm.de> 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



      reply	other threads:[~2013-01-10 10:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-09 23:48 Use *scratch* for startup messages? Florian Lindner
2013-01-09 23:53 ` Christopher Schmidt
2013-01-10  2:37   ` drain
2013-01-10 19:56     ` Stefan Monnier
2013-01-10 10:14   ` Florian Lindner
2013-01-10 10:45     ` Christopher Schmidt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wqvl5nbb@ch.ristopher.com \
    --to=christopher@ch.ristopher.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.