unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#2585: 23.0.90; read-file-name with dialog
@ 2009-03-06 18:41 ` MJ
  2009-03-07  7:50   ` Jason Rumney
  2009-03-09 13:40   ` bug#2585: marked as done (23.0.90; read-file-name with dialog) Emacs bug Tracking System
  0 siblings, 2 replies; 3+ messages in thread
From: MJ @ 2009-03-06 18:41 UTC (permalink / raw)
  To: emacs-pretest-bug

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'







^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#2585: 23.0.90; read-file-name with dialog
  2009-03-06 18:41 ` bug#2585: 23.0.90; read-file-name with dialog MJ
@ 2009-03-07  7:50   ` Jason Rumney
  2009-03-09 13:40   ` bug#2585: marked as done (23.0.90; read-file-name with dialog) Emacs bug Tracking System
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Rumney @ 2009-03-07  7:50 UTC (permalink / raw)
  To: MJ, 2585; +Cc: emacs-pretest-bug

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.






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#2585: marked as done (23.0.90; read-file-name with dialog)
  2009-03-06 18:41 ` bug#2585: 23.0.90; read-file-name with dialog MJ
  2009-03-07  7:50   ` Jason Rumney
@ 2009-03-09 13:40   ` Emacs bug Tracking System
  1 sibling, 0 replies; 3+ messages in thread
From: Emacs bug Tracking System @ 2009-03-09 13:40 UTC (permalink / raw)
  To: Jason Rumney

[-- Attachment #1: Type: text/plain, Size: 864 bytes --]


Your message dated Mon, 09 Mar 2009 21:31:41 +0800
with message-id <49B51A3D.7040101@gnu.org>
and subject line Re: bug#2585: 23.0.90; read-file-name with dialog
has caused the Emacs bug report #2585,
regarding 23.0.90; read-file-name with dialog
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
2585: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=2585
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 4421 bytes --]

From: MJ <mj54590@gmail.com>
To: emacs-pretest-bug@gnu.org
Subject: 23.0.90; read-file-name with dialog
Date: Fri, 6 Mar 2009 13:41:10 -0500
Message-ID: <18865.28230.516000.264948@MJ.T42.T42>

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'




[-- Attachment #3: Type: message/rfc822, Size: 3322 bytes --]

From: Jason Rumney <jasonr@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: MJ <mj54590@gmail.com>, 2585-done@emacsbugs.donarmstrong.com
Subject: Re: bug#2585: 23.0.90; read-file-name with dialog
Date: Mon, 09 Mar 2009 21:31:41 +0800
Message-ID: <49B51A3D.7040101@gnu.org>

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-09 13:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <49B51A3D.7040101@gnu.org>
2009-03-06 18:41 ` bug#2585: 23.0.90; read-file-name with dialog MJ
2009-03-07  7:50   ` Jason Rumney
2009-03-09 13:40   ` bug#2585: marked as done (23.0.90; read-file-name with dialog) Emacs bug Tracking System

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).