GNU bug report logs - #2585
23.0.90; read-file-name with dialog

Previous Next

Package: emacs;

Reported by: MJ <mj54590 <at> gmail.com>

Date: Fri, 6 Mar 2009 18:50:03 UTC

Severity: normal

Done: Jason Rumney <jasonr <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 2585 in the body.
You can then email your comments to 2585 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2585; Package emacs. (Fri, 06 Mar 2009 18:50:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to MJ <mj54590 <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 06 Mar 2009 18:50:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: MJ <mj54590 <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.90; read-file-name with dialog
Date: Fri, 6 Mar 2009 13:41:10 -0500
When read-file-name is called and uses windows dialog to read a file
name, the 'dir' parameter has to be ended with '/'. It it does not,
the last part of the path name is used as the filename while the
default directory is the stripped 'dir' without last part. This does
not happen in Emacs 22. 

In minibuffer, there is comment that says: 

	;; If DIR contains a file name, split it.

I'm not sure if that is the right thing to do. At least, it breaks the
compatibility with previous Emacs version. 

Is this an intended change?

Thanks. 

--
In GNU Emacs 23.0.90.1 (i386-mingw-nt5.1.2600)
 of 2009-02-22 on T42
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -I../../GnuWin32/include'





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2585; Package emacs. (Sat, 07 Mar 2009 08:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jason Rumney <jasonr <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 07 Mar 2009 08:00:03 GMT) Full text and rfc822 format available.

Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Jason Rumney <jasonr <at> gnu.org>
To: MJ <mj54590 <at> gmail.com>, 2585 <at> debbugs.gnu.org
Cc: emacs-pretest-bug <at> gnu.org
Subject: Re: bug#2585: 23.0.90; read-file-name with dialog
Date: Sat, 07 Mar 2009 15:50:25 +0800
Whoever did the conversion of read-file-name from C to lisp probably 
knows what was meant by this, by my naive impression is that the 
following logic is a mistake:

                 ;; If DIR contains a file name, split it.
                 (let ((file (file-name-nondirectory dir)))
                   (when (and default-filename (not (zerop (length file))))
                     (setq default-filename file)
                     (setq dir (file-name-directory dir)))


The third line makes more sense to me as:

        (when (and (not default-filename) (not (zerop (length file))))


ie. if default-filename is specified, then the splitting should NOT be done.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2585; Package emacs. (Sat, 07 Mar 2009 08:00:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jason Rumney <jasonr <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 07 Mar 2009 08:00:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2585; Package emacs. (Sun, 08 Mar 2009 20:10:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chong Yidong <cyd <at> stupidchicken.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 08 Mar 2009 20:10:04 GMT) Full text and rfc822 format available.

Message #20 received at 2585 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Stefan Monnier  <monnier <at> iro.umontreal.ca>
Cc: Jason Rumney <jasonr <at> gnu.org>, MJ <mj54590 <at> gmail.com>,
        2585 <at> debbugs.gnu.org
Subject: Re: bug#2585: 23.0.90; read-file-name with dialog
Date: Sun, 08 Mar 2009 16:05:45 -0400
> Whoever did the conversion of read-file-name from C to lisp probably 
> knows what was meant by this, by my naive impression is that the 
> following logic is a mistake:
>
>   ;; If DIR contains a file name, split it.
>   (let ((file (file-name-nondirectory dir)))
>     (when (and default-filename (not (zerop (length file))))
>       (setq default-filename file)
>       (setq dir (file-name-directory dir)))
>
> The third line makes more sense to me as:
>
>  (when (and (not default-filename) (not (zerop (length file))))
>
> ie. if default-filename is specified, then the splitting should NOT be
> done.

That seems right to me.  Stefan, you were the one who rewrote
read-file-name; could you verify this?




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2585; Package emacs. (Sun, 08 Mar 2009 20:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 08 Mar 2009 20:30:02 GMT) Full text and rfc822 format available.

Message #25 received at 2585 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: Jason Rumney <jasonr <at> gnu.org>, MJ <mj54590 <at> gmail.com>,
        2585 <at> debbugs.gnu.org
Subject: Re: bug#2585: 23.0.90; read-file-name with dialog
Date: Sun, 08 Mar 2009 16:24:44 -0400
>> Whoever did the conversion of read-file-name from C to lisp probably 
>> knows what was meant by this, by my naive impression is that the 
>> following logic is a mistake:
>> 
>> ;; If DIR contains a file name, split it.
>> (let ((file (file-name-nondirectory dir)))
>> (when (and default-filename (not (zerop (length file))))
>> (setq default-filename file)
>> (setq dir (file-name-directory dir)))
>> 
>> The third line makes more sense to me as:
>> 
>> (when (and (not default-filename) (not (zerop (length file))))
>> 
>> ie. if default-filename is specified, then the splitting should NOT be
>> done.

> That seems right to me.  Stefan, you were the one who rewrote
> read-file-name; could you verify this?

Yes, it looks right,


        Stefan




Reply sent to Jason Rumney <jasonr <at> gnu.org>:
You have taken responsibility. (Mon, 09 Mar 2009 13:40:03 GMT) Full text and rfc822 format available.

Notification sent to MJ <mj54590 <at> gmail.com>:
bug acknowledged by developer. (Mon, 09 Mar 2009 13:40:04 GMT) Full text and rfc822 format available.

Message #30 received at 2585-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Jason Rumney <jasonr <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: MJ <mj54590 <at> gmail.com>, 2585-done <at> debbugs.gnu.org
Subject: Re: bug#2585: 23.0.90; read-file-name with dialog
Date: Mon, 09 Mar 2009 21:31:41 +0800
Stefan Monnier wrote:
>>> ;; If DIR contains a file name, split it.
>>> (let ((file (file-name-nondirectory dir)))
>>> (when (and default-filename (not (zerop (length file))))
>>> (setq default-filename file)
>>> (setq dir (file-name-directory dir)))
>>>
>>> The third line makes more sense to me as:
>>>
>>> (when (and (not default-filename) (not (zerop (length file))))
>>>       
>> That seems right to me.  Stefan, you were the one who rewrote
>> read-file-name; could you verify this?
>>     
>
> Yes, it looks right,
>   

OK, I've checked that change in.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Mon, 06 Apr 2009 14:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 135 days ago.

Previous Next


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