unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* GTK `read-file-name' dialog
@ 2006-09-02 12:03 Reiner Steib
  2006-09-02 18:11 ` Jan D.
  0 siblings, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2006-09-02 12:03 UTC (permalink / raw)
  Cc: Heino Tiedemann

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

M-x report-emacs-bug RET wrote:

> [...]

> Please describe exactly what actions triggered the bug
> and the precise symptoms of the bug:

$ touch /tmp/foo.bar
$ emacs -Q /tmp/foo.bar

In Emacs, do <File> <Save as> (`write-file'); you'll get this GTK file
selector dialog:


[-- Attachment #2: Emacs-save-as.png --]
[-- Type: image/png, Size: 20518 bytes --]

[-- Attachment #3: Type: text/plain, Size: 1801 bytes --]


There are some problems here:

- When called e.g. from `write-file' or similar commands,
  `read-file-name' should *not* discard the default file name.  If
  `x-use-old-gtk-file-dialog' is t, the default filename is used.  But
  also with the new (standard) GTK dialog it should be possible to
  supply the default file name as the "Save as" in Firefox[1] also has
  it.

  Note that `read-file-name' is used by several other commands where
  the default file name should be supplied (e.g. saving attachments in
  Gnus: `gnus-mime-save-part'), i.e. the user can simply hit the "Ok"
  button.

- The additional information text ...

| If you don't like this file selector, customize use-file-dialog to
| turn if off, or type C-x C-f to visit files.

  ... doesn't make sense here and it is confusing.  It should be
  displayed only if `read-file-name' is called from `find-file' or
  there should be an optional argument to `read-file-name' to change
  the text.

> In GNU Emacs 22.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.8.3)
>  of 2006-08-30 on viandante
> X server distributor `The X.Org Foundation', version 11.0.60802000
> configured using `configure '--prefix=/import/xtra/emacs/HEAD'
> '--with-gtk' '--exec-prefix=/import/xtra/emacs/HEAD-i686'
> 'CFLAGS=-DSITELOAD_PURESIZE_EXTRA=200000 -g''
[...]

> Recent input:
> <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
> <help-echo> <help-echo> <menu-bar> <file> <write-file> 
> M-x r e p o <tab> r <tab> <return>

> Recent messages:
> (emacs -Q /tmp/foo.bar)
> For information about the GNU Project and its goals, type C-h C-p.
> Quit
> Making completion list...
> Loading help-mode...done
> Loading emacsbug...
> Loading regexp-opt...done
> Loading emacsbug...done

Bye, Reiner.

Footnotes: 
[1]  GTK-"Save as" dialog in Firefox:


[-- Attachment #4: FF-save-as.png --]
[-- Type: image/png, Size: 14219 bytes --]

[-- Attachment #5: Type: text/plain, Size: 100 bytes --]

-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

[-- Attachment #6: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: GTK `read-file-name' dialog
  2006-09-02 12:03 GTK `read-file-name' dialog Reiner Steib
@ 2006-09-02 18:11 ` Jan D.
  2006-09-04 13:12   ` Reiner Steib
  0 siblings, 1 reply; 5+ messages in thread
From: Jan D. @ 2006-09-02 18:11 UTC (permalink / raw)
  Cc: Heino Tiedemann, emacs-devel

I have made some changes.  Please try it and see if you find it better.

Thanks,

    Jan D.

Reiner Steib wrote:
> $ touch /tmp/foo.bar
> $ emacs -Q /tmp/foo.bar
>
> In Emacs, do <File> <Save as> (`write-file'); you'll get this GTK file
> selector dialog:
>
>   
>
> There are some problems here:
>
> - When called e.g. from `write-file' or similar commands,
>   `read-file-name' should *not* discard the default file name.  If
>   `x-use-old-gtk-file-dialog' is t, the default filename is used.  But
>   also with the new (standard) GTK dialog it should be possible to
>   supply the default file name as the "Save as" in Firefox[1] also has
>   it.
>
>   Note that `read-file-name' is used by several other commands where
>   the default file name should be supplied (e.g. saving attachments in
>   Gnus: `gnus-mime-save-part'), i.e. the user can simply hit the "Ok"
>   button.
>
> - The additional information text ...
>
> | If you don't like this file selector, customize use-file-dialog to
> | turn if off, or type C-x C-f to visit files.
>
>   ... doesn't make sense here and it is confusing.  It should be
>   displayed only if `read-file-name' is called from `find-file' or
>   there should be an optional argument to `read-file-name' to change
>   the text.
>   

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

* Re: GTK `read-file-name' dialog
  2006-09-02 18:11 ` Jan D.
@ 2006-09-04 13:12   ` Reiner Steib
  2006-09-04 14:49     ` Jan Djärv
  0 siblings, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2006-09-04 13:12 UTC (permalink / raw)
  Cc: emacs-devel

On Sat, Sep 02 2006, Jan D. wrote:

> I have made some changes.  Please try it and see if you find it better.

The fix for default file name works fine, AFAICS.  Thanks.

But the "or type ..." text still needs improvement, I think.  With
`emacs -Q /tmp/foo.bar':

- `<File> <Visit New File>' I get "type C-x C-w to write files".
  Incorrect, should be `C-x C-f'.

- `<File> <Open File>' => "... type C-x C-f to visit files".  Correct.

- `<File> <Open Directory>' => "... type C-x C-f to visit files".
  Incorrect, should be `C-x d'.

- `<File> <Insert File>' => "... type C-x C-f to visit files".
  Incorrect, should be `C-x i'.  In the console, I get:

,----
| (emacs:32474): Gtk-CRITICAL **: file gtkfilechooserdefault.c: line 4136 (gtk_file_chooser_default_set_current_name): assertion `impl->action == GTK_FILE_CHOOSER_ACTION_SAVE || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER' failed
`----

- `<File> <Save As>' => "... type C-x C-w to write files".  Correct.

- In Gnus, when on a MIME button: `<MIME Part> <Save...>'
  (gnus-mime-save-part) => "type C-x C-w to write files".  Misleading:
  `C-x C-w' doesn't save MIME parts.

I think the part ", or type ..." should be removed or generalized
(maybe "or use the corresponding key binding.").  A particular key
binding should only be mentioned if we are sure that it corresponds to
the current action.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* Re: GTK `read-file-name' dialog
  2006-09-04 13:12   ` Reiner Steib
@ 2006-09-04 14:49     ` Jan Djärv
  2006-09-05 10:19       ` Reiner Steib
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Djärv @ 2006-09-04 14:49 UTC (permalink / raw)




Reiner Steib skrev:

> - `<File> <Insert File>' => "... type C-x C-f to visit files".
>   Incorrect, should be `C-x i'.  In the console, I get:
> 
> ,----
> | (emacs:32474): Gtk-CRITICAL **: file gtkfilechooserdefault.c: line 4136 (gtk_file_chooser_default_set_current_name): assertion `impl->action == GTK_FILE_CHOOSER_ACTION_SAVE || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER' failed
> `----
> 

I can not reproduce this.  However, I've checked the Gtk source and made a 
change.  Can you try it again?


> - `<File> <Save As>' => "... type C-x C-w to write files".  Correct.
> 
> - In Gnus, when on a MIME button: `<MIME Part> <Save...>'
>   (gnus-mime-save-part) => "type C-x C-w to write files".  Misleading:
>   `C-x C-w' doesn't save MIME parts.
> 
> I think the part ", or type ..." should be removed or generalized
> (maybe "or use the corresponding key binding.").  A particular key
> binding should only be mentioned if we are sure that it corresponds to
> the current action.

I generalized the text according to your suggestion.  Explicit keys are not 
mentioned anymore.

	Jan D.

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

* Re: GTK `read-file-name' dialog
  2006-09-04 14:49     ` Jan Djärv
@ 2006-09-05 10:19       ` Reiner Steib
  0 siblings, 0 replies; 5+ messages in thread
From: Reiner Steib @ 2006-09-05 10:19 UTC (permalink / raw)
  Cc: emacs-devel

On Mon, Sep 04 2006, Jan Djärv wrote:

> Reiner Steib skrev:
>
>> - `<File> <Insert File>' => "... type C-x C-f to visit files".
>>   Incorrect, should be `C-x i'.  In the console, I get:
>>
>> ,----
>> | (emacs:32474): Gtk-CRITICAL **: file gtkfilechooserdefault.c: line 4136 (gtk_file_chooser_default_set_current_name): assertion `impl->action == GTK_FILE_CHOOSER_ACTION_SAVE || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER' failed
>> `----
>>
>
> I can not reproduce this.  However, I've checked the Gtk source and made a
> change.  Can you try it again?

FWIW, it was on x86_64 with yesterday's sources.  I can't reproduce it
anymore though, neither with yesterday's binary nor with the current.

>> I think the part ", or type ..." should be removed or generalized
>> (maybe "or use the corresponding key binding.").  A particular key
>> binding should only be mentioned if we are sure that it corresponds to
>> the current action.
>
> I generalized the text according to your suggestion.  Explicit keys are not
> mentioned anymore.

Thanks.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

end of thread, other threads:[~2006-09-05 10:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-02 12:03 GTK `read-file-name' dialog Reiner Steib
2006-09-02 18:11 ` Jan D.
2006-09-04 13:12   ` Reiner Steib
2006-09-04 14:49     ` Jan Djärv
2006-09-05 10:19       ` Reiner Steib

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