Subject: bug#12931: closed (Re: bug#12931: a bug in Emacs for Windows (win32fns.c: x-file-dialog))

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 06 Feb 2014 06:17:03 +0000

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 [email-masked].

-- 
12931: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12931
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#12931: a bug in Emacs for Windows (win32fns.c: x-file-dialog)
From: Eli Zaretskii <[email-masked]>
To: Lars Ingebrigtsen <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Thu, 06 Feb 2014 08:16:39 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Wed, 05 Feb 2014 17:38:04 -0800
> 
> Eli Zaretskii <[email-masked]> 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 <[email-masked]>
> >> 
> >> 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.

Subject: a bug in Emacs for Windows (win32fns.c: x-file-dialog)
From: Du Yanning <[email-masked]>
To: [email-masked]
Date: Mon, 19 Nov 2012 21:53:02 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

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);
      }