From unknown Sat Sep 13 13:15:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12931: a bug in Emacs for Windows (win32fns.c: x-file-dialog) Resent-From: Du Yanning Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Nov 2012 13:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12931 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 12931@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.135333325923538 (code B ref -1); Mon, 19 Nov 2012 13:55:02 +0000 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: From: Du Yanning 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-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 unknown Sat Sep 13 13:15:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12931: a bug in Emacs for Windows (win32fns.c: x-file-dialog) Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Nov 2012 19:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12931 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Du Yanning Cc: 12931@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12931-submit@debbugs.gnu.org id=B12931.135335217522537 (code B ref 12931); Mon, 19 Nov 2012 19:10:02 +0000 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 In-reply-to: X-012-Sender: halo1@inter.net.il 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-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: 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 unknown Sat Sep 13 13:15:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12931: a bug in Emacs for Windows (win32fns.c: x-file-dialog) Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Nov 2012 16:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12931 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Du Yanning Cc: 12931@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 12931-submit@debbugs.gnu.org id=B12931.135342843016890 (code B ref 12931); Tue, 20 Nov 2012 16:21:02 +0000 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 In-reply-to: X-012-Sender: halo1@inter.net.il 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-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: 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 unknown Sat Sep 13 13:15:26 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12931: a bug in Emacs for Windows (win32fns.c: x-file-dialog) Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Feb 2014 01:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12931 X-GNU-PR-Package: emacs,w32 X-GNU-PR-Keywords: unreproducible moreinfo To: Du Yanning , 12931@debbugs.gnu.org Received: via spool by 12931-submit@debbugs.gnu.org id=B12931.13916507648915 (code B ref 12931); Thu, 06 Feb 2014 01:40:02 +0000 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 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-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 unknown Sat Sep 13 13:15:26 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Du Yanning Subject: bug#12931: closed (Re: bug#12931: a bug in Emacs for Windows (win32fns.c: x-file-dialog)) Message-ID: References: <83wqh8zry0.fsf@gnu.org> X-Gnu-PR-Message: they-closed 12931 X-Gnu-PR-Package: emacs,w32 X-Gnu-PR-Keywords: unreproducible moreinfo Reply-To: 12931@debbugs.gnu.org Date: Thu, 06 Feb 2014 06:17:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1391667423-13812-1" This is a multi-part message in MIME format... ------------=_1391667423-13812-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #12931: a bug in Emacs for Windows (win32fns.c: x-file-dialog) which was filed against the emacs,w32 package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 12931@debbugs.gnu.org. --=20 12931: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D12931 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1391667423-13812-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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. ------------=_1391667423-13812-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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-- ------------=_1391667423-13812-1--