From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] switch to file buffer from command line args regardless of `initial-buffer-choice' Date: Wed, 20 May 2015 14:36:48 -0400 Message-ID: References: <1425283676.2563.0@mail.samertm.com> <87fv7ge61j.fsf@f-box.i-did-not-set--mail-host-address--so-tickle-me> <87oall2p4o.fsf@f-box.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1432147043 29527 80.91.229.3 (20 May 2015 18:37:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 May 2015 18:37:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: Samer Masterson Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 20 20:37:15 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Yv8ri-0001cQ-DB for ged-emacs-devel@m.gmane.org; Wed, 20 May 2015 20:37:14 +0200 Original-Received: from localhost ([::1]:53680 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yv8rh-0006id-J7 for ged-emacs-devel@m.gmane.org; Wed, 20 May 2015 14:37:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yv8rQ-0006h1-Qf for emacs-devel@gnu.org; Wed, 20 May 2015 14:37:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yv8rL-0004FR-OC for emacs-devel@gnu.org; Wed, 20 May 2015 14:36:56 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:43773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yv8rL-0004FN-IV for emacs-devel@gnu.org; Wed, 20 May 2015 14:36:51 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t4KIamx5029775; Wed, 20 May 2015 14:36:49 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id C5E3E66092; Wed, 20 May 2015 14:36:48 -0400 (EDT) In-Reply-To: <87oall2p4o.fsf@f-box.i-did-not-set--mail-host-address--so-tickle-me> (Samer Masterson's message of "Fri, 15 May 2015 20:11:03 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5312=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5312> : inlines <3041> : streams <1441896> : uri <1935539> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:186673 Archived-At: >> After it's finished processing the command line args, it switches to the >> buffer `initial-buffer-choice'. It does not open the startup screen if >> `initial-buffer-choice' is non-nil, and it does not switch to any files. >> It will open *Buffers List* if three or more files are given to it. >>=20 >> The behavior with my patch: If Emacs is given one file arg, it's opened >> alongside `initial-buffer-choice'. Hmm... shouldn't it just display that file's buffer and ignore initial-buffer-choice? Wait, I see the doc says: displayed. If =E2=80=98initial-buffer-choice=E2=80=99 is non-=E2=80=98n= il=E2=80=99, then if you specify any files on the command line, Emacs still visits them, but does not display them initially. So I guess no, we shouldn't ignore initial-buffer-choice when there are files specified on the command line. So your patch will require updating the doc, but I think the behavior it provides is good. >> If Emacs is given two or more file args, then it will display >> `initial-buffer-choice' and *Buffer List*, which is consistent with >> the current behavior when `initial-buffer-choice' is nil and Emacs is >> given more files than it can display. Sounds good. >> Thanks in advance for the review! You're welcome. Feel free to install it. I hope my review wasn't too prompt, tho, Stefan