Re: Sort order
Yury V. Zaytsev wrote: On Wed, 2009-12-23 at 14:33 +0200, Slava Zanko wrote: I found discussion: http://markmail.org/message/xyxwiy6al53zmvsp#query:+page:1+mid:d5dyyh35mjpkuumt+state:results Looks as good old-time tradition ;) What about a ticket ;-) ? Done. http://www.midnight-commander.org/ticket/1894 Nice Christmas present, what? Best regards Gergely ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Sort order
Hello, I've just found out that disabling Case sensitive in the Sort order of a panel mixes up the hidden files with the normal ones. As if a leading dot was somehow a 3rd case of the following letter. Is this a bug or is it intentional? I don't like it, honestly. Another thing: I found in the latest master that I received the credits for updating the Czech hints file. I inform you hereby that my Czech language skills are limited to the names of a few Czech beers. Best regards Gergely ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Sort order
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 SZABÓ Gergely wrote: I've just found out that disabling Case sensitive in the Sort order of a panel mixes up the hidden files with the normal ones. As if a leading dot was somehow a 3rd case of the following letter. Is this a bug or is it intentional? I don't like it, honestly. I found discussion: http://markmail.org/message/xyxwiy6al53zmvsp#query:+page:1+mid:d5dyyh35mjpkuumt+state:results Looks as good old-time tradition ;) Another thing: I found in the latest master that I received the credits for updating the Czech hints file. Oops... my mistaken :(. I inform you hereby that my Czech language skills are limited to the names of a few Czech beers. Oh, yeah... 'Staropramen', 'Velkopopovitsky kozel' - it's good beer, really :) - -- WBR, Slavaz -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFLMg4Hb3oGR6aVLpoRArkXAJsHfo4Qb3C8aUnvlKMFpyYp0yKjeACfSnjR qjx/luTr+UbXfF4ZmiquvXM= =qe3M -END PGP SIGNATURE- ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Sort order
On Wed, 2009-12-23 at 14:33 +0200, Slava Zanko wrote: I found discussion: http://markmail.org/message/xyxwiy6al53zmvsp#query:+page:1+mid:d5dyyh35mjpkuumt+state:results Looks as good old-time tradition ;) What about a ticket ;-) ? -- Sincerely yours, Yury V. Zaytsev ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Patch to change sort order of hidden files
Original-Nachricht Datum: Wed, 13 Jun 2007 15:11:10 +0300 Von: Valter Pohjola Betreff: Patch to change sort order of hidden files I wrote yesterday a small patch which adds an option that forces hidden files to be shown last (regardless of sort order). I think that this a better order, since a user is not that often looking for a hidden file. It makes the users home directory look much nicer. The thing that I find annoying with toggling the 'show hidden files' option, is that you usually forget it on and then everything looks like a mess the next time you use mc, until you make the effort to push a few buttons and turn it off. I made the patch from snapshot code (don't know if that was a good idea). The patch looks good. However in its current form it uses the character 'N' as a shortcut in the Configure options dialog, but that character is already used in the Pause after run group box. And a suggestion - what do you think about moving the hiddeN files last option from Configure options to the Sort order dialog ? This way the option could be set per panel and, IMO, the Sort order dialog is the proper place for this option. -- Pt! Schon vom neuen GMX MultiMessenger gehört? Der kanns mit allen: http://www.gmx.net/de/go/multimessenger ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Patch to change sort order of hidden files
Hi, I wrote yesterday a small patch which adds an option that forces hidden files to be shown last (regardless of sort order). I think that this a better order, since a user is not that often looking for a hidden file. It makes the users home directory look much nicer. The thing that I find annoying with toggling the 'show hidden files' option, is that you usually forget it on and then everything looks like a mess the next time you use mc, until you make the effort to push a few buttons and turn it off. I made the patch from snapshot code (don't know if that was a good idea). Valter Pohjola --- main.c 2006-09-25 17:47:34.0 +0300 +++ /home/valter/prog/mc-2007-06-04-22/src/main.c 2007-06-13 12:00:45.0 +0300 @@ -1020,6 +1020,13 @@ update_panels (UP_RELOAD, UP_KEEPSEL); } +void +toggle_dot_files_last(void) +{ +dot_files_last = !dot_files_last; +update_panels (UP_RELOAD, UP_KEEPSEL); +} + /* * Just a hack for allowing url-like pathnames to be accepted from the * command line. --- main.h 2006-02-06 18:55:43.0 +0200 +++ /home/valter/prog/mc-2007-06-04-22/src/main.h 2007-06-13 12:02:06.0 +0300 @@ -10,6 +10,8 @@ void toggle_mix_all_files (void); void toggle_show_backup (void); void toggle_show_hidden (void); +void toggle_dot_files_last (void); + #define UP_OPTIMIZE 0 #define UP_RELOAD 1 --- dir.c 2007-01-15 00:55:18.0 +0200 +++ /home/valter/prog/mc-2007-06-04-22/src/dir.c 2007-06-13 11:50:42.0 +0300 @@ -33,6 +33,9 @@ /* If true show files starting with a dot */ int show_dot_files = 1; +/* If true show all dotfiles at bottom of dir listing */ +int dot_files_last = 0; + /* If true show files ending in ~ */ int show_backups = 1; @@ -100,6 +103,20 @@ #define string_sortcomp(a,b) (case_sensitive ? strcmp (a,b) : g_strcasecmp (a,b)) #endif +inline static int +dot_file_order (const file_entry *a, const file_entry *b) +{ +if(dot_files_last) +{ +if(a-fname[0] == '.' b-fname[0] != '.') +return 1; + +if( b-fname[0] == '.' a-fname[0] != '.') +return -1; +} +return 0; +} + int unsorted (const file_entry *a, const file_entry *b) { @@ -113,6 +130,10 @@ { int ad = MY_ISDIR (a); int bd = MY_ISDIR (b); +int df_order; + +if(df_order = dot_file_order(a,b)) +return df_order; if (ad == bd || mix_all_files) return string_sortcomp (a-fname, b-fname) * reverse; @@ -126,6 +147,10 @@ int r; int ad = MY_ISDIR (a); int bd = MY_ISDIR (b); +int df_order; + +if(df_order = dot_file_order(a,b)) +return df_order; if (ad == bd || mix_all_files){ exta = extension (a-fname); @@ -144,6 +169,10 @@ { int ad = MY_ISDIR (a); int bd = MY_ISDIR (b); +int df_order; + +if(df_order = dot_file_order(a,b)) +return df_order; if (ad == bd || mix_all_files) { int result = a-st.st_mtime b-st.st_mtime ? -1 : @@ -162,6 +191,10 @@ { int ad = MY_ISDIR (a); int bd = MY_ISDIR (b); +int df_order; + +if(df_order = dot_file_order(a,b)) +return df_order; if (ad == bd || mix_all_files) { int result = a-st.st_ctime b-st.st_ctime ? -1 : @@ -180,6 +213,10 @@ { int ad = MY_ISDIR (a); int bd = MY_ISDIR (b); +int df_order; + +if(df_order = dot_file_order(a,b)) +return df_order; if (ad == bd || mix_all_files) { int result = a-st.st_atime b-st.st_atime ? -1 : @@ -198,6 +235,10 @@ { int ad = MY_ISDIR (a); int bd = MY_ISDIR (b); +int df_order; + +if(df_order = dot_file_order(a,b)) +return df_order; if (ad == bd || mix_all_files) return (a-st.st_ino - b-st.st_ino) * reverse; @@ -211,6 +252,10 @@ int ad = MY_ISDIR (a); int bd = MY_ISDIR (b); int result = 0; +int df_order; + +if(df_order = dot_file_order(a,b)) +return df_order; if (ad != bd !mix_all_files) return bd - ad; --- dir.h 2007-01-15 00:55:18.0 +0200 +++ /home/valter/prog/mc-2007-06-04-22/src/dir.h 2007-06-13 11:18:17.0 +0300 @@ -72,6 +72,7 @@ extern int show_backups; extern int show_dot_files; +extern int dot_files_last; extern int mix_all_files; #endif --- option.c 2006-02-28 19:44:28.0 +0200 +++ /home/valter/prog/mc-2007-06-04-22/src/option.c 2007-06-13 11:59:16.0 +0300 @@ -65,6 +65,7 @@ {N_(Compute Totals),file_op_compute_totals, TOGGLE_VARIABLE, 0 }, {N_(Verbose operation), verbose, TOGGLE_VARIABLE, 0 }, /* panel options */ + {N_(hiddeN files last), dot_files_last,toggle_dot_files_last, 0 }, {N_(Fast dir reload), fast_reload, toggle_fast_reload,0 }, {N_(miX all files), mix_all_files, toggle_mix_all_files, 0 }, {N_(Drop down menus), drop_menus,TOGGLE_VARIABLE, 0 }, @@ -76,7 +77,7 @@ /* Make sure this corresponds to the check_options structure */ #define OTHER_OPTIONS 12 -#define
[bug #18767] Panel sort order: fallback to name
Follow-up Comment #4, bug #18767 (project mc): Thanks for the patch. I know about ls -U, but I think the audience of ls and mc might be a little bit different. For the ls command it might be considered as a filesystem debug option, or an option that can speed up scripts where the order isn't important and there are a lot of files in a directory, or ls is invoked many times. MC is rather a user-oriented, interactive application with much more overhead (e.g. always stat()s all the files) which implies that a little bit of extra overhead (sorting) is not a big issue, and it's definitely faster if mc sorts the filenames than if the user finds the requested file in an unsorted list. And I don't think anyone interested in the filesystem order would use mc, they'd use ls. Anyway, it's not an important issue at all, I was just interested in others' opinions. Of course I don't mind if this option remains there, even though I can't see use of it. ___ Reply to this item at: http://savannah.gnu.org/bugs/?18767 ___ Message sent via/by Savannah http://savannah.gnu.org/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[bug #18767] Panel sort order: fallback to name
Update of bug #18767 (project mc): Status:None = Fixed Open/Closed:Open = Closed ___ Follow-up Comment #5: Well, the guy who posted the bug report below seemed to use the Unsorted mode: http://savannah.gnu.org/bugs/?func=detailitemitem_id=13549 Maybe, there are others too. As for myself - I never used it but still I don't mind it. However if you want to discuss the Unsorted mode, please, open a new bugreport. I am closing this one now. ___ Reply to this item at: http://savannah.gnu.org/bugs/?18767 ___ Message sent via/by Savannah http://savannah.gnu.org/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[bug #18767] Panel sort order: fallback to name
Follow-up Comment #1, bug #18767 (project mc): I don't know if the Unsorted view make sense but I know that the GNU 'ls' has a -U option which is supposed to print unsorted entries. ___ Reply to this item at: http://savannah.gnu.org/bugs/?18767 ___ Message sent via/by Savannah http://savannah.gnu.org/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[bug #18767] Panel sort order: fallback to name
Follow-up Comment #2, bug #18767 (project mc): Egmont, I've just verified that GNU ls does what you suggest in the situation described below. I'll apply a patch soon. ___ Reply to this item at: http://savannah.gnu.org/bugs/?18767 ___ Message sent via/by Savannah http://savannah.gnu.org/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[bug #18767] Panel sort order: fallback to name
Follow-up Comment #3, bug #18767 (project mc): I've commited a patch: http://cvs.sv.gnu.org/viewcvs/mc/mc/src/dir.c?sortby=dater2=1.67r1=1.66diff_format=u ___ Reply to this item at: http://savannah.gnu.org/bugs/?18767 ___ Message sent via/by Savannah http://savannah.gnu.org/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[bug #18767] Panel sort order: fallback to name
URL: http://savannah.gnu.org/bugs/?18767 Summary: Panel sort order: fallback to name Project: GNU Midnight Commander Submitted by: egmont Submitted on: Friday 01/12/2007 at 14:49 Category: None Severity: 3 - Normal Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Release: current (CVS or snapshot) Operating System: GNU/Linux ___ Details: When sorting by a property that can be the same for different files (e.g. file size), files having the same value are sorted strangely. When you just change the sorting method from name to e.g. size, files of the same size remain sorted by name. If you change directory, or simply press ^R to reload the panel, these files will be sorted randomly (in fact I guess in file system order). So a simple ^R changes the order, even though nothing changed on the file system. This is quite strange, and IMHO not the expected behavior. IMHO sorting should always fallback to name, when their size/date/whatever is the same. PS. Does the Unsorted (file system order) option has any meaning in practice? I don't think so. ___ Reply to this item at: http://savannah.gnu.org/bugs/?18767 ___ Message sent via/by Savannah http://savannah.gnu.org/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[bug #13549] Wrong sort order in unsorted mode.
Follow-up Comment #4, bug #13549 (project mc): Thank you for the patch for the first problem! I cannot verify it right now - I'm using binary Midnight Commander from Debain 3.1. I hope very much to see in the next relase. As of the second problem - I cannot reproduce it, too, in the current version (it is 4.6.1-pre3 in Debian 3.1.) ___ Reply to this item at: http://savannah.gnu.org/bugs/?func=detailitemitem_id=13549 ___ Message sent via/by Savannah http://savannah.gnu.org/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[bug #13549] Wrong sort order in unsorted mode.
Update of bug #13549 (project mc): Open/Closed:Open = Closed ___ Follow-up Comment #5: Ok, closing. Pavel, you should now be able to close these reports yourself. Hope you could do that in the future. Thanks. ___ Reply to this item at: http://savannah.gnu.org/bugs/?func=detailitemitem_id=13549 ___ Message sent via/by Savannah http://savannah.gnu.org/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[bug #13549] Wrong sort order in unsorted mode.
Update of bug #13549 (project mc): Status: Ready For Test = Fixed ___ Follow-up Comment #3: I've commited the patch. Please, close this bugreport. ___ Reply to this item at: http://savannah.gnu.org/bugs/?func=detailitemitem_id=13549 ___ Message sent via/by Savannah http://savannah.gnu.org/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[bug #13549] Wrong sort order in unsorted mode.
Update of bug #13549 (project mc): Status:None = Confirmed ___ Reply to this item at: http://savannah.gnu.org/bugs/?func=detailitemitem_id=13549 ___ Message sent via/by Savannah http://savannah.gnu.org/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[bug #13549] Wrong sort order in unsorted mode.
Follow-up Comment #2, bug #13549 (project mc): The attached patch should fix problem number 1. As for problem number two I cannot reproduce it with latest MC so unless someone can reproduce it I'll consider it to be fixed. If noone objects I'll commit the patch in 2-3 days. ___ Additional Item Attachment: File name: unsorted-dirlist-fix.patch Size:3 KB http://savannah.gnu.org/bugs/download.php?item_id=13549item_file_id=3317 ___ Reply to this item at: http://savannah.gnu.org/bugs/?func=detailitemitem_id=13549 ___ Message sent via/by Savannah http://savannah.gnu.org/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[bug #13549] Wrong sort order in unsorted mode.
Update of bug #13549 (project mc): Status: Confirmed = Ready For Test ___ Reply to this item at: http://savannah.gnu.org/bugs/?func=detailitemitem_id=13549 ___ Message sent via/by Savannah http://savannah.gnu.org/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[bug #13549] Wrong sort order in unsorted mode.
URL: http://savannah.gnu.org/bugs/?func=detailitemitem_id=13549 Summary: Wrong sort order in unsorted mode. Project: GNU Midnight Commander Submitted by: None Submitted on: Sun 06/26/2005 at 10:57 Category: VFS Severity: 3 - Normal Status: None Privacy: Public Assigned to: None Open/Closed: Open Release: 4.6.0 Platform Version: GNU/Linux ___ Details: Midnight Commander shows files in a wrong order when a panel is unsorted. The bug seems to be there for many years but I was not very annoyed because the bug manifested itself only on *BSD platforms, and I use mostly Linux and Solaris where the bug was not manifested - the ouput of ls -U and the order of files in the unsorted panel were identical. But in version 4.6.0 the bug appears on Linux, too. Problem number one. When a panel is set to unsorted order it lists files mostly identical to ls -U, except that the first directory (the first in ls -U) is shown at the bottom, not at the top. Problem number two. After running a command and returning to MC the unsorted panel shows files in a completely random order. To restore order one has to open the Sort order dialog and press Ok. ___ Reply to this item at: http://savannah.gnu.org/bugs/?func=detailitemitem_id=13549 ___ Message sent via/by Savannah http://savannah.gnu.org/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[bug #13549] Wrong sort order in unsorted mode.
Follow-up Comment #1, bug #13549 (project mc): Please, login before posting bugs . It is hard to get feedback if you do not login. ___ Reply to this item at: http://savannah.gnu.org/bugs/?func=detailitemitem_id=13549 ___ Message sent via/by Savannah http://savannah.gnu.org/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
sort order
Hi, mc sorts the files in standard ascii order (strcmp() instead of strcoll()). IMHO it would be better if it sorted them according to the current locale. This way those who don't like this still can set LC_COLLATE=C to revert the current behavior. (Tested with 4.6.0) bye, Egmont ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
Re: sort order
On Wed, 23 Jul 2003, Koblinger Egmont wrote: mc sorts the files in standard ascii order (strcmp() instead of strcoll()). IMHO it would be better if it sorted them according to the current locale. This way those who don't like this still can set LC_COLLATE=C to revert the current behavior. The problem is that the option for case sensitive search was implemented before the issue with locales came up. Old versions of mc used strcoll() for case-sensitive sort, but then strcoll() became case-insensitive in some locales. There were complaints that the option didn't work. Also, hidden and non-hidden files became mixed together in some locales. Even if the locale doesn't take leading dots into account, it's still convenient for the file manager to keep hidden files grouped together. Currently, mc tests if strcoll() is case sensitive and uses it for case sensitive or non-case-sensitive sort dependent on its behavior. This is a kludge, but I don't know of any proposal how to do it better. I'll appreciate if you explain your suggestion a little bit more. In particular, I don't understand whether you are suggesting to remove the case sensitive checkbox in the Sort Order dialog. I think some users may not like it, especially on Windows. Also, I think some users would like to group hidden files together regardless of the locale rules. I'd like to see this issue addressed in your proposal. -- Regards, Pavel Roskin ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [patch] change sort order with single keyboard shortcut
On Thu, Jul 03, 2003 at 02:46:51AM +0200, David Sterba wrote: Hi, After applying my patch, following keys start to work: Sort by name Ctrl-F3 Sort by extension Ctrl-F4 Sort by modification time Ctrl-F5 Sort by size Ctrl-F6 Keep unsorted Ctrl-F7 Sort by creation time Ctrl-F8 Sort by access timeCtrl-F9 Ctrl-Fx keys are predefined in KDE to switch desktop and most users don't change it. screw the kde users - they have konq. those who like mc and other sweet tools need to redefine the kde keybindings anyway. i for one freed the shifted and controlled function keys alltogether. desktop switching is on alt-f keys and the functions usually on alt-f are elsewhere - less windoze-like and more logical. greetings -- Hi! I'm a .signature virus! Copy me into your ~/.signature, please! -- Chaos, panic, and disorder - my work here is done. ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [patch] change sort order with single keyboard shortcut
Hi, After applying my patch, following keys start to work: Sort by name Ctrl-F3 Sort by extension Ctrl-F4 Sort by modification time Ctrl-F5 Sort by size Ctrl-F6 Keep unsorted Ctrl-F7 Sort by creation time Ctrl-F8 Sort by access timeCtrl-F9 Ctrl-Fx keys are predefined in KDE to switch desktop and most users don't change it. You should choose different unused key set. Yes, it may be difficult :-) David ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [patch] change sort order with single keyboard shortcut
Hi, After applying my patch, following keys start to work: Sort by name Ctrl-F3 Sort by extension Ctrl-F4 Sort by modification time Ctrl-F5 Sort by size Ctrl-F6 Keep unsorted Ctrl-F7 Sort by creation time Ctrl-F8 Sort by access timeCtrl-F9 Ctrl-Fx keys are predefined in KDE to switch desktop and most users don't change it. You should choose different unused key set. Yes, it may be difficult :-) David ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
[patch] change sort order with single keyboard shortcut
I have created a change sort order by simple keyboard shortcuts patch (includes also useful sort mode indicator) (since, for instance f9,enter,s,m,r,o is not very user friendly 'keystroke' to change to sort by mtime) After applying my patch, following keys start to work: Sort by name Ctrl-F3 Sort by extension Ctrl-F4 Sort by modification time Ctrl-F5 Sort by size Ctrl-F6 Keep unsorted Ctrl-F7 Sort by creation time Ctrl-F8 Sort by access timeCtrl-F9 (additional keyboard shortcuts for changing sort modes may be defined in main.c, but I leave that decision to others. These work for me in gnome-terminal and linux text console:o) (although they don't work in xterm for instance if there are any seven keys that I can use and are not used by anything else, please tell me which to use, I can add extra seven lines to main.c for these functions...) Also two options are added, allow_reversed_sort_modes (default is on) and enable_sort_indicator (default is off - indicator is disabled) I have documented them in mc.1.in (patch for this file included in this patch) in advanced options (no gui to edit them in settings (yet), but maybe I can add them to layout section...) sort indicator puts letter representing current sort mode in top left corner of the panel, reversed sort modes when enabled will reverse sort order if you select current sort mode again. Any bug reports or suggestions for this patch should go to my address. Martin Petricek Jeden z nejvtch letnch open air festival v esk republice. 3. - 6. 7. 2003, esk Brod. Tit se mete na tm 130 umlc, kapel a DJs. http://user.centrum.cz/redir.php?url=http://www.rockforpeople.cz sort_order.tgz Description: GNU Zip compressed data
Re: Patch for dot-files sort order under glibc 2.2
Hi, Dmitry! Anyway, dot-files are so special that probably making at least *them* sort correctly is a good reason for applying this patch. BTW, it isn't a hack at all -- we don't treate separate sorting of directories as a hack, It's configurable via Options-Configuration...-miX all files right? And from users' point of view hidden files are just like dirs (and in other OSes hidden is even an attribute, exactly like dir). Sounds reasonable. I made a quick poll among our users (I'm a sysadmin of our institute's network). The result is that they can survive mixing case-differing names, but spreading dot-files throughout the directory is absolutely unacceptable. Then they should set LC_COLLATE=POSIX in the environment (e.g. in .bash_profile) or unset case sensitive in the Sort order dialog. I don't like adding features to work around bugs. Broken case sensitive sort is a bug, not a feature. -- Regards, Pavel Roskin ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Bad sort order under glibc 2.2
Hi, Dmitry! But changing case-sensitivity of file sort order is not good too -- there is a long ago established practice of naming important files with a leading capital, for those to be desplayed first (README, Makefile vs. makefile, etc.), and this practice is documented. Oh, mamma mia, do we need a strnocasecoll()? ;-) Somebody of POSIX-writers should have thought about this issue before... That's exactly the point. If you do locale-specific sort you don't have a choice between case-sensitive and case-insensitive. On the other hand, MC (both editions) gives user the choice between case-sensitive and case-insensitive file sort. Some people want to use locale sort in MC, some don't. MC currently uses strcoll() for case sensitive sort (with fallback to strcmp() if strcoll() is not available) and g_strcasecmp() for case insensitive sort. This is obviously wrong. It's one of the most critical bugs that is delaying the next release of GNU Midnight Commander. I have some ideas what to do, but neither of them is really good. 1) Have a choice between three types of sort. Unfortunately, the code inmlementing the Sort order dialog is very hard to modify. Besides, we risk to confuse users. They'll have to choose between case-sensitive, case-insensitive and locale default. 2) Put use locale for file sort somewhere in the configuration. This means that you cannot have different sort type on panels. 3) Determine whether strcoll() is case insensitive at runtime and only use it for case insensitive (or only case sensitive, or for what is really does) sort. Ugly as hell. 4) Remove strcoll() alltogether. It was introduced in a patch, the patch doesn't work well, so let's revert it and wait util somebody makes a good patch. This is not really a solution. I believe that many GNOME users expect the locale to be respected. Better ideas would be appreciated. I'm crossposting to mc-devel because the issue is very important and should be discussed by developers. -- Regards, Pavel Roskin ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel