unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [drew.adams@oracle.com: use-file-dialog should not apply to mouse in *Completions*]
@ 2007-12-03  6:10 Richard Stallman
  2007-12-03  7:15 ` Jan Djärv
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Stallman @ 2007-12-03  6:10 UTC (permalink / raw)
  To: emacs-devel

This is a real bug.  Would someone please fix it, then ack?


From: "Drew Adams" <drew.adams@oracle.com>
To: "Bug-Gnu-Emacs" <bug-gnu-emacs@gnu.org>
Date: Sun, 25 Nov 2007 00:17:10 -0800
Message-ID: <DHEEKFAFJEFOJHLCFPFDKEHPCCAA.drew.adams@oracle.com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Subject: use-file-dialog should not apply to mouse in *Completions*

The doc string of `use-file-dialog' says "it applies to commands from
menus and tool bar buttons". That suggests that it does not apply to
command names that you click mouse-2 on in *Completions* -
e.g. `find-file-other-window' from `M-x'. However, that's what
happens: if the value is non-nil, then the file dialog box pops up. It
should not.

Please fix the variable in accordance with its doc string (menus and
tool-bar buttons only). If it's thought that users should be also able
to specify the file dialog box for *Completions* (to keep using the
mouse to pick the file), then there should be another option for that
- it's too common to want a file dialog box for menus and tool-bar
buttons but not for *Completions*.




In GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
 of 2007-06-02 on RELEASE
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/gnuwin32/include'

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [drew.adams@oracle.com: use-file-dialog should not apply to mouse in *Completions*]
  2007-12-03  6:10 [drew.adams@oracle.com: use-file-dialog should not apply to mouse in *Completions*] Richard Stallman
@ 2007-12-03  7:15 ` Jan Djärv
  2007-12-03  9:28   ` Jason Rumney
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Djärv @ 2007-12-03  7:15 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

This does not happen on X11, must be an W32 only bug.

	Jan D.


Richard Stallman skrev:
> This is a real bug.  Would someone please fix it, then ack?
> 
> 
> From: "Drew Adams" <drew.adams@oracle.com>
> To: "Bug-Gnu-Emacs" <bug-gnu-emacs@gnu.org>
> Date: Sun, 25 Nov 2007 00:17:10 -0800
> Message-ID: <DHEEKFAFJEFOJHLCFPFDKEHPCCAA.drew.adams@oracle.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> 	charset="iso-8859-1"
> Subject: use-file-dialog should not apply to mouse in *Completions*
> 
> The doc string of `use-file-dialog' says "it applies to commands from
> menus and tool bar buttons". That suggests that it does not apply to
> command names that you click mouse-2 on in *Completions* -
> e.g. `find-file-other-window' from `M-x'. However, that's what
> happens: if the value is non-nil, then the file dialog box pops up. It
> should not.
> 
> Please fix the variable in accordance with its doc string (menus and
> tool-bar buttons only). If it's thought that users should be also able
> to specify the file dialog box for *Completions* (to keep using the
> mouse to pick the file), then there should be another option for that
> - it's too common to want a file dialog box for menus and tool-bar
> buttons but not for *Completions*.
> 
> 
> 
> 
> In GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
>  of 2007-06-02 on RELEASE
> Windowing system distributor `Microsoft Corp.', version 5.1.2600
> configured using `configure --with-gcc (3.4) --cflags -Ic:/gnuwin32/include'
> 
> 
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [drew.adams@oracle.com: use-file-dialog should not apply to mouse in *Completions*]
  2007-12-03  7:15 ` Jan Djärv
@ 2007-12-03  9:28   ` Jason Rumney
  2007-12-03  9:36     ` Jason Rumney
  2007-12-03 18:43     ` Richard Stallman
  0 siblings, 2 replies; 13+ messages in thread
From: Jason Rumney @ 2007-12-03  9:28 UTC (permalink / raw)
  To: Jan Djärv; +Cc: rms, emacs-devel

Jan Djärv wrote:
> This does not happen on X11, must be an W32 only bug.

