From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: find-file-read-args Date: Sun, 15 Nov 2009 17:09:37 +0200 Organization: JURTA Message-ID: <871vjz27lw.fsf@mail.jurta.org> References: <3b31caf90911051613w80af4cu61352a29ce5dcd77@mail.gmail.com> <87vdhoe73d.fsf@mail.jurta.org> <87y6mkb6qr.fsf@mail.jurta.org> <87bpjfiark.fsf@mail.jurta.org> <871vk8uo0q.fsf@mail.jurta.org> <87ocn8ayrw.fsf@mail.jurta.org> <4AFBE741.1040506@gmx.at> <87tyx05849.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1258299329 14503 80.91.229.12 (15 Nov 2009 15:35:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Nov 2009 15:35:29 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 15 16:35:22 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N9h8L-0000rt-2X for ged-emacs-devel@m.gmane.org; Sun, 15 Nov 2009 16:35:21 +0100 Original-Received: from localhost ([127.0.0.1]:49520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N9h8K-0001SA-Ku for ged-emacs-devel@m.gmane.org; Sun, 15 Nov 2009 10:35:20 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N9h7K-0000T2-12 for emacs-devel@gnu.org; Sun, 15 Nov 2009 10:34:18 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N9h7F-0000Qc-Am for emacs-devel@gnu.org; Sun, 15 Nov 2009 10:34:17 -0500 Original-Received: from [199.232.76.173] (port=35881 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N9h7F-0000QZ-2p for emacs-devel@gnu.org; Sun, 15 Nov 2009 10:34:13 -0500 Original-Received: from smtp-out1.starman.ee ([85.253.0.3]:57730 helo=mx1.starman.ee) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N9h7E-0002S0-CJ for emacs-devel@gnu.org; Sun, 15 Nov 2009 10:34:12 -0500 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.29.120.cable.starman.ee [82.131.29.120]) by mx1.starman.ee (Postfix) with ESMTP id 1BD263F417D; Sun, 15 Nov 2009 17:34:06 +0200 (EET) In-Reply-To: <87tyx05849.fsf@mail.jurta.org> (Juri Linkov's message of "Thu, 12 Nov 2009 12:51:18 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:117007 Archived-At: >>> There is still one problem. Due to the dynamical nature of M-n, it needs >>> to visit the original buffer to get file names at point at the time when >>> the current buffer if the minibuffer. I tried to find the original buffer >>> with the help of `(with-current-buffer (window-buffer (next-window)) ...' >>> but it often finds the wrong buffer when there are more than one window on >>> the frame. Could you suggest a method for finding the original buffer, >>> from which the minibuffer was activated. Maybe we should add a new >>> variable to hold the value of the original buffer set during >>> minibuffer setup? >> >> Isn't that the buffer shown in `minibuffer-selected-window'? > > Thank you, I'll try to use this. Unfortunately, `minibuffer-selected-window' is useless for Dired. It returns the wrong window. Instead of returning the original Dired buffer's window it returns " *Marked Files*". How this can be reproduced: 1. emacs -Q 2. (setq enable-recursive-minibuffers t) 3. `C-x d' 4. Mark more than 1 file 5. Type `C' 6. Type `M-: (window-buffer (minibuffer-selected-window)) RET' Result: # -- Juri Linkov http://www.jurta.org/emacs/