Opened 10 years ago

Last modified 23 months ago

#3732 assigned enhancement

Renaming files: selection without suffix

Reported by: humdinger Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Applications/Tracker Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All


This is hrev30071.

One thing I like of the Gnome thing: when you rename a file, the filename is selected without the .suffix. I know Haiku doesn't rely on the suffix to determine the filetype, nevertheless we'll have suffixed files for a very long time to come. Let's face it, an AVI is an .avi and a MP3 is a .mp3...

Therefore I suggest:

  • ALT+E should enter rename mode without selecting the .suffix
  • Pressing ALT+E again while in rename mode, will select the whole filename.

The detection of the second ALT+E should be real quick, so you can basically just double-ALT+E to get there very quickly.

Change History (7)

comment:1 Changed 10 years ago by monni

What about cases when period (.) is used as legitimate part of base filename? BeOS/Haiku way of naming files is AFAIK to drop the extension and use file metadata for type recognition. I can see people complaining that this change slows down renaming their favourite audio files where period is part of artist name or track title.

At least make it configurable option that is disabled by default.

For reference, there is Korean band named "No.1 Korean" and at least one song called "No. 1", not to mention numerous collaborations where "feat." is part of name of album or track artist.

comment:2 Changed 10 years ago by humdinger

Surely, the "." can't be the deciding character triggering the selection mode. The FileTypes preferences do define extensions, so there probably got to be some sort of checking with that.

I just tried under Ubuntu with the file name "2009-04-05-14-14-38.022-VirtualBox-8346.log" and if even Gnome can get it right, Haiku should find a way. :)

comment:3 Changed 10 years ago by fano

Maybe I do a lot simple but you can't search for the characters that are after the last point? That is if the file name is "" if Traker search the last point it knows when stop (.mp3 is the extension)... a simple strrchr() can do the trick!

comment:4 Changed 10 years ago by mmadia

Couldn't this be better handled by PecoRename? The code has been released as MIT and is hosted at OSDrawer. I'd be more than willing grant access to anyone willing to work on it.

comment:5 Changed 10 years ago by humdinger

@fano: I'm not sure I understand you 100%. But you can't just always exclude the last string after a "." when a filename is selected for renaming. Most Haiku-originating files don't have a suffix. Doing that would only select "the" of a file "". Nope, Tracker would have to check the filetype, get the possible suffixes for it, and compare them to the filename.

@mmadia: While I would be terribly happy to have a working PecoRename for Haiku, I don't think it would replace Tracker's quick rename function when you deal with a single file. This enhancement would just improve its usability.

comment:6 Changed 4 years ago by waddlesplash

Milestone: R1Unscheduled

Moving Tracker enhancement tickets out of R1 milestone -- Tracker's source code comes from BeOS R5, so it already has all the features it did on R5.

comment:7 Changed 23 months ago by axeld

Owner: changed from axeld to nobody
Status: newassigned
Note: See TracTickets for help on using tickets.