From unknown Fri Aug 15 02:04:35 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#17950 <17950@debbugs.gnu.org> To: bug#17950 <17950@debbugs.gnu.org> Subject: Status: 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as installation dir Reply-To: bug#17950 <17950@debbugs.gnu.org> Date: Fri, 15 Aug 2025 09:04:35 +0000 retitle 17950 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) tre= ats "~/" as installation dir reassign 17950 emacs submitter 17950 Drew Adams severity 17950 wishlist tag 17950 wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 05 17:30:13 2014 Received: (at submit) by debbugs.gnu.org; 5 Jul 2014 21:30:13 +0000 Received: from localhost ([127.0.0.1]:44374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3XXA-0001QT-Ur for submit@debbugs.gnu.org; Sat, 05 Jul 2014 17:30:13 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55935) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3XX7-0001PW-OZ for submit@debbugs.gnu.org; Sat, 05 Jul 2014 17:30:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X3XWr-0000eY-Vr for submit@debbugs.gnu.org; Sat, 05 Jul 2014 17:30:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39420) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3XWr-0000eU-TD for submit@debbugs.gnu.org; Sat, 05 Jul 2014 17:29:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3XWi-0004WX-VA for bug-gnu-emacs@gnu.org; Sat, 05 Jul 2014 17:29:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X3XWa-0000be-94 for bug-gnu-emacs@gnu.org; Sat, 05 Jul 2014 17:29:44 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:45744) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3XWa-0000bQ-1x for bug-gnu-emacs@gnu.org; Sat, 05 Jul 2014 17:29:36 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s65LTXlB003694 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 5 Jul 2014 21:29:34 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s65LTWQi006295 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 5 Jul 2014 21:29:33 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id s65LTVw5012881 for ; Sat, 5 Jul 2014 21:29:32 GMT MIME-Version: 1.0 Message-ID: Date: Sat, 5 Jul 2014 14:29:24 -0700 (PDT) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as installation dir X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) 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. In GNU Emacs 24.4.50.1 (i686-pc-mingw32) of 2014-06-28 on ODIEONE Bzr revision: 117431 rgm@gnu.org-20140628015517-eku6hj8mpgcvfnso Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D/c/Devel/emacs/snapshot/trunk --enable-checking=3Dyes,glyphs 'CFLAGS=3D-O0 -g3' LDFLAGS=3D-Lc:/Devel/emacs/lib 'CPPFLAGS=3D-DGC_MCHECK=3D1 -Ic:/Devel/emacs/include'' From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 06 10:25:57 2014 Received: (at 17950) by debbugs.gnu.org; 6 Jul 2014 14:25:57 +0000 Received: from localhost ([127.0.0.1]:45053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3nO8-0006KY-Pu for submit@debbugs.gnu.org; Sun, 06 Jul 2014 10:25:57 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:56948) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3nO5-0006KG-13 for 17950@debbugs.gnu.org; Sun, 06 Jul 2014 10:25:54 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0N8A00H00NOJQJ00@a-mtaout22.012.net.il> for 17950@debbugs.gnu.org; Sun, 06 Jul 2014 17:25:46 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N8A00H5AO2Y8O90@a-mtaout22.012.net.il>; Sun, 06 Jul 2014 17:25:46 +0300 (IDT) Date: Sun, 06 Jul 2014 17:25:37 +0300 From: Eli Zaretskii Subject: Re: bug#17950: 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as installation dir In-reply-to: X-012-Sender: halo1@inter.net.il To: Drew Adams Message-id: <83d2dief8e.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17950 Cc: 17950@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sat, 5 Jul 2014 14:29:24 -0700 (PDT) > From: Drew Adams > > 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". From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 06 11:10:55 2014 Received: (at 17950) by debbugs.gnu.org; 6 Jul 2014 15:10:55 +0000 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 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 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 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 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 MIME-Version: 1.0 Message-ID: Date: Sun, 6 Jul 2014 08:10:35 -0700 (PDT) From: Drew Adams To: Eli Zaretskii Subject: RE: bug#17950: 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as installation dir References: <> <<83d2dief8e.fsf@gnu.org>> 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)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 17950 Cc: 17950@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) > 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). From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 06 11:56:52 2014 Received: (at 17950) by debbugs.gnu.org; 6 Jul 2014 15:56:52 +0000 Received: from localhost ([127.0.0.1]:45074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3oo7-0000jE-9P for submit@debbugs.gnu.org; Sun, 06 Jul 2014 11:56:51 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:37082) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3oo3-0000ir-De for 17950@debbugs.gnu.org; Sun, 06 Jul 2014 11:56:49 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0N8A00C00S83K800@a-mtaout21.012.net.il> for 17950@debbugs.gnu.org; Sun, 06 Jul 2014 18:56:40 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N8A00CQTSAFJD20@a-mtaout21.012.net.il>; Sun, 06 Jul 2014 18:56:40 +0300 (IDT) Date: Sun, 06 Jul 2014 18:56:31 +0300 From: Eli Zaretskii Subject: Re: bug#17950: 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as installation dir In-reply-to: X-012-Sender: halo1@inter.net.il To: Drew Adams Message-id: <83a98meb0w.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17950 Cc: 17950@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sun, 6 Jul 2014 08:10:35 -0700 (PDT) > From: Drew Adams > Cc: 17950@debbugs.gnu.org > > 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. Repeating this, everything I see is the same as you, except that the file selection dialog still shows my home directory. > 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'. Could be a Windows 7 thing (I'm testing on XP here). I think it remembers the last directory you were in, or something. I'll try on Windows 7 when I can. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 06 12:05:45 2014 Received: (at 17950) by debbugs.gnu.org; 6 Jul 2014 16:05:45 +0000 Received: from localhost ([127.0.0.1]:45078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3owi-00011M-M9 for submit@debbugs.gnu.org; Sun, 06 Jul 2014 12:05:45 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:19633) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3owg-000110-AO for 17950@debbugs.gnu.org; Sun, 06 Jul 2014 12:05:43 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s66G5ZuV028891 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 6 Jul 2014 16:05:36 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s66G5YmG018997 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 6 Jul 2014 16:05:34 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s66G5XSD007902; Sun, 6 Jul 2014 16:05:33 GMT MIME-Version: 1.0 Message-ID: <6c30925f-66d0-470a-b1db-0f8200e39bbe@default> Date: Sun, 6 Jul 2014 09:05:26 -0700 (PDT) From: Drew Adams To: Eli Zaretskii Subject: RE: bug#17950: 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as installation dir References: <> <<83a98meb0w.fsf@gnu.org>> In-Reply-To: <<83a98meb0w.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 17950 Cc: 17950@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) > Could be a Windows 7 thing (I'm testing on XP here). I think it > remembers the last directory you were in, or something. I'll try on > Windows 7 when I can. OK, yes, I am on Windows 7. But you might also want to see whether the code for `x-file-dialog' changed recently. There are only 8 days separating a build that worked from this build where this is broken. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 06 15:14:37 2014 Received: (at 17950) by debbugs.gnu.org; 6 Jul 2014 19:14:37 +0000 Received: from localhost ([127.0.0.1]:45186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3rtU-00011T-Bc for submit@debbugs.gnu.org; Sun, 06 Jul 2014 15:14:36 -0400 Received: from mtaout25.012.net.il ([80.179.55.181]:58694) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3rtR-000113-5O for 17950@debbugs.gnu.org; Sun, 06 Jul 2014 15:14:34 -0400 Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0N8B003000OVKM00@mtaout25.012.net.il> for 17950@debbugs.gnu.org; Sun, 06 Jul 2014 22:10:16 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N8B002BE194DB30@mtaout25.012.net.il>; Sun, 06 Jul 2014 22:10:16 +0300 (IDT) Date: Sun, 06 Jul 2014 22:14:18 +0300 From: Eli Zaretskii Subject: Re: bug#17950: 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as installation dir In-reply-to: <6c30925f-66d0-470a-b1db-0f8200e39bbe@default> X-012-Sender: halo1@inter.net.il To: Drew Adams Message-id: <838uo6e1v9.fsf@gnu.org> References: <83a98meb0w.fsf@gnu.org> <6c30925f-66d0-470a-b1db-0f8200e39bbe@default> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17950 Cc: 17950@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sun, 6 Jul 2014 09:05:26 -0700 (PDT) > From: Drew Adams > Cc: 17950@debbugs.gnu.org > > But you might also want to see whether the code for `x-file-dialog' > changed recently. I already did: it was last changed in Nov 2013. > There are only 8 days separating a build that worked from this build > where this is broken. It would help to know the bzr revisions of these builds. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 06 15:44:23 2014 Received: (at 17950) by debbugs.gnu.org; 6 Jul 2014 19:44:23 +0000 Received: from localhost ([127.0.0.1]:45209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3sMJ-0001zh-1k for submit@debbugs.gnu.org; Sun, 06 Jul 2014 15:44:23 -0400 Received: from mtaout26.012.net.il ([80.179.55.182]:50950) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3sMG-0001zO-Ir for 17950@debbugs.gnu.org; Sun, 06 Jul 2014 15:44:22 -0400 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0N8B00P002MC6T00@mtaout26.012.net.il> for 17950@debbugs.gnu.org; Sun, 06 Jul 2014 22:40:02 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N8B00OL12MQM900@mtaout26.012.net.il>; Sun, 06 Jul 2014 22:40:02 +0300 (IDT) Date: Sun, 06 Jul 2014 22:44:05 +0300 From: Eli Zaretskii Subject: Re: bug#17950: 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as installation dir In-reply-to: X-012-Sender: halo1@inter.net.il To: Drew Adams Message-id: <837g3qe0hm.fsf@gnu.org> References: <83d2dief8e.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17950 Cc: 17950@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sun, 6 Jul 2014 08:10:35 -0700 (PDT) > From: Drew Adams > Cc: 17950@debbugs.gnu.org > > 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:'. So you are saying that x-file-dialog is called with the correct directory "~/", and yet the file selection dialog still shows another directory, is that right? From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 06 18:57:52 2014 Received: (at 17950) by debbugs.gnu.org; 6 Jul 2014 22:57:52 +0000 Received: from localhost ([127.0.0.1]:45249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3vNY-0008B0-AU for submit@debbugs.gnu.org; Sun, 06 Jul 2014 18:57:52 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:27960) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3vNU-0008Ad-CZ for 17950@debbugs.gnu.org; Sun, 06 Jul 2014 18:57:49 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s66MvfuW015037 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 6 Jul 2014 22:57:41 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s66Mvdne029043 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 6 Jul 2014 22:57:39 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s66MvckM021400; Sun, 6 Jul 2014 22:57:38 GMT MIME-Version: 1.0 Message-ID: <06c0101c-4105-4ef9-92bf-ae8b0e782def@default> Date: Sun, 6 Jul 2014 15:57:30 -0700 (PDT) From: Drew Adams To: Eli Zaretskii Subject: RE: bug#17950: 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as installation dir References: <> <<83d2dief8e.fsf@gnu.org>> <> <<837g3qe0hm.fsf@gnu.org>> In-Reply-To: <<837g3qe0hm.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 17950 Cc: 17950@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) > > * 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:'. >=20 > So you are saying that x-file-dialog is called with the correct > directory "~/", and yet the file selection dialog still shows another > directory, is that right? Apparently so. As soon as I hit `d', at the point shown above, the file-selection box popped up, with the wrong directory. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 06 19:00:43 2014 Received: (at 17950) by debbugs.gnu.org; 6 Jul 2014 23:00:43 +0000 Received: from localhost ([127.0.0.1]:45258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3vQI-0008JA-0k for submit@debbugs.gnu.org; Sun, 06 Jul 2014 19:00:42 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:51656) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3vQC-0008Ir-NP for 17950@debbugs.gnu.org; Sun, 06 Jul 2014 19:00:37 -0400 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 s66N0TZp026598 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 6 Jul 2014 23:00:30 GMT 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 s66N0SA9002125 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 6 Jul 2014 23:00:29 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s66N0SHK006103; Sun, 6 Jul 2014 23:00:28 GMT MIME-Version: 1.0 Message-ID: Date: Sun, 6 Jul 2014 16:00:21 -0700 (PDT) From: Drew Adams To: Eli Zaretskii , Drew Adams Subject: RE: bug#17950: 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as installation dir References: <> <<83a98meb0w.fsf@gnu.org>> <<6c30925f-66d0-470a-b1db-0f8200e39bbe@default>> <<838uo6e1v9.fsf@gnu.org>> In-Reply-To: <<838uo6e1v9.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 17950 Cc: 17950@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) > > There are only 8 days separating a build that worked from this build > > where this is broken. >=20 > It would help to know the bzr revisions of these builds. Does this help at all? In GNU Emacs 24.4.50.1 (i686-pc-mingw32) of 2014-06-17 on ODIEONE Repository revision: 117359 monnier@iro.umontreal.ca-20140617193358-2t1nl1t= e9gc2mqrx Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D/c/Devel/emacs/snapshot/trunk --enable-checking=3Dyes,glyphs 'CFLAGS=3D-O0 -g3' LDFLAGS=3D-Lc:/Devel/emacs/lib 'CPPFLAGS=3D-DGC_MCHECK=3D1 -Ic:/Devel/emacs/include'' In GNU Emacs 24.4.50.1 (i686-pc-mingw32) of 2014-06-28 on ODIEONE Repository revision: 117431 rgm@gnu.org-20140628015517-eku6hj8mpgcvfnso Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D/c/Devel/emacs/snapshot/trunk --enable-checking=3Dyes,glyphs 'CFLAGS=3D-O0 -g3' LDFLAGS=3D-Lc:/Devel/emacs/lib 'CPPFLAGS=3D-DGC_MCHECK=3D1 -Ic:/Devel/emacs/include'' From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 06 22:38:25 2014 Received: (at 17950) by debbugs.gnu.org; 7 Jul 2014 02:38:26 +0000 Received: from localhost ([127.0.0.1]:45389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3yoz-0006rW-9E for submit@debbugs.gnu.org; Sun, 06 Jul 2014 22:38:25 -0400 Received: from mtaout28.012.net.il ([80.179.55.184]:50166) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X3yot-0006qw-0b for 17950@debbugs.gnu.org; Sun, 06 Jul 2014 22:38:20 -0400 Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0N8B00C00LTVP200@mtaout28.012.net.il> for 17950@debbugs.gnu.org; Mon, 07 Jul 2014 05:37:33 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N8B007MLLYLR540@mtaout28.012.net.il>; Mon, 07 Jul 2014 05:37:33 +0300 (IDT) Date: Mon, 07 Jul 2014 05:38:04 +0300 From: Eli Zaretskii Subject: Re: bug#17950: 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as installation dir In-reply-to: X-012-Sender: halo1@inter.net.il To: Drew Adams Message-id: <8361j9evw3.fsf@gnu.org> References: <83a98meb0w.fsf@gnu.org> <6c30925f-66d0-470a-b1db-0f8200e39bbe@default> <838uo6e1v9.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17950 Cc: 17950@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sun, 6 Jul 2014 16:00:21 -0700 (PDT) > From: Drew Adams > Cc: 17950@debbugs.gnu.org > > > It would help to know the bzr revisions of these builds. > > Does this help at all? > > In GNU Emacs 24.4.50.1 (i686-pc-mingw32) > of 2014-06-17 on ODIEONE > Repository revision: 117359 monnier@iro.umontreal.ca-20140617193358-2t1nl1te9gc2mqrx > Windowing system distributor `Microsoft Corp.', version 6.1.7601 > Configured using: > `configure --prefix=/c/Devel/emacs/snapshot/trunk > --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3' > LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1 > -Ic:/Devel/emacs/include'' > > In GNU Emacs 24.4.50.1 (i686-pc-mingw32) > of 2014-06-28 on ODIEONE > Repository revision: 117431 rgm@gnu.org-20140628015517-eku6hj8mpgcvfnso > Windowing system distributor `Microsoft Corp.', version 6.1.7601 > Configured using: > `configure --prefix=/c/Devel/emacs/snapshot/trunk > --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3' > LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1 > -Ic:/Devel/emacs/include'' Yes, thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 07 11:14:01 2014 Received: (at 17950) by debbugs.gnu.org; 7 Jul 2014 15:14:01 +0000 Received: from localhost ([127.0.0.1]:46118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X4Ac8-0006zA-Mb for submit@debbugs.gnu.org; Mon, 07 Jul 2014 11:14:00 -0400 Received: from mtaout25.012.net.il ([80.179.55.181]:33340) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X4Ac2-0006ym-FR for 17950@debbugs.gnu.org; Mon, 07 Jul 2014 11:13:54 -0400 Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0N8C00A00KP2P700@mtaout25.012.net.il> for 17950@debbugs.gnu.org; Mon, 07 Jul 2014 18:09:32 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N8C008CMKRWQA20@mtaout25.012.net.il>; Mon, 07 Jul 2014 18:09:32 +0300 (IDT) Date: Mon, 07 Jul 2014 18:13:37 +0300 From: Eli Zaretskii Subject: Re: bug#17950: 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as installation dir In-reply-to: <83a98meb0w.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: drew.adams@oracle.com Message-id: <83zjglcice.fsf@gnu.org> References: <83a98meb0w.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17950 Cc: 17950@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sun, 06 Jul 2014 18:56:31 +0300 > From: Eli Zaretskii > Cc: 17950@debbugs.gnu.org > > > 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'. > > Could be a Windows 7 thing (I'm testing on XP here). I think it > remembers the last directory you were in, or something. I'll try on > Windows 7 when I can. OK, I do see this on Windows 7. But it's not due to something Emacs does or started to do lately. This is due to a deliberate change in behavior of the file selection dialogs introduced in Windows 7. It is explicitly documented in the pertinent parameter we pass to the API that pops up the dialog: lpstrInitialDir Type: LPCTSTR The initial directory. The algorithm for selecting the initial directory varies on different platforms. Windows 7: If lpstrInitialDir has the same value as was passed the first time the application used an Open or Save As dialog box, the path most recently selected by the user is used as the initial directory. Otherwise, if lpstrFile contains a path, that path is the initial directory. Otherwise, if lpstrInitialDir is not NULL, it specifies the initial directory. If lpstrInitialDir is NULL and the current directory contains any files of the specified filter types, the initial directory is the current directory. Otherwise, the initial directory is the personal files directory of the current user. Otherwise, the initial directory is the Desktop folder. Windows 2000/XP/Vista: If lpstrFile contains a path, that path is the initial directory. Otherwise, lpstrInitialDir specifies the initial directory. Otherwise, if the application has used an Open or Save As dialog box in the past, the path most recently used is selected as the initial directory. However, if an application is not run for a long time, its saved selected path is discarded. If lpstrInitialDir is NULL and the current directory contains any files of the specified filter types, the initial directory is the current directory. Otherwise, the initial directory is the personal files directory of the current user. Otherwise, the initial directory is the Desktop folder. IOW, whenever you call x-file-dialog with the same 2nd argument as the last time, you will be presented with the directory where you selected a file at that prior call. So I'm quite sure your previous binary (and all the older ones) behaves exactly like your current binary does. All you need to trigger this "feature" is to navigate away from your home directory using the file selection dialog, and actually select a file in another directory, then invoke x-file-dialog again with the same "~/" argument as the first call -- you will see that the file selection dialog displays that other directory. Given that this is standard behavior of the file selection dialog on Windows 7 and later, the question is, should we try to work around it (assuming there is a workaround, which is something I'm not yet sure)? And if the workaround comes at a price, like initially having something like "*.*" in the "File Name" field, which currently starts empty, is that price acceptable, or would it be a nuisance? From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 07 12:24:03 2014 Received: (at 17950) by debbugs.gnu.org; 7 Jul 2014 16:24:03 +0000 Received: from localhost ([127.0.0.1]:46149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X4Bhy-0000lW-S3 for submit@debbugs.gnu.org; Mon, 07 Jul 2014 12:24:03 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:46152) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X4Bhw-0000ky-NG for 17950@debbugs.gnu.org; Mon, 07 Jul 2014 12:24:01 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s67GNsxx008413 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 7 Jul 2014 16:23:54 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s67GNrGA005978 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 7 Jul 2014 16:23:53 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s67GNqnY005964; Mon, 7 Jul 2014 16:23:53 GMT MIME-Version: 1.0 Message-ID: Date: Mon, 7 Jul 2014 09:23:52 -0700 (PDT) From: Drew Adams To: Eli Zaretskii , drew.adams@oracle.com Subject: RE: bug#17950: 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as installation dir References: <> <<83a98meb0w.fsf@gnu.org>> <<83zjglcice.fsf@gnu.org>> In-Reply-To: <<83zjglcice.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 17950 Cc: 17950@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) > > > 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'. > > > > Could be a Windows 7 thing (I'm testing on XP here). I think it > > remembers the last directory you were in, or something. I'll try on > > Windows 7 when I can. >=20 > OK, I do see this on Windows 7. But it's not due to something Emacs > does or started to do lately. This is due to a deliberate change in > behavior of the file selection dialogs introduced in Windows 7. It is > explicitly documented in the pertinent parameter we pass to the API > that pops up the dialog: >=20 > lpstrInitialDir >=20 > Type: LPCTSTR >=20 > The initial directory. The algorithm for selecting the initial > directory varies on different platforms. >=20 > Windows 7: >=20 > =09 If lpstrInitialDir has the same value as was passed the > =09 first time the application used an Open or Save As dialog > =09 box, the path most recently selected by the user is used as > =09 the initial directory. >=20 > =09 Otherwise, if lpstrFile contains a path, that path is the > =09 initial directory. >=20 > =09 Otherwise, if lpstrInitialDir is not NULL, it specifies the > =09 initial directory. If lpstrInitialDir is NULL and the > =09 current directory contains any files of the specified filter > =09 types, the initial directory is the current directory. >=20 > =09 Otherwise, the initial directory is the personal files > =09 directory of the current user. >=20 > =09 Otherwise, the initial directory is the Desktop folder. >=20 > Windows 2000/XP/Vista: >=20 > =09 If lpstrFile contains a path, that path is the initial > =09 directory. >=20 > =09 Otherwise, lpstrInitialDir specifies the initial directory. >=20 > =09 Otherwise, if the application has used an Open or Save As > =09 dialog box in the past, the path most recently used is > =09 selected as the initial directory. However, if an > =09 application is not run for a long time, its saved selected > =09 path is discarded. If lpstrInitialDir is NULL and the > =09 current directory contains any files of the specified filter > =09 types, the initial directory is the current directory. >=20 > =09 Otherwise, the initial directory is the personal files > =09 directory of the current user. >=20 > =09 Otherwise, the initial directory is the Desktop folder. >=20 > IOW, whenever you call x-file-dialog with the same 2nd argument as the > last time, you will be presented with the directory where you selected > a file at that prior call. >=20 > So I'm quite sure your previous binary (and all the older ones) > behaves exactly like your current binary does. All you need to > trigger this "feature" is to navigate away from your home directory > using the file selection dialog, and actually select a file in another > directory, then invoke x-file-dialog again with the same "~/" argument > as the first call -- you will see that the file selection dialog > displays that other directory. >=20 > Given that this is standard behavior of the file selection dialog on > Windows 7 and later, the question is, should we try to work around it > (assuming there is a workaround, which is something I'm not yet sure)? >=20 > And if the workaround comes at a price, like initially having > something like "*.*" in the "File Name" field, which currently starts > empty, is that price acceptable, or would it be a nuisance? Got it. Thanks for looking into this. I don't have a particular opinion about how Emacs Dev should handle this. I do see that this could lead to user errors or at least confusion. I'm OK with whatever you decide is TRT to do about this (including if it is nothing). Thx. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 07 12:39:54 2014 Received: (at 17950) by debbugs.gnu.org; 7 Jul 2014 16:39:54 +0000 Received: from localhost ([127.0.0.1]:46154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X4BxJ-0001J7-TI for submit@debbugs.gnu.org; Mon, 07 Jul 2014 12:39:54 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:63599) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X4BxG-0001Ie-EZ for 17950@debbugs.gnu.org; Mon, 07 Jul 2014 12:39:51 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQHCxQYDRABE4gECNIZF456B4Q4BKkZgWqBcYFbIQ X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQHCxQYDRABE4gECNIZF456B4Q4BKkZgWqBcYFbIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="76715715" Received: from 75-119-224-253.dsl.teksavvy.com (HELO pastel.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 07 Jul 2014 12:39:43 -0400 Received: by pastel.home (Postfix, from userid 20848) id 5915D6038E; Mon, 7 Jul 2014 12:39:43 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#17950: 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as installation dir Message-ID: References: <83a98meb0w.fsf@gnu.org> <83zjglcice.fsf@gnu.org> Date: Mon, 07 Jul 2014 12:39:43 -0400 In-Reply-To: <83zjglcice.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 07 Jul 2014 18:13:37 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17950 Cc: 17950@debbugs.gnu.org, drew.adams@oracle.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > Given that this is standard behavior of the file selection dialog on > Windows 7 and later, the question is, should we try to work around it > (assuming there is a workaround, which is something I'm not yet sure)? To the extent that using the system's dialog is meant to follow the system's behavior, I think it makes sense to just "go with the flow". Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 07 12:44:11 2014 Received: (at control) by debbugs.gnu.org; 7 Jul 2014 16:44:11 +0000 Received: from localhost ([127.0.0.1]:46158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X4C1O-0001Rk-5E for submit@debbugs.gnu.org; Mon, 07 Jul 2014 12:44:11 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:57723 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X4C1H-0001R8-3I for control@debbugs.gnu.org; Mon, 07 Jul 2014 12:44:04 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1X4C1G-0002Un-Mj for control@debbugs.gnu.org; Mon, 07 Jul 2014 12:43:58 -0400 Date: Mon, 07 Jul 2014 12:43:58 -0400 Message-Id: Subject: control message for bug 17950 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.7 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.7 (-----) severity 17950 wishlist From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 12 05:22:57 2014 Received: (at control) by debbugs.gnu.org; 12 Jul 2014 09:22:57 +0000 Received: from localhost ([127.0.0.1]:40359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5tWD-0006PT-2x for submit@debbugs.gnu.org; Sat, 12 Jul 2014 05:22:57 -0400 Received: from mtaout25.012.net.il ([80.179.55.181]:37540) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5tWA-0006P8-Bt for control@debbugs.gnu.org; Sat, 12 Jul 2014 05:22:55 -0400 Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0N8L00H00DU5LV00@mtaout25.012.net.il> for control@debbugs.gnu.org; Sat, 12 Jul 2014 12:18:30 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N8L008KUDUUC280@mtaout25.012.net.il> for control@debbugs.gnu.org; Sat, 12 Jul 2014 12:18:30 +0300 (IDT) Date: Sat, 12 Jul 2014 12:22:54 +0300 From: Eli Zaretskii Subject: Re: bug#17950: 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as installation dir In-reply-to: X-012-Sender: halo1@inter.net.il To: control@debbugs.gnu.org Message-id: <83mwcf9bip.fsf@gnu.org> References: <83a98meb0w.fsf@gnu.org> <83zjglcice.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) tags 17950 wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 12 05:28:08 2014 Received: (at 17950-done) by debbugs.gnu.org; 12 Jul 2014 09:28:08 +0000 Received: from localhost ([127.0.0.1]:40363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5tbD-0006Xq-RW for submit@debbugs.gnu.org; Sat, 12 Jul 2014 05:28:08 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:47657) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5tbB-0006XM-Mk for 17950-done@debbugs.gnu.org; Sat, 12 Jul 2014 05:28:06 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0N8L00600E1X9E00@a-mtaout22.012.net.il> for 17950-done@debbugs.gnu.org; Sat, 12 Jul 2014 12:27:59 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N8L006QEEAM6R10@a-mtaout22.012.net.il>; Sat, 12 Jul 2014 12:27:59 +0300 (IDT) Date: Sat, 12 Jul 2014 12:28:05 +0300 From: Eli Zaretskii Subject: Re: bug#17950: 24.4.50; REGRESSION: `read-file-name' from a menu (mouse) treats "~/" as installation dir In-reply-to: X-012-Sender: halo1@inter.net.il To: Stefan Monnier Message-id: <83lhrz9ba2.fsf@gnu.org> References: <83a98meb0w.fsf@gnu.org> <83zjglcice.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17950-done Cc: 17950-done@debbugs.gnu.org, drew.adams@oracle.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Stefan Monnier > Cc: drew.adams@oracle.com, 17950@debbugs.gnu.org > Date: Mon, 07 Jul 2014 12:39:43 -0400 > > > Given that this is standard behavior of the file selection dialog on > > Windows 7 and later, the question is, should we try to work around it > > (assuming there is a workaround, which is something I'm not yet sure)? > > To the extent that using the system's dialog is meant to follow the > system's behavior, I think it makes sense to just "go with the flow". No further comments, so I documented the changed behavior in emacs-24 branch, revision 117373, and I'm closing the bug. From unknown Fri Aug 15 02:04:35 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 09 Aug 2014 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator