From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#15189: 24.3.50; display-buffer does not work well with custom frames. Date: Mon, 26 Aug 2013 18:34:33 +0200 Message-ID: <521B8399.8000907@gmx.at> References: <521B52E8.3050109@gmx.at> <4066A3F6-AB96-43EE-B8F4-E3DF2F73CBD2@lawlist.com> <521B6B84.5060106@gmx.at> <742F02FA-4469-4BCA-94A5-D8A7A679B52B@lawlist.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1377534917 26718 80.91.229.3 (26 Aug 2013 16:35:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Aug 2013 16:35:17 +0000 (UTC) Cc: 15189@debbugs.gnu.org To: Keith David Bershatsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 26 18:35:18 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1VDzl7-0008QV-Lw for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Aug 2013 18:35:17 +0200 Original-Received: from localhost ([::1]:52208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDzl7-0007Xn-9f for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Aug 2013 12:35:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDzky-0007PS-HC for bug-gnu-emacs@gnu.org; Mon, 26 Aug 2013 12:35:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VDzks-0000x8-IY for bug-gnu-emacs@gnu.org; Mon, 26 Aug 2013 12:35:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34793) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDzks-0000wz-G6 for bug-gnu-emacs@gnu.org; Mon, 26 Aug 2013 12:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VDzkr-0003FK-Ux for bug-gnu-emacs@gnu.org; Mon, 26 Aug 2013 12:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Aug 2013 16:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15189 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15189-submit@debbugs.gnu.org id=B15189.137753488412451 (code B ref 15189); Mon, 26 Aug 2013 16:35:01 +0000 Original-Received: (at 15189) by debbugs.gnu.org; 26 Aug 2013 16:34:44 +0000 Original-Received: from localhost ([127.0.0.1]:57342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VDzka-0003El-90 for submit@debbugs.gnu.org; Mon, 26 Aug 2013 12:34:44 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:64179) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VDzkY-0003Ea-3J for 15189@debbugs.gnu.org; Mon, 26 Aug 2013 12:34:43 -0400 Original-Received: from [62.47.36.96] ([62.47.36.96]) by mail.gmx.com (mrgmx001) with ESMTPA (Nemesis) id 0Ltqb7-1WENtd3Qu5-01192s for <15189@debbugs.gnu.org>; Mon, 26 Aug 2013 18:34:40 +0200 In-Reply-To: <742F02FA-4469-4BCA-94A5-D8A7A679B52B@lawlist.com> X-Provags-ID: V03:K0:UpyXhkDMtvEhqs8RfzUaqZBkeWaoSoW94q2cpX+nMXJiBKWEY+q 96Inffn+BgSvNAChUAYWOFa91JsLgLdkIWwmHJQwrfYRxVZEzzlaBNXHsaBysZkvikViiJQ U3ObO3tb3B2b75HsUCpjZhZzeQnQ4TzCkixoqQnCZRr4jpxMI4R9d6c7QW0obVmI2aOd01r NmnXgf1KavZLxONpg9fWQ== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:77749 Archived-At: Please keep 15189@debbugs.gnu.org CCed so others can read your mails too. > Yes, that works now if we also add the following line to the end of > lawlist-display-buffer-function: (switch-to-buffer (get-file-buffer > buffer-filename)) I'm still not quite sure whether I understand what you want to do. An idiom like (display-buffer (find-file buffer-filename)) is practically always wrong because it usually will (1) display the buffer via `find-file' which calls `switch-to-buffer' which bypasses `display-buffer' by calling `set-window-buffer' directly and (2) display the buffer a second time which might result in reusing the window used in (1) but may also use another window according to your buffer display settings. In any case, a doc-string like "Locate or create a specific frame, and then open the file." is inappropriate because the function nowhere does what you say here. > I expected display-buffer to execute the display-buffer-function first > in time (e.g., before executing find-file), but that is not the case. I'm afraid you're confusing things here. `display-buffer' does execute `display-buffer-function' first but its arguments get evaluated before its body. This is something you certainly want too because how would `display-buffer' otherwise know the buffer it is supposed to display? > If the purpose of display-buffer is not to execute the > display-buffer-function first in time (e.g., before executing > find-file), then I made an erroneous assumption regarding the reason > for using display-buffer. I suppose you made the erroneous assumption that `find-file' does not display the file's buffer. That's why I suggested to use `find-file-noselect' instead. Anyway, using `display-buffer-function' is deprecated since Emacs 24.3 and was hardly used in previous versions. What you probably want to do is to customize `display-buffer-alist' instead. martin