GNU bug report logs - #12931
a bug in Emacs for Windows (win32fns.c: x-file-dialog)

Previous Next

Package: emacs;

Reported by: Du Yanning <duyanning <at> gmail.com>

Date: Mon, 19 Nov 2012 13:55:02 UTC

Severity: normal

Tags: moreinfo, unreproducible

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Du Yanning <duyanning <at> gmail.com>
To: 12931 <at> debbugs.gnu.org
Subject: bug#12931: a bug in Emacs for Windows (win32fns.c: x-file-dialog)
Date: Mon, 19 Nov 2012 21:53:02 +0800
[Message part 1 (text/plain, inline)]
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);
      }
[Message part 2 (text/html, inline)]

This bug report was last modified 11 years and 194 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.