From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 19 08:54:19 2012 Received: (at submit) by debbugs.gnu.org; 19 Nov 2012 13:54:19 +0000 Received: from localhost ([127.0.0.1]:54702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TaRnn-00067b-2s for submit@debbugs.gnu.org; Mon, 19 Nov 2012 08:54:19 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39441) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TaRnl-00067U-4U for submit@debbugs.gnu.org; Mon, 19 Nov 2012 08:54:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TaRmg-0005Wo-HF for submit@debbugs.gnu.org; Mon, 19 Nov 2012 08:53:13 -0500 Received: from lists.gnu.org ([208.118.235.17]:40670) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaRmg-0005Wk-Dp for submit@debbugs.gnu.org; Mon, 19 Nov 2012 08:53:10 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaRmd-0002hu-BH for bug-gnu-emacs@gnu.org; Mon, 19 Nov 2012 08:53:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TaRma-0005WL-8b for bug-gnu-emacs@gnu.org; Mon, 19 Nov 2012 08:53:07 -0500 Received: from mail-vb0-f41.google.com ([209.85.212.41]:39197) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaRma-0005W9-4b for bug-gnu-emacs@gnu.org; Mon, 19 Nov 2012 08:53:04 -0500 Received: by mail-vb0-f41.google.com with SMTP id v13so5827633vbk.0 for ; Mon, 19 Nov 2012 05:53:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=k0sMUJ9/1Ms9XAxIw6od4RSzPIlB0R0QypOHKJWXfi0=; b=Oy4+IZzoPSIulUurVpmbTaf1R//6ERkEvVXV+IY+zs8tb2dmd4h7BRe3QK+tUIDg6f mILdnTpPG7VDuySHpjW+GKoLAVTmb5MssdcZoXZxKCXKOTiotXHtuGCkg4niU+iWU3qQ WyWgVgjlxH7ZKo16fqEOUxDG24U3ajJIM5Gru9I+vPdGcAoCY2jHrvhJfDuY4jx+wY8I xytgh7gyR89Y62HPVmJsdNvYdRSYD/eL4x+sJe+0u/UYzmJBsa4qda7fgfIZLtpdOyvh qN7nPph1WeI/2UEn08HWxz+SgATvhK4hwKI+B6/5KOEpwy1Gh1tFO+mwyD57ALFnQ3uX i2VA== MIME-Version: 1.0 Received: by 10.52.17.244 with SMTP id r20mr14684098vdd.29.1353333182980; Mon, 19 Nov 2012 05:53:02 -0800 (PST) Received: by 10.220.141.16 with HTTP; Mon, 19 Nov 2012 05:53:02 -0800 (PST) Date: Mon, 19 Nov 2012 21:53:02 +0800 Message-ID: Subject: a bug in Emacs for Windows (win32fns.c: x-file-dialog) From: Du Yanning To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=bcaec502d4c8a2628d04ced96fe7 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) --bcaec502d4c8a2628d04ced96fe7 Content-Type: text/plain; charset=ISO-8859-1 x-file-dialog uses GetOpenFileName to get a file name. If you have a buffer that is not visiting any file, when you call save-buffer through a tool-bar button, x-file-dialog gets called. However, with GetOpenFileName, you must select an existing file. We can fix this bug by minimum change. in x-file-dialog (defined in win32fns.c) change the line: file_opened = GetOpenFileName (file_details); to if (!NILP (mustmatch)) { file_opened = GetOpenFileName (file_details); } else { file_opened = GetSaveFileName (file_details); } --bcaec502d4c8a2628d04ced96fe7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable x-file-dialog uses GetOpenFileName to get a file name.
If you have a buf= fer that is not visiting any file, when you call save-buffer through a tool= -bar button, x-file-dialog gets called.
However, with GetOpenFileName, y= ou must select an existing file.

We can fix this bug by minimum change.

in x-file-dialog (defined= in win32fns.c)

change the line:

=A0=A0=A0 file_opened =3D Ge= tOpenFileName (file_details);

to

=A0=A0=A0 if (!NILP (mustmat= ch))
=A0=A0=A0=A0=A0 {
=A0=A0=A0=A0=A0=A0=A0 file_opened =3D GetOpenFileName (file_details);
= =A0=A0=A0=A0=A0 }
=A0=A0=A0 else
=A0=A0=A0=A0=A0 {
=A0=A0=A0=A0=A0= =A0=A0 file_opened =3D GetSaveFileName (file_details);
=A0=A0=A0=A0=A0 }=


