From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#1806: dired-pop-to-buffer in wrong place Date: Thu, 30 Apr 2009 14:29:06 -0400 Message-ID: References: <87r63gzcap.fsf@jurta.org> <87d4ezuw6w.fsf@jurta.org> <4964CB72.1090605@gmx.at> <87aba3qb5g.fsf@jurta.org> <4965AE6B.6070802@gmx.at> <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> Reply-To: Stefan Monnier , 1806@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1241117550 14156 80.91.229.12 (30 Apr 2009 18:52:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Apr 2009 18:52:30 +0000 (UTC) Cc: 1806@emacsbugs.donarmstrong.com To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 30 20:52:21 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 1LzbMo-00087E-SC for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Apr 2009 20:52:19 +0200 Original-Received: from localhost ([127.0.0.1]:35723 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LzbMo-0001dc-Bf for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Apr 2009 14:52:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LzbMU-0001Vp-MR for bug-gnu-emacs@gnu.org; Thu, 30 Apr 2009 14:51:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LzbMR-0001UE-1X for bug-gnu-emacs@gnu.org; Thu, 30 Apr 2009 14:51:58 -0400 Original-Received: from [199.232.76.173] (port=45535 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LzbMQ-0001U9-La for bug-gnu-emacs@gnu.org; Thu, 30 Apr 2009 14:51:54 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:59404) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LzbMQ-0003T7-1i for bug-gnu-emacs@gnu.org; Thu, 30 Apr 2009 14:51:54 -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 n3UIpp1N030539; Thu, 30 Apr 2009 11:51:52 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n3UIZ3r2025508; Thu, 30 Apr 2009 11:35:03 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 30 Apr 2009 18:35:03 +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.124111615624091 (code B ref 1806); Thu, 30 Apr 2009 18:35:03 +0000 Original-Received: (at 1806) by emacsbugs.donarmstrong.com; 30 Apr 2009 18:29:16 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3UITC52024077 for <1806@emacsbugs.donarmstrong.com>; Thu, 30 Apr 2009 11:29:14 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlkGAMuK+UnO+ITX/2dsb2JhbACBUM9BgkCBPwWFOg X-IronPort-AV: E=Sophos;i="4.40,274,1238990400"; d="scan'208";a="37829352" Original-Received: from 206-248-132-215.dsl.teksavvy.com (HELO pastel.home) ([206.248.132.215]) by ironport2-out.teksavvy.com with ESMTP; 30 Apr 2009 14:29:07 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 055347F64; Thu, 30 Apr 2009 14:29:07 -0400 (EDT) In-Reply-To: <49F969F9.5010603@gmx.at> (martin rudalics's message of "Thu, 30 Apr 2009 11:06:01 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Thu, 30 Apr 2009 14:51:58 -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:27579 Archived-At: >> Why would it override it? It would of course bind >> split-window-preferred-function to a function that selects the right >> window and then calls the previous value. > Maybe you can come up with some advanced technique to do that but here I > would have to define a variable to save the current (user provided) > `split-window-preferred-function' and call the function I save there > within the body of the function provided by dired. I'd use something like (lexical-let ((oldfun split-window-preferred-function)) (let ((split-window-preferred-function (lambda () (with-selected-window TOTO (funcall oldfun))))) BLABLA)) > Hence an extra variable would be needed anyway and I suppose it's > easier to define that in window.el rather than in all packages that > want to change the window to split (IIRC Calendar was one of these). The above coding should be close to "standard practice" for locally rebinding a *-function variable. The "extra variable" doesn't matter, it's not like we count variables. Maybe what you're getting at is that we should make a hook to influence the window-choice. Maybe so. But it doesn't seem urgent. Stefan