GNOME Bugzilla – Bug 302044
Filename selection on F2/Rename stops at first '.'
Last modified: 2005-07-15 21:23:32 UTC
Presumably, when selecting a file and pressing 'F2' to rename the file, the text selection stops at the first '.' to preserve the filename extension and make renaming quicker/easier. However, many files have multiple '.' (periods) and Nautilus auto-selects only up to the first one. ie: Given the filename 'foo.Bar.so', when selecting this file and pressing 'F2', only 'foo' will be highlighted. My suggestion is that the text be auto-selected up to the LAST period (ie: foo.Bar), in that the file's extension is more likely to be found in that location rather than at the first instance of '.'. Other information:
not sure that's a good idea, what about .tar.gz or .tar.bz2 by example?
Good point -- I guess it could be argued as valid either way. I can see renaming something like 'foo.so.2' as preferring the existing method. The question is, what makes more sense for the default behavior?
I think that filenames with a "." are not really current compared to .tar.gz or .tar.bz2 files by example
I'm inclined to think that the average desktop user would work most commonly with files using the typical '.xxx' format - ie: .jpg, .mpg, .cpp, etc. As you pointed out, there are certain exceptions, but I can think of more examples where my suggested behavior would make more sense than the current implementation.
right for the extensions, but I don't think they filenames with a "." (which is the bug concern) are common (ie: "one.file.jpg")
Obviously no method is ideal. However, i don't think "normal" filenames with a dot in anywhere but the extension part are very common. This is the reason nautilus behaves as it does.
Note that in Nautilus 2.11 you can also use shift-f2 to select the whole filename when renaming. If people really want this, we can bind ctrl-f2 or ctrl-shift-f2 to "select everything til' we reach the last dot". Usability squad, any suggestions? :)
I don't suppose there's any way the mimetype stuff could work out which part of the filename was the extension, based on the type of file it's known to be? Is there any way it can tell that a file of type application/x-compressed-tar *might* have '.tar.gz' at the end of its filename? I don't know how much the mimetype stuff knows or cares about filename extensions as opposed to sniffing these days. If we can't be clever about it, I'd personally be inclined just to leave it the way it is.... I think F2 and Shift+F2 offer enough options to be useful 99% of the time. (I didn't know about Shift-F2 though... doesn't work for me in 2.11.4. How will the user find out about this if it's not on a menu, as it presumably isn't?)
all that seems to be complicate for almost no use, I agree with Alex, this bug should be closed
Calum: The problem is indeed that this would get very complicated, since the mime spec provides primitive pattern matching, like "foo*bar", and doesn't know the concept of extensions at all. Question is really whether it is worth the pain.