It does happen on X11 for me.

1. M-x find TAB

2. Click on find-file or find-file-other-window with the mouse.


However, I think it is the documentation that needs fixing here to match
the documentation of read-file-name.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [drew.adams@oracle.com: use-file-dialog should not apply to mouse in *Completions*]
  2007-12-03  9:28   ` Jason Rumney
@ 2007-12-03  9:36     ` Jason Rumney
  2007-12-03 10:02       ` Andreas Schwab
  2007-12-03 18:43     ` Richard Stallman
  1 sibling, 1 reply; 13+ messages in thread
From: Jason Rumney @ 2007-12-03  9:36 UTC (permalink / raw)
  To: Jan Djärv; +Cc: rms, Drew Adams, emacs-devel

Jason Rumney wrote:
> However, I think it is the documentation that needs fixing here to match
> the documentation of read-file-name.
>   

I propose the following change to make the documentation clearer for
this variable:


*** fns.c.~1.424.2.3.~    2007-09-24 16:28:57.750000000 +0100
--- fns.c    2007-12-03 09:34:13.187500000 +0000
***************
*** 5827,5836 ****
    use_dialog_box = 1;
 
    DEFVAR_BOOL ("use-file-dialog", &use_file_dialog,
!     doc: /* *Non-nil means mouse commands use a file dialog to ask for
files.
! This applies to commands from menus and tool bar buttons.  The value of
! `use-dialog-box' takes precedence over this variable, so a file dialog
is only
! used if both `use-dialog-box' and this variable are non-nil.  */);
    use_file_dialog = 1;
 
    defsubr (&Sidentity);
--- 5827,5838 ----
    use_dialog_box = 1;
 
    DEFVAR_BOOL ("use-file-dialog", &use_file_dialog,
!     doc: /* *Non-nil means mouse commands use a file dialog to ask for
! files.  This applies to commands from menus and tool bar buttons even
! when they are initiated from the keyboard.  The value of
! `use-dialog-box' takes precedence over this variable, so a file dialog
! is only used if both `use-dialog-box' and this variable are
! non-nil.  */);
    use_file_dialog = 1;
 
    defsubr (&Sidentity);

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [drew.adams@oracle.com: use-file-dialog should not apply to mouse in *Completions*]
  2007-12-03  9:36     ` Jason Rumney
@ 2007-12-03 10:02       ` Andreas Schwab
  2007-12-03 11:11         ` Jason Rumney
  0 siblings, 1 reply; 13+ messages in thread
From: Andreas Schwab @ 2007-12-03 10:02 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Jan Djärv, rms, Drew Adams, emacs-devel

Jason Rumney <jasonr@gnu.org> writes:

>     DEFVAR_BOOL ("use-file-dialog", &use_file_dialog,
> !     doc: /* *Non-nil means mouse commands use a file dialog to ask for
> ! files.  This applies to commands from menus and tool bar buttons even

The first line should always be a complete sentence.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [drew.adams@oracle.com: use-file-dialog should not apply to mouse in *Completions*]
  2007-12-03 10:02       ` Andreas Schwab
@ 2007-12-03 11:11         ` Jason Rumney
  0 siblings, 0 replies; 13+ messages in thread
From: Jason Rumney @ 2007-12-03 11:11 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Jan Djärv, rms, Drew Adams, emacs-devel

Andreas Schwab wrote:
> Jason Rumney <jasonr@gnu.org> writes:
>
>   
>>     DEFVAR_BOOL ("use-file-dialog", &use_file_dialog,
>> !     doc: /* *Non-nil means mouse commands use a file dialog to ask for
>> ! files.  This applies to commands from menus and tool bar buttons even
>>     
>
> The first line should always be a complete sentence.
>   

It looks like I got caught out by autofill there. I didn't intend to
change that line.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [drew.adams@oracle.com: use-file-dialog should not apply to mouse in *Completions*]
  2007-12-03  9:28   ` Jason Rumney
  2007-12-03  9:36     ` Jason Rumney
@ 2007-12-03 18:43     ` Richard Stallman
  2007-12-03 18:54       ` Stefan Monnier
  1 sibling, 1 reply; 13+ messages in thread
From: Richard Stallman @ 2007-12-03 18:43 UTC (permalink / raw)
  To: Jason Rumney; +Cc: jan.h.d, emacs-devel

    However, I think it is the documentation that needs fixing here to match
    the documentation of read-file-name.

This is a real bug; the code needs to be changed.

`read-file-name' is supposed to use the file dialog when you invoke
the command with the mouse.  The point is that choosing a completion
with the mouse, inside M-x, should not count as "invoking the command
with the mouse".

