help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: menu command


From: Lajos Bodnar
Subject: Re: menu command
Date: Tue, 28 Aug 2018 18:13:01 +0200

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-----
>>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]