From: Lajos Bodnar <bodnarlajoska@gmail.com>
To: tomas@tuxteam.de
Cc: help-gnu-emacs@gnu.org
Subject: Re: menu command
Date: Tue, 28 Aug 2018 18:13:01 +0200 [thread overview]
Message-ID: <CAPibjnnZCpnrOrmrrCBN5vDCoFfiWqaLnrX1DyHdbE-z=njBbw@mail.gmail.com> (raw)
In-Reply-To: <CAPibjn=z+buHPnbSce4z81n3_sUwsFz4eu1xhFJgUvsiTjFuxQ@mail.gmail.com>
I found the correct and working answer here:
https://stackoverflow.com/questions/26483918/bind-file-open-file-with-gui-dialog-to-c-o-as-global-set-key
Thanks again Tomas!
On Mon, Aug 27, 2018 at 3:38 PM Lajos Bodnar <bodnarlajoska@gmail.com>
wrote:
> Hi Tomas,
> Yes it's a correct answer. I found it before and I haven't seen that it's
> working only if I use the mouse ...
> I'd like to avoid the mouse click and external program (getfile.exe) in
> this case.
>
> thanks again!
>
> regards,
> Lajos
>
> On Mon, Aug 27, 2018 at 3:03 PM <tomas@tuxteam.de> wrote:
>
>> -----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-----
>>
>
prev parent reply other threads:[~2018-08-28 16:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-27 9:45 menu command Lajos Bodnar
2018-08-27 11:21 ` tomas
2018-08-27 12:19 ` Lajos Bodnar
2018-08-27 13:03 ` tomas
2018-08-27 13:38 ` Lajos Bodnar
2018-08-28 16:13 ` Lajos Bodnar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPibjnnZCpnrOrmrrCBN5vDCoFfiWqaLnrX1DyHdbE-z=njBbw@mail.gmail.com' \
--to=bodnarlajoska@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=tomas@tuxteam.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).