That is what needs to be changed.  Would someone fix that and ack?

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [drew.adams@oracle.com: use-file-dialog should not apply to mouse in *Completions*]
  2007-12-03 18:43     ` Richard Stallman
@ 2007-12-03 18:54       ` Stefan Monnier
  2007-12-03 19:31         ` [drew.adams@oracle.com: use-file-dialog should not apply tomouse " Drew Adams
  2007-12-04 16:55         ` [drew.adams@oracle.com: use-file-dialog should not apply to mouse " Richard Stallman
  0 siblings, 2 replies; 13+ messages in thread
From: Stefan Monnier @ 2007-12-03 18:54 UTC (permalink / raw)
  To: rms; +Cc: jan.h.d, emacs-devel, Jason Rumney

>     However, I think it is the documentation that needs fixing here to match
>     the documentation of read-file-name.

> This is a real bug; the code needs to be changed.

> `read-file-name' is supposed to use the file dialog when you invoke
> the command with the mouse.  The point is that choosing a completion
> with the mouse, inside M-x, should not count as "invoking the command
> with the mouse".

> That is what needs to be changed.  Would someone fix that and ack?

I think in this case both behaviors can make sense.  It's not clear to
me that one is better than the other.  Clearly, the M-x had to be typed,
but the user had to switch to the mouse in order to click the
`find-file' completion, so maybe she wants to keep using the mouse
rather than switch back to the keyboard.


        Stefan

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [drew.adams@oracle.com: use-file-dialog should not apply tomouse in *Completions*]
  2007-12-03 18:54       ` Stefan Monnier
@ 2007-12-03 19:31         ` Drew Adams
  2007-12-03 22:10           ` Stefan Monnier
  2007-12-04 16:55         ` [drew.adams@oracle.com: use-file-dialog should not apply to mouse " Richard Stallman
  1 sibling, 1 reply; 13+ messages in thread
From: Drew Adams @ 2007-12-03 19:31 UTC (permalink / raw)
  To: Stefan Monnier, rms; +Cc: jan.h.d, Jason Rumney, emacs-devel

> >     However, I think it is the documentation that needs fixing 
> >     here to match the documentation of read-file-name.
> 
> > This is a real bug; the code needs to be changed.
> 
> > `read-file-name' is supposed to use the file dialog when you invoke
> > the command with the mouse.  The point is that choosing a completion
> > with the mouse, inside M-x, should not count as "invoking the command
> > with the mouse".
> 
> > That is what needs to be changed.  Would someone fix that and ack?
> 
> I think in this case both behaviors can make sense.  It's not clear to
> me that one is better than the other.  Clearly, the M-x had to be typed,
> but the user had to switch to the mouse in order to click the
> `find-file' completion, so maybe she wants to keep using the mouse
> rather than switch back to the keyboard.

That's why the bug report included this:

>> If it's thought that users should be also able
>> to specify the file dialog box for *Completions* (to keep using the
>> mouse to pick the file), then there should be another option for that
>> - it's too common to want a file dialog box for menus and tool-bar
>> buttons but not for *Completions*.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [drew.adams@oracle.com: use-file-dialog should not apply tomouse in *Completions*]
  2007-12-03 19:31         ` [drew.adams@oracle.com: use-file-dialog should not apply tomouse " Drew Adams
@ 2007-12-03 22:10           ` Stefan Monnier
  2007-12-03 22:15             ` martin rudalics
  2007-12-03 22:51             ` Drew Adams
  0 siblings, 2 replies; 13+ messages in thread
From: Stefan Monnier @ 2007-12-03 22:10 UTC (permalink / raw)
  To: Drew Adams; +Cc: jan.h.d, Jason Rumney, rms, emacs-devel

>>> - it's too common to want a file dialog box for menus and tool-bar
>>> buttons but not for *Completions*.

I highly doubt the "common".


        Stefan

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [drew.adams@oracle.com: use-file-dialog should not apply tomouse in *Completions*]
  2007-12-03 22:10           ` Stefan Monnier
@ 2007-12-03 22:15             ` martin rudalics
  2007-12-03 22:51             ` Drew Adams
  1 sibling, 0 replies; 13+ messages in thread
From: martin rudalics @ 2007-12-03 22:15 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: jan.h.d, emacs-devel, rms, Drew Adams, Jason Rumney

> I highly doubt the "common".

... they are a common nuisance.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [drew.adams@oracle.com: use-file-dialog should not apply tomouse in *Completions*]
  2007-12-03 22:10           ` Stefan Monnier
  2007-12-03 22:15             ` martin rudalics
@ 2007-12-03 22:51             ` Drew Adams
  1 sibling, 0 replies; 13+ messages in thread
From: Drew Adams @ 2007-12-03 22:51 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: jan.h.d, Jason Rumney, rms, emacs-devel

> >>> - it's too common to want a file dialog box for menus and tool-bar
> >>> buttons but not for *Completions*.
>
> I highly doubt the "common".

I said "too common", not "common" or even "more common". Too common for the
current (bugged, IMO) behavior to be the only one available. Either the
other behavior should be the only one available, or an option should let you
choose.

However, wrt common or more common (since you bring it up): I do think it is
more common to want to use the mouse in a consistent way with completion.

If you are using completion (e.g. M-x), and the command you pick (e.g.
`find-file-other-window') also uses completion, the fact that you choose to
pick the command name with the mouse might suggest that you would also
choose to pick the file name with the mouse (in *Completions*). I expect it
to be less common for someone to want to click mouse-2 on
`file-file-other-window' but not want to click mouse-2 on the file name and
instead dig it out of the file dialog box.

But who knows? Users are various. Add yet another option, if you like.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [drew.adams@oracle.com: use-file-dialog should not apply to mouse in *Completions*]
  2007-12-03 18:54       ` Stefan Monnier
  2007-12-03 19:31         ` [drew.adams@oracle.com: use-file-dialog should not apply tomouse " Drew Adams
@ 2007-12-04 16:55         ` Richard Stallman
  1 sibling, 0 replies; 13+ messages in thread
From: Richard Stallman @ 2007-12-04 16:55 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: jan.h.d, emacs-devel, jasonr

    but the user had to switch to the mouse in order to click the
    `find-file' completion, so maybe she wants to keep using the mouse
    rather than switch back to the keyboard.

I expect users to think of this as a keyboard
command, and expect the keyboard behavior.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-12-04 16:55 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-03  6:10 [drew.adams@oracle.com: use-file-dialog should not apply to mouse in *Completions*] Richard Stallman
2007-12-03  7:15 ` Jan Djärv
2007-12-03  9:28   ` Jason Rumney
2007-12-03  9:36     ` Jason Rumney
2007-12-03 10:02       ` Andreas Schwab
2007-12-03 11:11         ` Jason Rumney
2007-12-03 18:43     ` Richard Stallman
2007-12-03 18:54       ` Stefan Monnier
2007-12-03 19:31         ` [drew.adams@oracle.com: use-file-dialog should not apply tomouse " Drew Adams
2007-12-03 22:10           ` Stefan Monnier
2007-12-03 22:15             ` martin rudalics
2007-12-03 22:51             ` Drew Adams
2007-12-04 16:55         ` [drew.adams@oracle.com: use-file-dialog should not apply to mouse " Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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