From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.help Subject: Re: menu command Date: Mon, 27 Aug 2018 15:03:00 +0200 Message-ID: <20180827130300.GD16347@tuxteam.de> References: <20180827112150.GA16347@tuxteam.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1535375415 13685 195.159.176.226 (27 Aug 2018 13:10:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 27 Aug 2018 13:10:15 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) Cc: help-gnu-emacs@gnu.org To: Lajos Bodnar Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 27 15:10:11 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fuHHW-0003TA-QS for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Aug 2018 15:10:10 +0200 Original-Received: from localhost ([::1]:53172 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuHJd-0008Ad-0Z for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Aug 2018 09:12:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42007) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuHAg-0007Kk-6H for help-gnu-emacs@gnu.org; Mon, 27 Aug 2018 09:03:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fuHAc-0005hg-NS for help-gnu-emacs@gnu.org; Mon, 27 Aug 2018 09:03:05 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:48373) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fuHAc-0005gy-D4 for help-gnu-emacs@gnu.org; Mon, 27 Aug 2018 09:03:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=iWxntI3QqahFJ/lhaT+VSdnTmd06BJfLLCln8u0xekg=; b=GcxESsmDSCT9fJ4EQg/iND1cWLnQjtbprSdBJIBag6tASZhAFXYl4v8G/osnpNskXKfz4R+qRtPWXZgJLFc3BYpITmlIKwUcDpdgayHDz8IqWZkkAn9UjbVxNrDZzn1+Cl8/yWqVwW0Lw7XElh02zLf0loxAWk89ScMYhu8uWFcUW3y9nnB8XHadIW1YJCi6+YlnAFQtAx3wl+y4CDmOvd4M91glBTePVZUHRK0Pt1pWoLKvmJZFX+qq7VGmV+6YlTml/I+IgfeLV+fCjlC50Ws0vJh4sY2fqZjZohjsHL/0CufLLiaMrb4SXBsJLjtGLv82sW+TMO7i8cuyrqvIiQ==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1fuHAa-00058D-Rm; Mon, 27 Aug 2018 15:03:00 +0200 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117770 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, Aug 27, 2018 at 02:19:24PM +0200, Lajos Bodnar wrote: > Thanks, > I haven't found command in the "describe-key" result which open a > filedialog. Ah, I think I get it now: what confuses you is the opening of a GUI like file dialog? If I got you right this time, the best answer is in the source code: `find-file' calls `find-file-read-args' to to ask the user which file name (s)he wants. This one calls `read-file-name', which has a pretty extensive documentation string. I insert the relevant part here: If this command was invoked with the mouse, use a graphical file dialog if ‘use-dialog-box’ is non-nil, and the window system or X toolkit in use provides a file dialog box, and DIR is not a remote file. For graphical file dialogs, any of the special values of MUSTMATCH ‘confirm’ and ‘confirm-after-completion’ are treated as equivalent to nil. Some graphical file dialogs respect a MUSTMATCH value of t, and some do not (or it only has a cosmetic effect, and does not actually prevent the user from entering a non-existent file). So this is the mechanism which adapts to how the user invoked `find-file': if the user used keys, then the question appears in the minibuffer, but if the user clicked on a menu, (s)he gets a GUI-like file browser (to me that makes a lot of sense). I hope I've understood your question better now. Cheers - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAluD9oQACgkQBcgs9XrR2kYXNACfYdvSKA/fgTkT/FYC9v4cp6mE YiwAniDADh9f6yZgxZvI7lnoKG26Um/l =cJi4 -----END PGP SIGNATURE-----