--bcaec502d4c8a2628d04ced96fe7-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 19 14:09:35 2012 Received: (at 12931) by debbugs.gnu.org; 19 Nov 2012 19:09:35 +0000 Received: from localhost ([127.0.0.1]:55488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TaWis-0005rS-Lj for submit@debbugs.gnu.org; Mon, 19 Nov 2012 14:09:34 -0500 Received: from mtaout23.012.net.il ([80.179.55.175]:41805) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TaWip-0005rI-Gk for 12931@debbugs.gnu.org; Mon, 19 Nov 2012 14:09:32 -0500 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MDR006000ODDD00@a-mtaout23.012.net.il> for 12931@debbugs.gnu.org; Mon, 19 Nov 2012 21:08:24 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MDR0061P160C950@a-mtaout23.012.net.il>; Mon, 19 Nov 2012 21:08:24 +0200 (IST) Date: Mon, 19 Nov 2012 21:08:02 +0200 From: Eli Zaretskii Subject: Re: bug#12931: a bug in Emacs for Windows (win32fns.c: x-file-dialog) In-reply-to: X-012-Sender: halo1@inter.net.il To: Du Yanning Message-id: <83d2z9xvfx.fsf@gnu.org> References: X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Date: Mon, 19 Nov 2012 21:53:02 +0800 > From: Du Yanning > > x-file-dialog uses GetOpenFileName to get a file name. > If you have a buffer that is not visiting any file, when you call > save-buffer through a tool-bar button, x-file-dialog gets called. > However, with GetOpenFileName, you must select an existing file. > > We can fix this bug by minimum change. > > in x-file-dialog (defined in win32fns.c) > > change the line: > > file_opened = GetOpenFileName (file_details); > > to > > if (!NILP (mustmatch)) > { > file_opened = GetOpenFileName (file_details); > } > else > { > file_opened = GetSaveFileName (file_details); > } [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.179.55.175 listed in list.dnswl.org] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] X-Debbugs-Envelope-To: 12931 Cc: 12931@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Date: Mon, 19 Nov 2012 21:53:02 +0800 > From: Du Yanning > > x-file-dialog uses GetOpenFileName to get a file name. > If you have a buffer that is not visiting any file, when you call > save-buffer through a tool-bar button, x-file-dialog gets called. > However, with GetOpenFileName, you must select an existing file. > > We can fix this bug by minimum change. > > in x-file-dialog (defined in win32fns.c) > > change the line: > > file_opened = GetOpenFileName (file_details); > > to > > if (!NILP (mustmatch)) > { > file_opened = GetOpenFileName (file_details); > } > else > { > file_opened = GetSaveFileName (file_details); > } [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.179.55.175 listed in list.dnswl.org] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] > Date: Mon, 19 Nov 2012 21:53:02 +0800 > From: Du Yanning > > x-file-dialog uses GetOpenFileName to get a file name. > If you have a buffer that is not visiting any file, when you call > save-buffer through a tool-bar button, x-file-dialog gets called. > However, with GetOpenFileName, you must select an existing file. > > We can fix this bug by minimum change. > > in x-file-dialog (defined in win32fns.c) > > change the line: > > file_opened = GetOpenFileName (file_details); > > to > > if (!NILP (mustmatch)) > { > file_opened = GetOpenFileName (file_details); > } > else > { > file_opened = GetSaveFileName (file_details); > } Thanks. However, looking at the current code, I see this: file_details->Flags = (OFN_HIDEREADONLY | OFN_NOCHANGEDIR | OFN_EXPLORER | OFN_ENABLEHOOK); if (!NILP (mustmatch)) { /* Require that the path to the parent directory exists. */ file_details->Flags |= OFN_PATHMUSTEXIST; /* If we are looking for a file, require that it exists. */ if (NILP (only_dir_p)) file_details->Flags |= OFN_FILEMUSTEXIST; } which means that the OFN_FILEMUSTEXIST and OFN_PATHMUSTEXIST flags are _not_ set if mustmatch is nil. Are you saying that GetOpenFileName requires the file to exist, even though these flags are not set? This seems to contradict the MSDN documentation at http://msdn.microsoft.com/en-us/library/windows/desktop/ms646839%28v=vs.85%29.aspx Or are you saying that the mustmatch flag is set incorrectly when the buffer is not visiting a file? From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 20 11:20:29 2012 Received: (at 12931) by debbugs.gnu.org; 20 Nov 2012 16:20:30 +0000 Received: from localhost ([127.0.0.1]:57064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TaqYn-0004ON-NO for submit@debbugs.gnu.org; Tue, 20 Nov 2012 11:20:29 -0500 Received: from mtaout23.012.net.il ([80.179.55.175]:59076) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TaqYk-0004OD-ML for 12931@debbugs.gnu.org; Tue, 20 Nov 2012 11:20:28 -0500 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MDS00D00NTS8400@a-mtaout23.012.net.il> for 12931@debbugs.gnu.org; Tue, 20 Nov 2012 18:19:14 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MDS00CVSO02WM80@a-mtaout23.012.net.il>; Tue, 20 Nov 2012 18:19:14 +0200 (IST) Date: Tue, 20 Nov 2012 18:18:54 +0200 From: Eli Zaretskii Subject: Re: bug#12931: a bug in Emacs for Windows (win32fns.c: x-file-dialog) In-reply-to: X-012-Sender: halo1@inter.net.il To: Du Yanning Message-id: <83wqxgw8lt.fsf@gnu.org> References: <83d2z9xvfx.fsf@gnu.org> X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: You replied only to me, so I'm CC'ing the bug address to get this archived with the bug. > Date: Tue, 20 Nov 2012 12:27:10 +0800 > From: Du Yanning > > I cannot recreate it every time. > I do not know the reason. Perhaps it is a problem with my system. > Sorry for my premature conclusion. > If I can recreate it, I will contact you. > I am sorry, and Thank you! [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.179.55.175 listed in list.dnswl.org] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] X-Debbugs-Envelope-To: 12931 Cc: 12931@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: You replied only to me, so I'm CC'ing the bug address to get this archived with the bug. > Date: Tue, 20 Nov 2012 12:27:10 +0800 > From: Du Yanning > > I cannot recreate it every time. > I do not know the reason. Perhaps it is a problem with my system. > Sorry for my premature conclusion. > If I can recreate it, I will contact you. > I am sorry, and Thank you! [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.179.55.175 listed in list.dnswl.org] 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] You replied only to me, so I'm CC'ing the bug address to get this archived with the bug. > Date: Tue, 20 Nov 2012 12:27:10 +0800 > From: Du Yanning > > I cannot recreate it every time. > I do not know the reason. Perhaps it is a problem with my system. > Sorry for my premature conclusion. > If I can recreate it, I will contact you. > I am sorry, and Thank you! From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 05 20:39:24 2014 Received: (at 12931) by debbugs.gnu.org; 6 Feb 2014 01:39:24 +0000 Received: from localhost ([127.0.0.1]:51727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WBDw4-0002Jj-7I for submit@debbugs.gnu.org; Wed, 05 Feb 2014 20:39:24 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:53089) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WBDw2-0002Jb-5E for 12931@debbugs.gnu.org; Wed, 05 Feb 2014 20:39:22 -0500 Received: from [204.14.154.233] (helo=building.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1WBDvn-00006C-Hn; Thu, 06 Feb 2014 02:39:07 +0100 From: Lars Ingebrigtsen To: Du Yanning , 12931@debbugs.gnu.org Subject: Re: bug#12931: a bug in Emacs for Windows (win32fns.c: x-file-dialog) References: <83d2z9xvfx.fsf@gnu.org> <83wqxgw8lt.fsf@gnu.org> Date: Wed, 05 Feb 2014 17:38:04 -0800 In-Reply-To: <83wqxgw8lt.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 20 Nov 2012 18:18:54 +0200") Message-ID: <87k3d9uikj.fsf@building.gnus.org> User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1WBDvn-00006C-Hn X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1392255548.17856@ZYRG73o/k4fBgqUcyuVxEg X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12931 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.0 (/) Eli Zaretskii writes: > You replied only to me, so I'm CC'ing the bug address to get this > archived with the bug. > >> Date: Tue, 20 Nov 2012 12:27:10 +0800 >> From: Du Yanning >> >> I cannot recreate it every time. >> I do not know the reason. Perhaps it is a problem with my system. >> Sorry for my premature conclusion. >> If I can recreate it, I will contact you. >> I am sorry, and Thank you! Are you still seeing this problem in Emacs 24.3? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 06 01:16:54 2014 Received: (at 12931-done) by debbugs.gnu.org; 6 Feb 2014 06:16:54 +0000 Received: from localhost ([127.0.0.1]:51954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WBIGY-0003aJ-74 for submit@debbugs.gnu.org; Thu, 06 Feb 2014 01:16:54 -0500 Received: from mtaout26.012.net.il ([80.179.55.182]:46960) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WBIGS-0003a6-MU for 12931-done@debbugs.gnu.org; Thu, 06 Feb 2014 01:16:48 -0500 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0N0K00G0094OM900@mtaout26.012.net.il> for 12931-done@debbugs.gnu.org; Thu, 06 Feb 2014 08:15:33 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N0K008HK9DXB6A0@mtaout26.012.net.il>; Thu, 06 Feb 2014 08:15:33 +0200 (IST) Date: Thu, 06 Feb 2014 08:16:39 +0200 From: Eli Zaretskii Subject: Re: bug#12931: a bug in Emacs for Windows (win32fns.c: x-file-dialog) In-reply-to: <87k3d9uikj.fsf@building.gnus.org> X-012-Sender: halo1@inter.net.il To: Lars Ingebrigtsen Message-id: <83wqh8zry0.fsf@gnu.org> References: <83d2z9xvfx.fsf@gnu.org> <83wqxgw8lt.fsf@gnu.org> <87k3d9uikj.fsf@building.gnus.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 12931-done Cc: duyanning@gmail.com, 12931-done@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 (+) > From: Lars Ingebrigtsen > Date: Wed, 05 Feb 2014 17:38:04 -0800 > > Eli Zaretskii writes: > > > You replied only to me, so I'm CC'ing the bug address to get this > > archived with the bug. > > > >> Date: Tue, 20 Nov 2012 12:27:10 +0800 > >> From: Du Yanning > >> > >> I cannot recreate it every time. > >> I do not know the reason. Perhaps it is a problem with my system. > >> Sorry for my premature conclusion. > >> If I can recreate it, I will contact you. > >> I am sorry, and Thank you! > > Are you still seeing this problem in Emacs 24.3? This is a duplicate of #13065, which was fixed long ago. Closing. From unknown Sat Sep 13 13:15:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 06 Mar 2014 12:24:05 +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