From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rasmus Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] switch to file buffer from command line args regardless of `initial-buffer-choice' Date: Mon, 03 Aug 2015 16:56:44 +0200 Message-ID: <87lhdsmndf.fsf@gmx.us> References: <1425283676.2563.0@mail.samertm.com> <87fv7ge61j.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 X-Trace: ger.gmane.org 1438613853 6116 80.91.229.3 (3 Aug 2015 14:57:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Aug 2015 14:57:33 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 03 16:57:20 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 1ZMHB1-0004S7-DS for ged-emacs-devel@m.gmane.org; Mon, 03 Aug 2015 16:57:19 +0200 Original-Received: from localhost ([::1]:59489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMHB0-0003T2-Gj for ged-emacs-devel@m.gmane.org; Mon, 03 Aug 2015 10:57:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMHAe-0003Gk-Mh for emacs-devel@gnu.org; Mon, 03 Aug 2015 10:56:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMHAZ-0003ni-U7 for emacs-devel@gnu.org; Mon, 03 Aug 2015 10:56:56 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:38759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMHAZ-0003mu-Mp for emacs-devel@gnu.org; Mon, 03 Aug 2015 10:56:51 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZMHAY-0004Dr-0O for emacs-devel@gnu.org; Mon, 03 Aug 2015 16:56:50 +0200 Original-Received: from ip5b4025d5.dynamic.kabel-deutschland.de ([91.64.37.213]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 03 Aug 2015 16:56:49 +0200 Original-Received: from rasmus by ip5b4025d5.dynamic.kabel-deutschland.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 03 Aug 2015 16:56:49 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip5b4025d5.dynamic.kabel-deutschland.de Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAAAAAByaaZbAAAAAmJLR0QA/4ePzL8AAAAJcEhZ cwAAAEgAAABIAEbJaz4AAAFfSURBVEgN7cHBdRtBDETBHxJSQSRIBaEglM6mr96ZpUSJ9NLizc/P VfyLxrxnVLxFmHfEkOINVeCK4GeiZbs99iR/JLvFIQUlK3hl3MCwqDikh2sWhy42B4udXHCxmFOY LRw8CA/gYGtuilM6edCYGa6Ei+8EY66V+U4wxQtyHZIPnZhX0tLMuDhlYe6KJ85sDRJbNOaueGIO aUZsE+KrqOlO7pwc0jhZJocvpgOoST44WARm6RoQi4Do7gQquHGwpHCw1LClEEvUDHfmZCZZSixl qgi2EJ/MSUyxpHBBdAnEjfhgTkbBZgUBhFTiUZiTMCcHDqCbDh612LJDbEopuORkMxMsnbi45O5m EWYTKnPFA2YxaQ4RiDG/1e4EsyiZYYkGm2dpg6xmSYH5NJ7gm7KjQQQnNeZO7aUzCCJlJ4QUfJKD u4EQ5Ztmi+CKwcDA8CM9DkBgfqbYrOC/v94vK5fsMt898OUAAAAASUVORK5CYII= User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:EXWgQtkxrcsugHdgxmVh0NKiXyY= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:188339 Archived-At: Hi, Samer Masterson writes: > The behavior with my patch: If Emacs is given one file arg, it's opened > alongside `initial-buffer-choice'. 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. > > I've separated the command line processing logic for files from the > buffer switching logic. This makes it much more clear what the final > state of the windows will be. Also, whether the buffer list gets displayed is > based on how many buffers are shown, not how many file args there are. How do I get the name of the current buffer with this new behavior? It broke batch export in org-mode cf. bug #21095. To be specific, emacs --no-init-file --batch --file /tmp/foo --eval="(message \"%s\n\" (buffer-file-name))" Used to return "/tmp/foo" before this patch. Now it returns nil. All I want is to run one function on one file. Rasmus -- . . . The proofs are technical in nature and provides no real understanding