From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Question about initial-buffer-choice Date: Fri, 12 Jul 2024 18:02:21 +0300 Message-ID: <86ikxalkle.fsf@gnu.org> References: <2829dbca-971f-4da5-885a-29afce1dbbb1.ref@yahoo.com.tw> <2829dbca-971f-4da5-885a-29afce1dbbb1@yahoo.com.tw> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4318"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 12 17:02:44 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sSHnI-0000xh-5n for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 12 Jul 2024 17:02:44 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSHn1-0004jv-VU; Fri, 12 Jul 2024 11:02:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sSHmz-0004jS-T1 for help-gnu-emacs@gnu.org; Fri, 12 Jul 2024 11:02:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sSHmz-0007u2-KJ for help-gnu-emacs@gnu.org; Fri, 12 Jul 2024 11:02:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=R6GMKmjDc0aOzin/kUYpaA/j45Y3Zg7P/Esng1aEi8M=; b=o/F4WZ63vTqy VULgLVS17tkEjPwHxyTLUiuu0pTcMeqVMgderUZNUeJjWdu817KJSj/3Luut44aDO3RTxHq+eyl3j 9tNgZfmJIUacdA1YBnVJTktLJjoR9nbijOXjKtuuIux6tpp16LMWw3YkHb0G+MobnVg6BxbehzgHc 24LP88vL3maBgwuJnXdctnAK0j6FsF+Q2BRbgkzk6yXZAwhm7dw56eAf6lrrbMd/AEIWuM6tv3iic 3PPcDTWFlq7zoHVG/pPx4hKCljcBxpj15tVWjzY0To5LBAamV2q35h5MEirPL9MflakcXv7iCDz7y /geUem6r4inlK2QZu03Btg==; In-Reply-To: <2829dbca-971f-4da5-885a-29afce1dbbb1@yahoo.com.tw> (message from CToID on Fri, 12 Jul 2024 21:24:56 +0800) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147171 Archived-At: > Date: Fri, 12 Jul 2024 21:24:56 +0800 > From: CToID > > So for example, if `initial-buffer-choice` is set to t, and I try to > open a file in Emacs using command-line, i. e. enter `emacs foobar.js` > in my terminal. Then Emacs will start up, but in addition to one window > displaying the content of `foobar.js`, there is also another window > containing scratch buffer. > > I'm not sure if this is intended behaviour or not, but if Emacs is > started through command-line, with file arguments given, shouldn't it > only display the content of file(s), but not the initial buffer? When this variable is non-nil, its value is handled as an additional command-line argument. So yes, this is the intended behavior when you start Emacs with names of files or directories from the command line.