help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use *scratch* for startup messages?


From: Christopher Schmidt
Subject: Re: Use *scratch* for startup messages?
Date: Thu, 10 Jan 2013 10:45:09 +0000 (GMT)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]