GNU bug report logs -
#17950
24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as installation dir
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Sat, 5 Jul 2014 21:31:01 UTC
Severity: wishlist
Tags: wontfix
Found in version 24.4.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Date: Sat, 5 Jul 2014 14:29:24 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
>
> emacs -Q
>
> (defun foo (file)
> (interactive (list (read-file-name "Foo: " "~/")))
> (message "File is `%s'" file))
>
> (define-key menu-bar-file-menu [foo] '(menu-item "FOOOO" foo))
>
> (expand-file-name "~/") ; correctly returns my home directory, as in
> previous Emacs versions.
>
> And `M-x foo' correctly uses `~/' as the directory.
>
> But invoking the same command `foo' from the menu (item `FOOOO') uses
> the Emacs installation directory instead.
I cannot reproduce this here with today's trunk. When I select the
foo item from the menu, the file selection dialog that pops up shows
me my home directory, as I'd expect.
So something else is at work here. Perhaps the important detail you
left out is how exactly did you invoke "emacs -Q".
This bug report was last modified 11 years and 6 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.