unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* (interactive "GSome prompt: ") on w32
@ 2006-03-26 20:36 Lennart Borgman
  2006-03-28  6:09 ` Jason Rumney
  0 siblings, 1 reply; 5+ messages in thread
From: Lennart Borgman @ 2006-03-26 20:36 UTC (permalink / raw)


It looks to me like (interactive "G...") can not be used to choose a 
file name when run from the menus (ie when a dialog box is displayed).

Maybe this could be cured on w32 by asking first if the user wants to 
pick a directory or a file? Maybe there is some better cure? Maybe the 
dialog box should be avoided in this case?

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

* Re: (interactive "GSome prompt: ") on w32
  2006-03-26 20:36 (interactive "GSome prompt: ") on w32 Lennart Borgman
@ 2006-03-28  6:09 ` Jason Rumney
  2006-03-28  7:15   ` Lennart Borgman
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Rumney @ 2006-03-28  6:09 UTC (permalink / raw)
  Cc: Emacs Devel

Lennart Borgman <lennart.borgman.073@student.lu.se> writes:

> It looks to me like (interactive "G...") can not be used to choose a
> file name when run from the menus (ie when a dialog box is displayed).

It works for me. Can you please explain in more detail what happens
when you run the following code:

(defun test (filename) "testing"
  (interactive "GFile")
  (message filename))

(define-key menu-bar-file-menu [test]
  '(menu-item "Test" test :help "Testing"))

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

* Re: (interactive "GSome prompt: ") on w32
  2006-03-28  6:09 ` Jason Rumney
@ 2006-03-28  7:15   ` Lennart Borgman
  2006-03-28  8:25     ` Jason Rumney
  0 siblings, 1 reply; 5+ messages in thread
From: Lennart Borgman @ 2006-03-28  7:15 UTC (permalink / raw)
  Cc: Emacs Devel

Jason Rumney wrote:
> Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>
>   
>> It looks to me like (interactive "G...") can not be used to choose a
>> file name when run from the menus (ie when a dialog box is displayed).
>>     
>
> It works for me. Can you please explain in more detail what happens
> when you run the following code:
>
> (defun test (filename) "testing"
>   (interactive "GFile")
>   (message filename))
>
> (define-key menu-bar-file-menu [test]
>   '(menu-item "Test" test :help "Testing"))
>
>   
Thanks for responding, Jason. Sorry, I should have written "can not be 
used to choose a directory name". I can choose a file but not a 
directory. Should not that be possible with "G"?

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

* Re: (interactive "GSome prompt: ") on w32
  2006-03-28  7:15   ` Lennart Borgman
@ 2006-03-28  8:25     ` Jason Rumney
  2006-03-28  9:07       ` Lennart Borgman
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Rumney @ 2006-03-28  8:25 UTC (permalink / raw)
  Cc: Emacs Devel

Lennart Borgman wrote:
> Thanks for responding, Jason. Sorry, I should have written "can not be 
> used to choose a directory name". I can choose a file but not a 
> directory. Should not that be possible with "G"?
What happens if you select "Current Directory" from the Filter dropdown 
and press "Open"?

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

* Re: (interactive "GSome prompt: ") on w32
  2006-03-28  8:25     ` Jason Rumney
@ 2006-03-28  9:07       ` Lennart Borgman
  0 siblings, 0 replies; 5+ messages in thread
From: Lennart Borgman @ 2006-03-28  9:07 UTC (permalink / raw)
  Cc: Emacs Devel

Jason Rumney wrote:
> Lennart Borgman wrote:
>> Thanks for responding, Jason. Sorry, I should have written "can not 
>> be used to choose a directory name". I can choose a file but not a 
>> directory. Should not that be possible with "G"?
> What happens if you select "Current Directory" from the Filter 
> dropdown and press "Open"?
If I do that I feel a bit ashamed ;-)

Thanks, I did not know that.

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

end of thread, other threads:[~2006-03-28  9:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-26 20:36 (interactive "GSome prompt: ") on w32 Lennart Borgman
2006-03-28  6:09 ` Jason Rumney
2006-03-28  7:15   ` Lennart Borgman
2006-03-28  8:25     ` Jason Rumney
2006-03-28  9:07       ` Lennart Borgman

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