From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#29999: `initial-buffer-choice' function can result in duplicate buffer display Date: Tue, 17 Apr 2018 23:55:47 +0200 Message-ID: <878t9lfqfw.fsf@mouse.gnus.org> References: <5594011c-2604-8cc1-036e-8f828aaf73c8@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1524002050 10369 195.159.176.226 (17 Apr 2018 21:54:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 17 Apr 2018 21:54:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 29999@debbugs.gnu.org To: David Beswick Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 17 23:54:06 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f8YYA-0002a5-0B for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Apr 2018 23:54:06 +0200 Original-Received: from localhost ([::1]:37363 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8YaG-0003VN-Iv for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Apr 2018 17:56:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8Ya5-0003TN-4l for bug-gnu-emacs@gnu.org; Tue, 17 Apr 2018 17:56:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f8Ya1-0006E2-W9 for bug-gnu-emacs@gnu.org; Tue, 17 Apr 2018 17:56:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50218) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f8Ya1-0006DQ-RC for bug-gnu-emacs@gnu.org; Tue, 17 Apr 2018 17:56:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f8Ya1-0002Mi-K1 for bug-gnu-emacs@gnu.org; Tue, 17 Apr 2018 17:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Apr 2018 21:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29999 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29999-submit@debbugs.gnu.org id=B29999.15240021609078 (code B ref 29999); Tue, 17 Apr 2018 21:56:01 +0000 Original-Received: (at 29999) by debbugs.gnu.org; 17 Apr 2018 21:56:00 +0000 Original-Received: from localhost ([127.0.0.1]:58113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f8YZz-0002ML-RH for submit@debbugs.gnu.org; Tue, 17 Apr 2018 17:55:59 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:39461) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f8YZx-0002M6-Sb for 29999@debbugs.gnu.org; Tue, 17 Apr 2018 17:55:58 -0400 Original-Received: from 46.67.12.60.tmi.telenormobil.no ([46.67.12.60] helo=corrigan) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1f8YZt-0005Kl-S0; Tue, 17 Apr 2018 23:55:55 +0200 Original-Received: from larsi by corrigan with local (Exim 4.89) (envelope-from ) id 1f8YZn-00035H-Qh; Tue, 17 Apr 2018 23:55:47 +0200 In-Reply-To: <5594011c-2604-8cc1-036e-8f828aaf73c8@gmail.com> (David Beswick's message of "Sat, 6 Jan 2018 11:36:40 +1100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:145531 Archived-At: David Beswick writes: > Hello, just a minor bug relating to the behaviour of startup.el's > `command-line-1' and the `initial-buffer-choice' variable. When an > `initial-buffer-choice' function returns the head of the > `displayable-buffers' list in `command-line-1' then Emacs starts with > that same buffer visited in two windows. I would expect it should only > be shown in a single window. > > To be concrete, I ran into this behavior as on startup I wanted to > display a particular buffer that I create except when a file is given > on the command line. In that case I want to visit the given file > instead. > > The behavior can be reproduced by creating a file `bug-init.el': Thanks; I've applied your patch to Emacs 27.1. But a note about the patch: It had been mangled by your mailer (all the spaces had been turned into non-breaking space), so I had to do it by hand, but hopefully I got it right. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no