GNU bug report logs -
#23509
24.4; initial-buffer-choice bug with zero-argument lambda
Previous Next
Full log
View this message in rfc822 format
Alfonsogonzalez, Ernesto (GE Digital) <ernesto.alfonsogonzalez <at> ge.com> wrote:
> 1. create file /tmp/emacs-bug.el with contents
>
> (setq initial-buffer-choice
> ;"~/";;works
> (lambda ()
> '(call-interactively 'org-agenda-list)
> "*Org Agenda*"
> "~/");;doesn't work, opens scratch buffer
> )
>
> 2. emacs -Q -l /tmp/emacs-bug.el
> 3. scratch buffer opens.
>
> According to docs,
>
> If the value is nil and `inhibit-startup-screen' is nil, show the
> startup screen. If the value is a string, switch to a buffer
> visiting the file or directory that the string specifies. If the
> value is a function, call it with no arguments and switch to the buffer
> that it returns. If t, open the `*scratch*' buffer.
> If the value is nil and `inhibit-startup-screen' is nil, show the
> startup screen. If the value is a string, switch to a buffer
> visiting the file or directory that the string specifies. If the
> value is a function, call it with no arguments and switch to the buffer
> that it returns. If t, open the `*scratch*' buffer.
The docs you quoted say "if the value is a function, call it with no
arguments and switch to the buffer that it returns", but your function
does not return a buffer (it returns the string "~/").
I'm not sure what your ultimate intent was. However, if you're trying to
run `org-agenda-list' but show a buffer visiting your home directory,
maybe this will help:
(setq initial-buffer-choice
(lambda ()
(org-agenda-list)
(find-file "~/")))
The difference is that `find-file' visits "~/" and returns a buffer. I
omitted the "*Org Agenda*" line from your example because it has no
effect.
--
john
This bug report was last modified 9 years and 13 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.