From unknown Sat Jun 21 03:18:26 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#23509 <23509@debbugs.gnu.org> To: bug#23509 <23509@debbugs.gnu.org> Subject: Status: 24.4; initial-buffer-choice bug with zero-argument lambda Reply-To: bug#23509 <23509@debbugs.gnu.org> Date: Sat, 21 Jun 2025 10:18:26 +0000 retitle 23509 24.4; initial-buffer-choice bug with zero-argument lambda reassign 23509 emacs submitter 23509 "Alfonsogonzalez, Ernesto (GE Digital)" severity 23509 normal tag 23509 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Tue May 10 15:15:41 2016 Received: (at submit) by debbugs.gnu.org; 10 May 2016 19:15:41 +0000 Received: from localhost ([127.0.0.1]:46242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0D89-00068L-1P for submit@debbugs.gnu.org; Tue, 10 May 2016 15:15:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0CoH-0005aE-Hy for submit@debbugs.gnu.org; Tue, 10 May 2016 14:55:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0Co8-0000zn-AF for submit@debbugs.gnu.org; Tue, 10 May 2016 14:55:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40680) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0Co8-0000zi-7L for submit@debbugs.gnu.org; Tue, 10 May 2016 14:55:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0Co2-000886-RF for bug-gnu-emacs@gnu.org; Tue, 10 May 2016 14:55:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0Cny-0000v1-AP for bug-gnu-emacs@gnu.org; Tue, 10 May 2016 14:54:54 -0400 Received: from mx0b-00176a03.pphosted.com ([67.231.157.48]:35536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0Cny-0000uJ-3p for bug-gnu-emacs@gnu.org; Tue, 10 May 2016 14:54:50 -0400 Received: from pps.filterd (m0048205.ppops.net [127.0.0.1]) by m0048205.ppops.net-00176a03. (8.16.0.11/8.16.0.11) with SMTP id u4AIrZQ8047947 for ; Tue, 10 May 2016 14:54:47 -0400 From: "Alfonsogonzalez, Ernesto (GE Digital)" To: "bug-gnu-emacs@gnu.org" Subject: 24.4; initial-buffer-choice bug with zero-argument lambda Thread-Topic: 24.4; initial-buffer-choice bug with zero-argument lambda Thread-Index: AdGq7WiB0LIu5y4MRC+293iDJMsCog== Date: Tue, 10 May 2016 18:54:40 +0000 Message-ID: <2A734D896A45164C887E476E942BF4F9B601A2@CINMBCNA09.e2k.ad.ge.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [3.159.17.83] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-05-10_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000 definitions=main-1605100257 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 10 May 2016 15:15:39 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) 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.=20 According to docs,=20 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. In GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5) of 2015-03-07 on trouble, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11604000 System Description: Debian GNU/Linux 8.4 (jessie) Configured using: `configure --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24= .4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.4/site-li= sp:/usr/share/emacs/site-lisp --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24= .4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.4/site-li= sp:/usr/share/emacs/site-lisp --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars 'CFLAGS=3D-g -O2 -fstack-protector-strong -Wformat -Werror=3Dformat-security -Wall' CPPFLAGS=3D-D_FORTIFY_SOURCE=3D2 LDFLAGS=3D-Wl,-z,relro' Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x r e p o r Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. C-v is undefined Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 71134 7300) (symbols 48 17572 0) (miscs 40 36 138) (strings 32 9071 4631) (string-bytes 1 250236) (vectors 16 8912) (vector-slots 8 383117 18328) (floats 8 63 207) (intervals 56 213 4) (buffers 960 11) (heap 1024 49511 878)) From debbugs-submit-bounces@debbugs.gnu.org Tue May 10 16:07:58 2016 Received: (at 23509) by debbugs.gnu.org; 10 May 2016 20:07:58 +0000 Received: from localhost ([127.0.0.1]:46276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0Dwj-0007Lt-Tc for submit@debbugs.gnu.org; Tue, 10 May 2016 16:07:58 -0400 Received: from mail-yw0-f169.google.com ([209.85.161.169]:33330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0Dwh-0007Lg-Mx for 23509@debbugs.gnu.org; Tue, 10 May 2016 16:07:56 -0400 Received: by mail-yw0-f169.google.com with SMTP id t10so25899754ywa.0 for <23509@debbugs.gnu.org>; Tue, 10 May 2016 13:07:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SyTNVtLqD/CD5a6DP/BvtXBuzfEQ8jDbZj8PF20AD8s=; b=GuCOE0VD9NcSPHk8aybuDOxhjyT8RO8N6qGHWp8KnXvh7z3oGZqJft6E4hmgmddV43 6Fvc/49Wt0lBBS9Cb90xpv83Am1C1zqRQAEAIY/8P+QDzsEnuWmTdrqACF8duO4xccin Kf4Iuu7LgB+JySPwchaqUb4ncP+XYPkKNjVtKG73Lwet0/lOU9bjPOHOpiBtm+cdBYU0 OYpfXkOIM7RYCi76CA3Ep2ITEKlLUz4v9ST7jAVIHMpMTI/26zR7zr3LP0vpkJ4xnHZh IRZyI5dH1ifd+ToAhD0T+nxVRrnpxyH76w9XsYQ8g8bKsJoW2jkouUK63MIk+E+3jwl+ 36CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SyTNVtLqD/CD5a6DP/BvtXBuzfEQ8jDbZj8PF20AD8s=; b=m5HLmQoQN9bwOpX3fWZpUVL79Bzp9bKVaPxvr8rt+6DgPLqfJldWos+1GmqCKdbeJA FVhuFGcjJgqqbmfcKL3rtnWAGrBQ/wnSpvxzKH+2190HoUnO3icaelewRgmR95/nPofl UIF+j3wk8z3ng7iwTAjUhqA7mBHoZjhCJVZZYglvhK27T6gdU4zXMGCLzXLkkMmeDv54 6nVsX9gIN0qRPQwAoKr3HKTS87oRc0Hqgm4/wfn+Wa/u2NIGxIKa/XX/S4xWcBLak37e 1F2BBRL8ShAP3xYLOjs9jZz//hjL81CD43xPZ81Vr2NiT0cWWzTAF5NEs6EXQkQcLn1s Rv8Q== X-Gm-Message-State: AOPr4FWEYnIRnHSN45xyDXQHTAClGF9hNnyuasyfrf6cpBfm0ZT19JuSfqGhAuIEYXecmD/B9F69irG5JINz3Q== X-Received: by 10.37.56.84 with SMTP id f81mr6980655yba.159.1462910870117; Tue, 10 May 2016 13:07:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.98.81 with HTTP; Tue, 10 May 2016 13:07:30 -0700 (PDT) In-Reply-To: <2A734D896A45164C887E476E942BF4F9B601A2@CINMBCNA09.e2k.ad.ge.com> References: <2A734D896A45164C887E476E942BF4F9B601A2@CINMBCNA09.e2k.ad.ge.com> From: John Mastro Date: Tue, 10 May 2016 13:07:30 -0700 Message-ID: Subject: Re: bug#23509: 24.4; initial-buffer-choice bug with zero-argument lambda To: 23509@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 23509 Cc: "Alfonsogonzalez, Ernesto \(GE Digital\)" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Alfonsogonzalez, Ernesto (GE Digital) 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 From debbugs-submit-bounces@debbugs.gnu.org Tue May 10 16:18:15 2016 Received: (at 23509) by debbugs.gnu.org; 10 May 2016 20:18:15 +0000 Received: from localhost ([127.0.0.1]:46295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0E6h-0007bk-7q for submit@debbugs.gnu.org; Tue, 10 May 2016 16:18:15 -0400 Received: from mout.web.de ([212.227.17.12]:56507) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0E6e-0007bW-ST for 23509@debbugs.gnu.org; Tue, 10 May 2016 16:18:13 -0400 Received: from drachen.dragon ([94.217.122.112]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0MUncu-1b7v7r08M8-00YDWR; Tue, 10 May 2016 22:12:47 +0200 From: Michael Heerdegen To: "Alfonsogonzalez\, Ernesto \(GE Digital\)" Subject: Re: bug#23509: 24.4; initial-buffer-choice bug with zero-argument lambda References: <2A734D896A45164C887E476E942BF4F9B601A2@CINMBCNA09.e2k.ad.ge.com> Date: Tue, 10 May 2016 22:12:44 +0200 In-Reply-To: <2A734D896A45164C887E476E942BF4F9B601A2@CINMBCNA09.e2k.ad.ge.com> (Ernesto Alfonsogonzalez's message of "Tue, 10 May 2016 18:54:40 +0000") Message-ID: <8760ulk6yr.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:0a3aqLMjbwmGtt2+r12p26u6acXjOdEaKN1vV4vJGlHtb7VvS8P AQwhi0pGyqAOZ58bXSmvFG8LGVxP0CfdD7jJmuQ7Rqvc7BmOnP3GLuo/WplC3TiNYTBQp/6 YYS/glDnZ2S1ikmLVn2UZ7JCMzzayTp4VEpyBrCXfQzy3cP0w8J26nSuyz4I8QUcc4eO6V1 k6atzYmicj3CxpxZVe6bQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:2h2C3WxVD0g=:ctdRBml1SQS45y1CN1uygF fGm3C8wOjGxjnPVEqOthC/ROLtr6y679BYifnedJybgPtSd55V6I/V2QMRSbSJEsPijodZSbd zwiUES8h1ywNi6oHfKGAZ6Ak6AxfDOaew+FIF0mWqUZGC1vEhmSL5oiXxBQ56kqPbdlzBHWV5 2H1G+UWKCqFIkI1wqM5hSfOKPbw7km+t6X8LnJmNyc1LBXty8yBIE4nwZlxOBDTP7f39CJ8la /y8z8RMiYiGh0RfZNbQrZ1jBWLc/T7qKeA0anoTFCG4Fs95pd96EQYjtdWQyMvGGSFkPflqh/ x8SZISosGoc1IsuvAy6LiDmzgnNsRR8G5Ij7UbfK7RJieJS/1W0ozr38a1D3O0f08806r4Bqe dEcUL38P7sdbCWmymh7voJ/YXQLWnl9/J/JjUUGu7xAMUh2DuGvdYaiACGbzBX2adzAL7TYyA DUCxxE8cy3FiR2QbmUAfTZ2s87lTq+8wUuZJejlF7E9buU3YQauZZamdvM3MA8f8VuZFyFX1n eY3bOwIBANRF5Kd6kg8oBRXiZ80UtC1HfqhX5T2Ss+4OU47hhiP6/UrExEdqablmmmn0Fgf8H R7kvTmWGJk7cCD3CRgxxID6AK6D63nWVLcO2ztCBnidJo8k0mjfZ+CsMuwS/lch0unKOkO1TM TANK/pDPagRemBNlYkuDze9LWOVdqvU20yHvRNCcUBDRK1ma9b+d7ZkpTHuuAglXELNe9Gi5Y m4XCyVz+UXbT3TiYbl7CofKXqNT/w5+hmHW49VdZlvltX81/s74MhVkuSkb+PaDpzxCgiP1UN +1260vw X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 23509 Cc: 23509@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) "Alfonsogonzalez, Ernesto (GE Digital)" writes: > (setq initial-buffer-choice > ;"~/";;works > (lambda () > '(call-interactively 'org-agenda-list) > "*Org Agenda*" > "~/");;doesn't work, opens 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. Your function doesn't return a buffer. Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed May 11 14:31:45 2016 Received: (at control) by debbugs.gnu.org; 11 May 2016 18:31:45 +0000 Received: from localhost ([127.0.0.1]:47631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0YvB-0007Zb-2S for submit@debbugs.gnu.org; Wed, 11 May 2016 14:31:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0Yv8-0007ZO-TH for control@debbugs.gnu.org; Wed, 11 May 2016 14:31:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0Yv2-0000fX-IU for control@debbugs.gnu.org; Wed, 11 May 2016 14:31:37 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0Yv2-0000do-Et for control@debbugs.gnu.org; Wed, 11 May 2016 14:31:36 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1b0Yv0-0000Iy-Rq for control@debbugs.gnu.org; Wed, 11 May 2016 14:31:34 -0400 Subject: control message for bug 23509 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Wed, 11 May 2016 14:31:34 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) tag 23509 notabug close 23509 From unknown Sat Jun 21 03:18:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 09 Jun 2016 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator