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#1806: dired-pop-to-buffer in wrong place Date: Sat, 02 May 2009 20:53:08 +0200 Message-ID: <49FC9694.5050008@gmx.at> References: <87r63gzcap.fsf@jurta.org> <87fxjtmo4z.fsf@jurta.org> <49671922.4080609@gmx.at> <87zlhubw10.fsf@jurta.org> <496DF4B9.3080805@gmx.at> <496E5F58.7030304@gmx.at> <496F11C0.4080700@gmx.at> <87ocy8fajt.fsf@jurta.org> <4975F4D5.5030000@gmx.at> <87y6tk1j47.fsf@mail.jurta.org> <49F7FE14.8010107@gmx.at> <49F969F9.5010603@gmx.at> <49FAC921.5010201@gmx.at> <878wlfk9lm.fsf@mail.jurta.org> <49FC4600.8010902@gmx.at> <877i0zipad.fsf@mail.jurta.org> Reply-To: martin rudalics , 1806@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060008010802030009080507" X-Trace: ger.gmane.org 1241291536 1947 80.91.229.12 (2 May 2009 19:12:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 May 2009 19:12:16 +0000 (UTC) Cc: 1806@emacsbugs.donarmstrong.com To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 02 21:12:07 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M0Kd4-0005St-Bj for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 May 2009 21:12:06 +0200 Original-Received: from localhost ([127.0.0.1]:57577 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M0Kd3-0001I2-8G for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 May 2009 15:12:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M0Kcz-0001HX-Fi for bug-gnu-emacs@gnu.org; Sat, 02 May 2009 15:12:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M0Kct-0001Gl-Tc for bug-gnu-emacs@gnu.org; Sat, 02 May 2009 15:12:00 -0400 Original-Received: from [199.232.76.173] (port=43252 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M0Kct-0001Gi-NJ for bug-gnu-emacs@gnu.org; Sat, 02 May 2009 15:11:55 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:39198) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M0Kct-00030x-5z for bug-gnu-emacs@gnu.org; Sat, 02 May 2009 15:11:55 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n42JBqTu006373; Sat, 2 May 2009 12:11:52 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n42JA45p005159; Sat, 2 May 2009 12:10:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 02 May 2009 19:10:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 1806 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1806-submit@emacsbugs.donarmstrong.com id=B1806.12412910532861 (code B ref 1806); Sat, 02 May 2009 19:10:04 +0000 Original-Received: (at 1806) by emacsbugs.donarmstrong.com; 2 May 2009 19:04:13 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id n42J48gH002849 for <1806@emacsbugs.donarmstrong.com>; Sat, 2 May 2009 12:04:09 -0700 Original-Received: (qmail invoked by alias); 02 May 2009 19:04:02 -0000 Original-Received: from 88-117-36-121.adsl.highway.telekom.at (EHLO [88.117.36.121]) [88.117.36.121] by mail.gmx.net (mp048) with SMTP; 02 May 2009 21:04:02 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+rZBAY6WSrPFry/Mroa3pn9rZHJ28trefUB+uTYQ k/CA23YhBox4e5 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <877i0zipad.fsf@mail.jurta.org> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.78,0.65 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 02 May 2009 15:12:00 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:27628 Archived-At: This is a multi-part message in MIME format. --------------060008010802030009080507 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit >> Did you try it after applying my patch for window.el? > > Yes, with your patch for window.el and in a frame wider than 160 columns. My bad. Does the attached patch give better results? martin --------------060008010802030009080507 Content-Type: text/plain; name="dired.el.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dired.el.diff" *** dired.el.~1.422.~ 2009-04-18 08:32:56.546875000 +0200 --- dired.el 2009-05-02 20:49:03.656250000 +0200 *************** *** 2686,2694 **** (defun dired-pop-to-buffer (buf) "Pop up buffer BUF in a way suitable for Dired." ! ;; Don't split window horizontally. (Bug#1806) ! (let (split-width-threshold) ! (pop-to-buffer (get-buffer-create buf))) ;; If dired-shrink-to-fit is t, make its window fit its contents. (when dired-shrink-to-fit ;; Try to not delete window when we want to display less than --- 2686,2698 ---- (defun dired-pop-to-buffer (buf) "Pop up buffer BUF in a way suitable for Dired." ! (lexical-let ((old-fun split-window-preferred-function) ! (old-window (selected-window))) ! (let ((split-window-preferred-function ! (lambda () ! (let (split-width-threshold) ! (with-selected-window old-window (funcall old-fun)))))) ! (pop-to-buffer (get-buffer-create buf)))) ;; If dired-shrink-to-fit is t, make its window fit its contents. (when dired-shrink-to-fit ;; Try to not delete window when we want to display less than --------------060008010802030009080507--