all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 17950@debbugs.gnu.org
Subject: bug#17950: 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as	installation dir
Date: Sun, 6 Jul 2014 08:10:35 -0700 (PDT)	[thread overview]
Message-ID: <a01720bc-d3f4-408c-9068-c8fd00ac0fc2@default> (raw)
In-Reply-To: <<83d2dief8e.fsf@gnu.org>>

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

I invoked emacs -Q from a Windows shortcut with `Target':
Z:\path\to\runemacs.exe -Q --debug-init
and with `Start in' set to its default: z:\path\to\Emacs\bin

I then used *scratch* to evaluate the recipe code.
I have env var HOME defined, also. And Emacs recognizes "~/" correctly
(apart from the bug).

When I check `default-directory' it is "Z:\\path\\to\\bin/" (dunno
why there is a forward slash at the end but the others are backslashes).
If I change `Start in' then `default-directory' changes to reflect it,
correctly.  But the dir used by the menu item is still the (same) wrong
one.

It works fine in Emacs 24.3 and prior.  Broken in the reported build.
It works fine also as recently as this build:
GNU Emacs 24.4.50.1 (i686-pc-mingw32) of 2014-06-17 on ODIEONE

However, it seems that the directory used for the file selection box
is not related to `Start in'.  It seems to be the something like a
dir used in a different or a previous Emacs session (?).  Not sure
about that, but it definitely comes up with a directory that is
unrelated to either my HOME or the directory in `Start in'.

The directory I see it coming up with now (which is different from
what I saw when I reported the bug yesterday) is a directory that
I normally use a lot, and which contains much of my Lisp code.
But there is nothing in this emacs -Q recipe that points to anything
to do with that directory or my code.  All I can guess is that it is
coming from another Emacs session somehow, or from a cache file
somewhere.  But looking around (e.g., in HOME, .emacs.d, etc.) I see
nothing resembling a cache file that it could be picking the dir up
from.

I added `M-x debug-on-entry read-file-name' to the recipe, and went
through the debugger after invoking from menu FOOOO.  E.g.:

* x-file-dialog("Foo: " "~/" nil nil nil)
* read-file-name-default("Foo: " "~/" nil nil nil nil)
* read-file-name("Foo: " "~/")

When I hit `d' on `x-file-dialog' the file-selection box is popped
up with the incorrect directory in field `Look in:'.  `x-file-dialog'
is defined in C, and I have no C sources.  But it seems that would
be the place to look for the cause of the problem.  Perhaps its
code has changed recently.  HTH.

Maybe you can play with it a bit more, to try to see what's going on.

In any case, what is not happening, which has always happened before,
is that the file-selection directory is HOME (since "~/" is used in
the recipe).





       reply	other threads:[~2014-07-06 15:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<a4e125d2-d0a9-472f-a8e5-dda0eeb7a486@default>
     [not found] ` <<83d2dief8e.fsf@gnu.org>
2014-07-06 15:10   ` Drew Adams [this message]
2014-07-06 15:56     ` bug#17950: 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as installation dir Eli Zaretskii
2014-07-07 15:13       ` Eli Zaretskii
2014-07-07 16:39         ` Stefan Monnier
2014-07-12  9:28           ` Eli Zaretskii
2014-07-06 19:44     ` Eli Zaretskii
     [not found]   ` <<a01720bc-d3f4-408c-9068-c8fd00ac0fc2@default>
     [not found]     ` <<83a98meb0w.fsf@gnu.org>
2014-07-06 16:05       ` Drew Adams
2014-07-06 19:14         ` Eli Zaretskii
     [not found]       ` <<6c30925f-66d0-470a-b1db-0f8200e39bbe@default>
     [not found]         ` <<838uo6e1v9.fsf@gnu.org>
2014-07-06 23:00           ` Drew Adams
2014-07-07  2:38             ` Eli Zaretskii
     [not found]       ` <<83zjglcice.fsf@gnu.org>
2014-07-07 16:23         ` Drew Adams
     [not found]     ` <<837g3qe0hm.fsf@gnu.org>
2014-07-06 22:57       ` Drew Adams
2014-07-05 21:29 Drew Adams
2014-07-06 14:25 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a01720bc-d3f4-408c-9068-c8fd00ac0fc2@default \
    --to=drew.adams@oracle.com \
    --cc=17950@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.