[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Opening files from MS Windows
From: |
Agnar Renolen |
Subject: |
Opening files from MS Windows |
Date: |
Mon, 16 Jul 2001 10:03:07 +0200 |
This is not really a bug, rather an annoyance.
When I drag a file over the RunEmacs icon in Windows, or chooses RunEmacs in
the "Send to" context menu, Emacs opens the file with the 8.3 filename.
This annoys me a little. I even recall for windows NT that a new file was
created when I saved the file, rather than rewriting the existing file
(which IS a bug). I'm not having that problem now running Emacs 20.5.1
under Windows 2000, probably because I'm running the FAT file system rather
than the NTFS file system. I don't know whether this is corrected in later
versions of Emacs.
The source of the problem is not in Emacs itself, but (of course) in
Windows. Whenever you drag a file over a program icon, or chooses tha
program in the "Send To" context menu, Windows supplies the 8.3 filename in
the argument vector. I have experienced this myself in my own projects.
The following script will solve this problem in Tcl. I believe it should be
possible to implement a similar startup procedure for Emacs too.
if {$argc != "0"} {
foreach fname $argv {
if {[file exists $fname]} {
if {$tcl_platform(platform) == "windows"} {
set fname [file attributes $fname -longname]
}
OpenFile $fname
} else {
CreateFile $fname
}
}
}
Yours sincerely
Agnar Renolen
Trondheim, Norway
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Opening files from MS Windows,
Agnar Renolen <=