From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs 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) Message-ID: References: <> <<83d2dief8e.fsf@gnu.org>> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1404659492 2389 80.91.229.3 (6 Jul 2014 15:11:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Jul 2014 15:11:32 +0000 (UTC) Cc: 17950@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 06 17:11:24 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X3o67-0008Kt-RN for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Jul 2014 17:11:24 +0200 Original-Received: from localhost ([::1]:46257 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3o67-0006WC-Ae for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Jul 2014 11:11:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49069) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3o5w-0006VE-3Q for bug-gnu-emacs@gnu.org; Sun, 06 Jul 2014 11:11:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X3o5n-0007vY-AI for bug-gnu-emacs@gnu.org; Sun, 06 Jul 2014 11:11:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3o5n-0007vU-6F for bug-gnu-emacs@gnu.org; Sun, 06 Jul 2014 11:11:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X3o5l-0007ll-P5 for bug-gnu-emacs@gnu.org; Sun, 06 Jul 2014 11:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Jul 2014 15:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17950 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17950-submit@debbugs.gnu.org id=B17950.140465945529846 (code B ref 17950); Sun, 06 Jul 2014 15:11:01 +0000 Original-Received: (at 17950) by debbugs.gnu.org; 6 Jul 2014 15:10:55 +0000 Original-Received: from localhost ([127.0.0.1]:45066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3o5e-0007lJ-9u for submit@debbugs.gnu.org; Sun, 06 Jul 2014 11:10:54 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:37598) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3o5c-0007l7-Gh for 17950@debbugs.gnu.org; Sun, 06 Jul 2014 11:10:53 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s66FAiv5018821 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 6 Jul 2014 15:10:45 GMT Original-Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s66FAhmr023191 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 6 Jul 2014 15:10:44 GMT Original-Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s66FAhg7022845; Sun, 6 Jul 2014 15:10:43 GMT In-Reply-To: <<83d2dief8e.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:91242 Archived-At: > 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. >=20 > 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).