From trust_no_1 at despammed.com Fri May 2 16:01:31 2003 From: trust_no_1 at despammed.com (Trust No 1) Date: Fri, 02 May 2003 18:01:31 +0200 Subject: Midnight Commander bug? Message-ID: Hello. I'm writing this email to report what I think could be a bug in Midnight Commander. The problem is this: sometimes, when I start MC, I receive the message "Warning: Could'n change to /usr/home/miouser" (/usr/home/miouser is my home directory of course). This is very strange because /usr/home/miouser has permissions set as 750, as in the example below. > ls -l /home/ total 2 drwxr-x--- 25 miouser miouser 1536 May 2 11:47 miouser/ I use a FreeBSD 4.4 system and at the end of the email I have attached my uname -a and my mc -V outputs (and my kernel config file). The strange is that MC seems to work *correctly* anyway, so I don't understand why it complains about the permissions of my home directory. Hope this could help to improve your nice program. Best regards. ---------------------------------------------------------- FreeBSD hansolomobile.tatooine.com 4.4-RELEASE-p32 FreeBSD 4.4-RELEASE-p32 #6: Wed Feb 19 12:10:36 CET 2003 miouser at hansolomobile:/usr/obj/usr/src/sys/HANSOLO i386 ----------------------------------------------------------- GNU Midnight Commander 4.5.55 Edition: text mode Virtual File System: tarfs, extfs, ftpfs, mcfs With builtin Editor Using system-installed S-Lang library with termcap database With subshell support as default With support for background operations With mouse support on xterm With multiple codepages support Using default locale ------------------------------------------------------------ # # HANSOLO -- Kernel configuration file for FreeBSD/i386 # machine i386 cpu I686_CPU ident HANSOLO maxusers 32 options MATH_EMULATE #Support for x87 emulation options INET #InterNETworking options FFS #Berkeley Fast Filesystem options FFS_ROOT #FFS usable as root device [keep this!] options SOFTUPDATES #Enable FFS soft updates support options MSDOSFS #MSDOS Filesystem options CD9660 #ISO 9660 Filesystem options PROCFS #Process filesystem options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] options UCONSOLE #Allow users to grab the console options SYSVSHM #SYSV-style shared memory options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options USERCONFIG #boot -c editor options VISUAL_USERCONFIG #visual boot -c editor options ROOTDEVNAME=\"ufs:ad0s3a\" #Il device di boot device isa device pci # Floppy drives device fdc0 at isa? port IO_FD1 irq 6 drq 2 device fd0 at fdc0 drive 0 # ATA and ATAPI devices device ata0 at isa? port IO_WD1 irq 14 device ata1 at isa? port IO_WD2 irq 15 device ata device atadisk # ATA disk drives device atapicd # ATAPI CDROM drives # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc0 at isa? port IO_KBD device atkbd0 at atkbdc? irq 1 flags 0x1 device psm0 at atkbdc? irq 12 device vga0 at isa? # splash screen/screen saver pseudo-device splash # syscons is the default console driver, resembling an SCO console device sc0 at isa? flags 0x100 # Floating point support - do not disable. device npx0 at nexus? port IO_NPX irq 13 # Power management support (see LINT for more options) device apm0 # Advanced Power Management # questo dovrebbe aggiungere il supporto al suono device pcm # PCCARD (PCMCIA) support device card device pcic0 at isa? irq 0 port 0x3e0 iomem 0xd0000 device pcic1 at isa? irq 0 port 0x3e2 iomem 0xd4000 disable # Serial (COM) ports device sio0 at isa? port IO_COM1 flags 0x10 irq 4 #device sio1 at isa? port IO_COM2 irq 3 #device sio2 at isa? disable port IO_COM3 irq 5 #device sio3 at isa? disable port IO_COM4 irq 9 # Parallel port device ppc0 at isa? irq 7 device ppbus # Parallel port bus (required) device lpt # Printer device ppi # Parallel port interface device # Pseudo devices - the number indicates how many units to allocate. pseudo-device loop # Network loopback pseudo-device ether # Ethernet support pseudo-device tun # Packet tunnel. pseudo-device pty # Pseudo-ttys (telnet etc) # USB support device usb # USB Bus (required) device ugen # Generic device ums # Mouse From makovick at kmlinux.fjfi.cvut.cz Sun May 4 08:23:53 2003 From: makovick at kmlinux.fjfi.cvut.cz (Jindrich Makovicka) Date: Sun, 04 May 2003 10:23:53 +0200 Subject: [patch] vfs copy resume Message-ID: <3EB4CE19.8010206@kmlinux.fjfi.cvut.cz> Hello, this is an attempt to make "Reget" work again with ftp (and other) fs. This patch adds another argument with source offset to mc_open, which is checked when O_LINEAR flag is set. As mc_open has variable number of arguments, only one occurence of mc_open had to be modified in the source. Regards, -- Jindrich Makovicka -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: src.diff URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: vfs.diff URL: From makovick at kmlinux.fjfi.cvut.cz Sun May 4 08:38:36 2003 From: makovick at kmlinux.fjfi.cvut.cz (Jindrich Makovicka) Date: Sun, 04 May 2003 10:38:36 +0200 Subject: [patch] interruptible file search & viewer operations Message-ID: <3EB4D18C.5000908@kmlinux.fjfi.cvut.cz> This is a reincarnation of patches I sent some time ago, but they weren't accepted due to code freeze before 4.6.0. I ported them to the current CVS and still hope you can find them useful. find.diff modifies file search so it handles events during searching the file contents, which results in much greater responsiveness of the interface. view.diff adds event checks to various places where the execution can get stuck - searching and file loading at the beginning and file loading in the growing view. There already were some checks in the search functions, but this patch allows using other keys than Ctrl-C, too (2xESC, Ctrl-G, F10). -- Jindrich Makovicka -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: find.diff URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: view.diff URL: From makovick at kmlinux.fjfi.cvut.cz Sun May 4 14:08:21 2003 From: makovick at kmlinux.fjfi.cvut.cz (Jindrich Makovicka) Date: Sun, 04 May 2003 16:08:21 +0200 Subject: [patch] ftpfs auto reconnect, variable misuse in command() Message-ID: <3EB51ED5.6000102@kmlinux.fjfi.cvut.cz> Another fix, allowing ftpfs to reconnect automatically when disconnected. It also fixes two 1000L bugs in command() where status was used for two different purposes and sock wasn't updated to new SUP.sock after reconnecting. No wonder Ctrl-R worked so miserably for ftp. -- Jindrich Makovicka -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ftpfs.diff URL: From makovick at kmlinux.fjfi.cvut.cz Sun May 4 19:26:28 2003 From: makovick at kmlinux.fjfi.cvut.cz (Jindrich Makovicka) Date: Sun, 04 May 2003 21:26:28 +0200 Subject: [patch] directory_history_add corrupts its argument Message-ID: <3EB56964.1050901@kmlinux.fjfi.cvut.cz> => panel->cwd gets damaged and ftpfs malfunctions for non-anonymous servers -- Jindrich Makovicka -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: main.c.diff URL: From makovick at kmlinux.fjfi.cvut.cz Sun May 4 20:13:31 2003 From: makovick at kmlinux.fjfi.cvut.cz (Jindrich Makovicka) Date: Sun, 04 May 2003 22:13:31 +0200 Subject: [patch] strip_password strips too much Message-ID: <3EB5746B.9050107@kmlinux.fjfi.cvut.cz> again affects FTPs with password. in this case, path doesn't show on the panel, only the hostname. -- Jindrich Makovicka -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: util.c.diff URL: From makovick at kmlinux.fjfi.cvut.cz Mon May 5 14:05:31 2003 From: makovick at kmlinux.fjfi.cvut.cz (Jindrich Makovicka) Date: Mon, 05 May 2003 16:05:31 +0200 Subject: [patch] mini status cosmetics Message-ID: <3EB66FAB.1020601@kmlinux.fjfi.cvut.cz> seems that in current versions of SLang, slsmg_draw_{h|v}line draws a line of length+1 segments. here is the fix. -- Jindrich Makovicka -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: slint.c.diff URL: From proski at gnu.org Mon May 5 15:19:45 2003 From: proski at gnu.org (Pavel Roskin) Date: Mon, 5 May 2003 11:19:45 -0400 (EDT) Subject: [patch] mini status cosmetics In-Reply-To: <3EB66FAB.1020601@kmlinux.fjfi.cvut.cz> References: <3EB66FAB.1020601@kmlinux.fjfi.cvut.cz> Message-ID: Hello, Jindrich! > seems that in current versions of SLang, slsmg_draw_{h|v}line draws a > line of length+1 segments. here is the fix. I don't think it's right. Maybe you are using a version patched by Red Hat? I remember that I looked at this problem and decided to disable support for patched S-Lang. I'll try to review all your patches, but I'll be traveling this week, so I'm afraid it will take time. -- Regards, Pavel Roskin From proski at gnu.org Mon May 5 15:31:39 2003 From: proski at gnu.org (Pavel Roskin) Date: Mon, 5 May 2003 11:31:39 -0400 (EDT) Subject: [patch] directory_history_add corrupts its argument In-Reply-To: <3EB56964.1050901@kmlinux.fjfi.cvut.cz> References: <3EB56964.1050901@kmlinux.fjfi.cvut.cz> Message-ID: On Sun, 4 May 2003, Jindrich Makovicka wrote: > => panel->cwd gets damaged and ftpfs malfunctions for non-anonymous servers Applied, thank you! But please don't be sloppy, main.h needed to be changed as well. -- Regards, Pavel Roskin From ciampix at libero.it Wed May 14 17:49:29 2003 From: ciampix at libero.it (Marco Ciampa) Date: Wed, 14 May 2003 19:49:29 +0200 Subject: ruby syntax file Message-ID: <20030514174929.GA2275@tech2.scuola> See sbj Syntax file should be modified accordingly adding these lines: file ..\*\\.(rb|RB)$ Ruby\sProgram ^#!\s\*/.\*/ruby include ruby.syntax Please note that this is a preliminary version and any comment and suggestions are welcome! bye -- Marco Ciampa _________________________________ Naviga www.numeroverdeweb.it -------------- next part -------------- #Ruby syntax file derived from perl syntax by Marco Ciampa #alpha version 0.1 14/05/2003 context default #Bang path keyword whole linestart #!\[\s\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/bin/ruby brightcyan black keyword whole linestart #!\[\s\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/bin/ruby brightcyan black keyword whole linestart #!\[\s\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/bin/ruby brightcyan black keyword whole linestart #!\[\s\]/\[abcdefghijklmnopqrstuvwxyz\]/bin/ruby brightcyan black keyword whole linestart #!\[\s\]/bin/ruby brightcyan black #Operators keyword > yellow keyword < yellow keyword - yellow keyword \+ yellow keyword \* yellow keyword / yellow keyword % yellow keyword = yellow keyword \+= yellow keyword -= yellow keyword == yellow keyword != yellow keyword === yellow keyword <=> yellow keyword ! yellow keyword ~ yellow keyword =~ yellow keyword & yellow keyword | yellow keyword .. yellow #System variables #Please note that in regular expressions the final $/ is not correctly #highlighted as a system variable. This is not right but I actually do #not know any way to avoid it. Any idea is welcome. keyword $\{!@&\+`'=~/\\,\.;<>_\*"$:F?\} red keyword $\{\0123456789\} red keyword $defout red keyword $-+ red keyword $DEBUG red keyword $F red keyword $FILENAME red keyword $LOAD_PATH red keyword $SAFE red keyword $VERBOSE red keyword __FILE__ red keyword __LINE__ red keyword BEGIN red keyword END red keyword DATA red keyword RUBY_PLATFORM red keyword RUBY_RELEASE_DATE red keyword RUBY_VERSION red keyword $stdin red keyword STDIN red keyword $stdout red keyword STDOUT red keyword $stderr red keyword STDERR red keyword argv red keyword ARGV red keyword ARGF red keyword env red keyword ENV red #Braces & keyword { brightcyan keyword } brightcyan keyword ( brightcyan keyword ) brightcyan keyword [ brightcyan keyword ] brightcyan keyword , brightcyan keyword : brightcyan keyword whole false brightred keyword whole FALSE brightred keyword whole nil brightred keyword whole NIL brightred keyword whole true brightred keyword whole TRUE brightred #Variables keyword wholeright $+ brightgreen keyword wholeright @+ white keyword \\" brightred keyword \\' brightred #Reserved words (see ruby manual) keyword whole alias magenta keyword whole and magenta keyword whole begin magenta keyword whole break magenta keyword whole case magenta keyword whole class magenta keyword whole def magenta keyword whole defined\? magenta keyword whole do magenta keyword whole else magenta keyword whole elsif magenta keyword whole end magenta keyword whole ensure magenta keyword whole for magenta keyword whole if magenta keyword whole in magenta keyword whole module magenta keyword whole next magenta keyword whole not magenta keyword whole or magenta keyword whole redo magenta keyword whole rescue magenta keyword whole retry magenta keyword whole return magenta keyword whole self magenta keyword whole super magenta keyword whole then magenta keyword whole undef magenta keyword whole unless magenta keyword whole until magenta keyword whole when magenta keyword whole while magenta keyword whole yeld magenta #First class methods keyword whole new yellow keyword whole inherited yellow keyword whole superclass yellow #Class module keyword whole include magenta keyword whole require magenta # keyword whole where magenta #Class numeric keyword whole abs red keyword whole modulo red keyword whole remainder red #Class IO keyword whole sync yellow keyword whole crypt yellow keyword whole inspect yellow keyword whole delete yellow keyword whole each yellow keyword whole grep yellow keyword whole join yellow #Class Array keyword whole index yellow keyword whole indexes yellow keyword whole indices yellow keyword whole size yellow keyword whole pop yellow keyword whole push yellow keyword whole sort yellow keyword whole shift yellow keyword whole unshift yellow #Math module keyword whole Math::PI red keyword whole Math::E red keyword whole atan2 red keyword whole cos red keyword whole exp red keyword whole frexp red keyword whole ldexp red keyword whole log red keyword whole log10 red keyword whole sin red keyword whole sqrt red keyword whole tan red #Kernel module keyword whole chomp yellow keyword whole chomp! yellow keyword whole chop yellow keyword whole chop! yellow keyword whole raise yellow keyword whole fork yellow keyword whole rand yellow keyword whole srand yellow keyword whole print yellow keyword whole printf yellow keyword whole sprintf yellow keyword whole exec yellow keyword whole eval yellow keyword whole exit yellow keyword whole sleep yellow #this works only with label EOF :-( #context exclusive whole <<\[\s\]EOF EOF green context # \n brown spellcheck context " " green keyword \\" brightgreen keyword \\\\ brightgreen context ' ' brightgreen keyword \\' green keyword \\\\ green context exclusive ` ` white black From proski at gnu.org Wed May 14 22:36:16 2003 From: proski at gnu.org (Pavel Roskin) Date: Wed, 14 May 2003 18:36:16 -0400 (EDT) Subject: ruby syntax file In-Reply-To: <20030514174929.GA2275@tech2.scuola> References: <20030514174929.GA2275@tech2.scuola> Message-ID: On Wed, 14 May 2003, Marco Ciampa wrote: > file ..\*\\.(rb|RB)$ Ruby\sProgram ^#!\s\*/.\*/ruby > include ruby.syntax Thanks, applied! > Please note that this is a preliminary version and any comment and > suggestions are welcome! Some other rules highlight numbers, but I don't really care. I leave it to those who actually program in Ruby. You may want to consider brighter highlighting for function names after "def" because there are too few other syntax elements around to make function definitions easy to distinguish. -- Regards, Pavel Roskin From szaszg at hu.inter.net Thu May 15 00:27:21 2003 From: szaszg at hu.inter.net (Sza'sz Gergely) Date: Thu, 15 May 2003 01:27:21 +0100 Subject: [PATCH] fstabfs In-Reply-To: <20030514015201.30017.21087.Mailman@moniker.gnome.org> References: <20030514015201.30017.21087.Mailman@moniker.gnome.org> Message-ID: <20030515002721.GA25625@ixtys> Hi! I make an 'fstab' vfs for mc. If you cd to it (an archiveless vfs), you get a directory tree (with some symlink shorthand) represents the '/etc/fstab' mounts. You can get information from mounts (wieving the 'info' files at the leafs), and you can mount/umount these predefined mounts (by executing the mount/umount files). So, it is nice, but... because the vfs cacheing,I have to hack the extfs.c, to make rescan after executing the mount/umount 'virtual' file... So, these patch add an enchacement to the extfs.ini file. If we write a /xxx after the vfs definition (e.g. fstab:/r ), than we can controll the needed rescannings. 'r' mean -> need rescan after a 'run', 'u' -> after 'unlink', 'd' -> after rmdir. So, the later ones (u,d) are useless for fstab (and may any other vfs)... These options can mixed, e.g. whatsfs/dru mean need rescan after unlink and rmdir and run... Gergely -------------- next part -------------- #! /usr/bin/perl # # 2003 (c) Gergely Sz?sz # This software is under GNU license # sub mcfstabfs_list { # # print "-r--r--r-- 1 root root 0 $date README\n"; print "-r--r--r-- 1 root root 0 $date TODO\n"; print "-r--r--r-- 1 root root 0 $date BUGS\n"; print "-r--r--r-- 1 root root 0 $date read_fstab\n"; print "-r--r--r-- 1 root root 0 $date pipe_mount\n"; print "-r--r--r-- 1 root root 0 $date read_mtab\n"; $i = 0; foreach (@f) { @_ = @{$_}; print "-r--r--r-- 1 root root 0 $date $_[0] on $_[1]/info\n"; if ($_[6] eq 'Yes') { if ($_[7] eq undef) { $_[7] = 2; } else { $_[7] = 1; } printf "lr-xr-xr-x 1 root root $_[7] $date _mount_%03d -> $_[0] on $_[1]\n", $i; print "---x--x--x 1 root root 0 $date $_[0] on $_[1]/umount\n"; } else { printf "lr-xr-xr-x 1 root root 0 $date _mount_%03d -> $_[0] on $_[1]\n", $i; print "---x--x--x 1 root root 0 $date $_[0] on $_[1]/mount\n"; } $i++; } } sub mcfstabfs_dumpfile # $destfile $string { if (open (FILEOUT,">$_[0]")) { print FILEOUT $_[1]; close FILEOUT; # system ("chmod a+x $_[0]"); #we need it? } } sub mcfstab_uline { @_ = split //, $_[0]; return '_' . join ('_', @_); } sub mcfstab_bold { my $r; @_ = split //, $_[0]; foreach (@_) { $r .= $_ . '' . $_; } return $r; } sub mcfstabfs_copyout { local($archive,$filename,$destfile)=@_; if ($filename eq 'README') { mcfstabfs_dumpfile ($destfile, $readme_str); exit 0; } if ($filename eq 'BUGS') { mcfstabfs_dumpfile ($destfile, $bugs_str); exit 0; } if ($filename eq 'TODO') { mcfstabfs_dumpfile ($destfile, $todo_str); exit 0; } if ($filename eq 'read_fstab') { open (FSTAB, "); close FSTAB; mcfstabfs_dumpfile ($destfile, $fstab); exit 0; } if ($filename eq 'pipe_mount') { open (FSTAB, "/bin/mount |"); $fstab .= $_ while (); close FSTAB; mcfstabfs_dumpfile ($destfile, $fstab); exit 0; } if ($filename eq 'read_mtab') { open (FSTAB, "); close FSTAB; mcfstabfs_dumpfile ($destfile, $fstab); exit 0; } if ($filename =~ s/\/umount$//) { ($_, $filename) = split / on /, $filename; mcfstabfs_dumpfile ($destfile, sprintf ($umount_str, mcfstab_uline ($_), mcfstab_uline ($filename))); exit 0; } if ($filename =~ s/\/mount$//) { ($_, $filename) = split / on /, $filename; mcfstabfs_dumpfile ($destfile, sprintf ($mount_str, mcfstab_uline ($_), mcfstab_uline ($filename))); exit 0; } if ($filename eq 'mount-OPEN-ERROR') { mcfstabfs_dumpfile ($destfile, "*** ERROR***\n\nCannot execute /bin/mount system utility!\n"); exit 0; } if ($filename eq 'fstab-OPEN-ERROR') { mcfstabfs_dumpfile ($destfile, "*** ERROR***\n\nCannot read the /etc/fstab file!\n"); exit 0; } if ($filename =~ s/\/info$//) { $fs =~ /$filename ([^\n]+)/m; @_ = @{@f[$1]}; $_ = "Device:\t\t" . mcfstab_bold ($_[0]) . "\nMount point:\t" . mcfstab_bold ($_[1]) . "\nType:\t\t" . mcfstab_uline ($_[2]) . "\nOptions:\t" . mcfstab_uline ($_[3]) . "\nDump:\t\t" . $_[4] . "\nPass:\t\t" . $_[5] . "\nMounted:\t" . mcfstab_bold ($_[6]); if ($_[7] ne undef) { $_ .= "\nSize:\t\t" . mcfstab_bold ($_[7]) . "k\nUsed:\t\t" . mcfstab_bold ($_[8]) . "k\nFree:\t\t" . mcfstab_bold ($_[9]) . "k\nUsage:\t\t" . mcfstab_bold ($_[10]); } mcfstabfs_dumpfile ($destfile, $_); } } sub mcfstabfs_run { local($archive,$filename)=@_; unless ($filename =~ /_mount_([0-9]+)/) { $fs =~ /$filename ([^\n]+)/m; } @_ = @{@f[$1]}; if($filename =~ /\/umount$/) { print "Umounting: $_[0] from $_[1]...\n"; system("umount $_[1]"); } else { print "Mounting: $_[0] to $_[1]...\n"; system("mount $_[1]"); # system("mount -t $_[2] -o $_[4] $_[0] $_[1]"); } } $readme_str=< EOS $bugs_str=<... EOS $mount_str=<... EOS umask 077; chop($date=`LC_ALL=C date "+%b %d %Y %H:%M"`); unless (-x '/bin/mount') { print "-r--r--r-- 1 root root 0 $date mount-EXEC-ERROR\n"; exit 0; } unless (-r '/etc/fstab') { print "-r--r--r-- 1 root root 0 $date fstab-OPEN-ERROR\n"; exit 0; } unless (-r '/etc/mtab') { print "-r--r--r-- 1 root root 0 $date mtab-OPEN-ERROR\n"; exit 0; } undef $/; open (IN, "; open (IN, "mount |") and $mn = ; open (IN, "df |") and $df = ; close IN; $/ = "\n"; $fs =~ s/^#.*\n|^[ \t]*\n//mg; $fs =~ s/[ \t]+/ /mg; $mn =~ s/ on | type / /mg; $mn =~ s/\((.*?)\)\n/$1\n/mg; $df =~ s/File.*?\n//g; $df =~ s/[ \t]+/ /mg; @fs = split /\n/, $fs; @mn = split /\n/, $mn; @df = split /\n/, $df; $i = 0; foreach (@fs) #process predefined ones { split; #get pieces $_[0] = filesys, 1 = mountp, 2 = type, # 3 = options, 4 = dump, 5 = pass if ($mn =~ /^$_[0] $_[1] ([^ ]+) ([^\n]+)/m) #ok! mounted # get actual options... { $_[6] = 'Yes'; #mounted $_[2] = $1; $_[3] = $2; #type and options if ($df =~ /^$_[0] ([^ ]+) ([^ ]+) ([^ ]+) ([^\n]+) $_[1]$/m) # # ok, have size info!!! { $_[7] = $1; $_[8] = $2; $_[9] = $3; $_[10] = $4; #size, used, free, use% } } else { $_[6] = 'No'; #umounted } push (@f, [@_]); #an array $_[0] =~ s/^\///; #we throw it away... :-) $fs .= join (' ', $_[0], 'on', $_[1], $i) . "\n"; #a matchable var with linenum $i++; } if($ARGV[0] eq "list") { shift; &mcfstabfs_list(@ARGV); exit 0; } elsif($ARGV[0] eq "copyout") { shift; &mcfstabfs_copyout(@ARGV); exit 0; } elsif($ARGV[0] eq "run") { shift; &mcfstabfs_run(@ARGV); exit 0; } exit 1; -------------- next part -------------- --- extfs.c.bak Tue Mar 11 01:01:56 2003 +++ extfs.c Wed May 14 22:51:16 2003 @@ -44,6 +44,11 @@ #undef ERRNOR #define ERRNOR(x,y) do { my_errno = x; return y; } while(0) +#define EXTFS_REFRESH_RUN 1 +#define EXTFS_REFRESH_UNLINK 2 +#define EXTFS_REFRESH_RMDIR 4 +#define EXTFS_REFRESH_WRITE 8 + struct inode { nlink_t nlink; struct entry *first_in_subdir; /* only used if this is a directory */ @@ -90,6 +95,7 @@ #define MAXEXTFS 32 static char *extfs_prefixes [MAXEXTFS]; static char extfs_need_archive [MAXEXTFS]; +static char extfs_refresh_flag [MAXEXTFS]; static int extfs_no = 0; static void extfs_fill_names (vfs *me, void (*func)(char *)) @@ -411,6 +417,19 @@ return 0; } +static void reread_archive (struct archive *archive) +{ + int fstype = archive->fstype; + char *name = g_strdup (archive->name); + + free_archive (archive); + read_archive (fstype, name, &archive); + g_free (name); + update_panels (UP_OPTIMIZE, UP_KEEPSEL); + repaint_screen (); +} + + static char *get_path (char *inname, struct archive **archive, int is_dir, int do_not_open); @@ -633,6 +652,9 @@ g_free (q); shell_execute (cmd, 0); g_free (cmd); + + if (extfs_refresh_flag[archive->fstype] & EXTFS_REFRESH_RUN) + reread_archive (archive); } static void * @@ -1054,6 +1076,9 @@ } remove_entry (entry); + if (extfs_refresh_flag[archive->fstype] & EXTFS_REFRESH_UNLINK) + reread_archive (archive); + return 0; } @@ -1104,6 +1129,9 @@ } remove_entry (entry); + if (extfs_refresh_flag[archive->fstype] & EXTFS_REFRESH_RMDIR) + reread_archive (archive); + return 0; } @@ -1291,6 +1319,7 @@ { FILE *cfg; char *mc_extfsini; + char refresh_flag = 0; mc_extfsini = concat_dir_and_file (mc_home, "extfs" PATH_SEP_STR "extfs.ini"); cfg = fopen (mc_extfsini, "r"); @@ -1314,6 +1343,10 @@ /* Handle those with a trailing ':', those flag that the * file system does not require an archive to work + * filesys:/rduw r - reread after run + * d - reread after rmdir + * u - reread after unlink + * w - reread after write not implemented */ if (*key == '[') { @@ -1326,6 +1359,31 @@ if (*key == '#') continue; + c = key; + while ((*c != '/') && (*c != '\n') && (*c != '\0')) + c++; + if (*c == '/') { + *c = '\n'; + c++; + while ((*c != '\n') && (*c != '\0')) { + switch (*c) { + case 'r': + refresh_flag |= EXTFS_REFRESH_RUN; + break; + case 'd': + refresh_flag |= EXTFS_REFRESH_RMDIR; + break; + case 'u': + refresh_flag |= EXTFS_REFRESH_UNLINK; + break; +/* case 'w': + refresh_flag |= EXTFS_REFRESH_WRITE; + break; */ + } + c++; + } + } + if ((c = strchr (key, '\n'))){ *c = 0; c = &key [strlen (key) - 1]; @@ -1333,6 +1391,7 @@ c = key; } extfs_need_archive [extfs_no] = !(*c == ':'); + extfs_refresh_flag [extfs_no] = refresh_flag; if (*c == ':') *c = 0; if (!(*key)) From ciampix at libero.it Thu May 15 15:52:56 2003 From: ciampix at libero.it (Marco Ciampa) Date: Thu, 15 May 2003 17:52:56 +0200 Subject: Syntax highlighting README In-Reply-To: References: <20030514174929.GA2275@tech2.scuola> Message-ID: <20030515155256.GA29343@tech2.scuola> On Wed, May 14, 2003 at 06:36:16PM -0400, Pavel Roskin wrote: > On Wed, 14 May 2003, Marco Ciampa wrote: > > > file ..\*\\.(rb|RB)$ Ruby\sProgram ^#!\s\*/.\*/ruby > > include ruby.syntax > > Thanks, applied! > > > Please note that this is a preliminary version and any comment and > > suggestions are welcome! > > Some other rules highlight numbers, but I don't really care. I leave it > to those who actually program in Ruby. > > You may want to consider brighter highlighting for function names after > "def" because there are too few other syntax elements around to make > function definitions easy to distinguish. I'll investigate on how to do it. I though that would be useful this 'cut & paste' from the cooledit manual for syntax highlighting hacking to be put on the /syntax dir as a README file. bye -- Marco Ciampa _________________________________ Naviga www.numeroverdeweb.it -------------- next part -------------- Syntax highlighting README (derived from cooledit manual) Syntax highlighting means that keywords and contexts(like C comments, string constants, etc) are highlighted in different colours. The following section explains the format of the file ~/.cedit/syntax. The file ~/.mc/cedit/Syntax is rescanned on opening of any new editor file. It contains a list of file types and how to identify what rule set the text you are editing belongs to. The file token dictates how to match up your text. On the same line as a file token must appear a regular expression to match the filename, a string to be displayed on the left of the editor window for description purposes, and a regular expression to match the first line of the file. If either of the regular expressions match, the file is deemed to have the particular type. For example file ..\*\\.(py|PY])$ Python\sProgram ^#!\s\*/.\*/python Will cause a file to be labelled as Python Program if it contains say, #!/usr/bin/python, on the first line OR of it ends in say Note that *, + and \ have to be escaped with a \, and space must be presented with a \s. After the file keyword may come the include keyword. The include keyword says to load a rule set from a separate file, and is the preferred way of adding new rule sets. The path from where it loads defaults to cooledit/syntax/ under the lib/ directory where you installed Cooledit. See the examples in your own Syntax file and in this direc- tory. Each rule set is divided into contexts, and each context contains keyword definitions. A context is a scope within the text that a particular set of keywords applies to. For instance, the region within a C style quote (i.e. between " quotations) has its own separate colour and hence its own separate context. Within it, the normal C tokens, like if and while, will not apply, but %d should be highlighted in a different colour. Contexts are usually for when you have something that must be coloured across multiple lines. The default context contains the list of keywords to fall back on should there be no other applicable con- text. This is usually normal programming code. A trivial C programming rule set might look like this: file .\*\\.c C\sProgram\sFile (#include|/\\\*) wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_ # default colors context default keyword whole if yellow/24 keyword whole else yellow/24 keyword whole for yellow/24 keyword whole while yellow/24 keyword whole do yellow/24 keyword whole switch yellow/24 keyword whole case yellow/24 keyword whole static yellow/24 keyword whole extern yellow/24 keyword { brightcyan/14 keyword } brightcyan/14 keyword '*' green/6 # C comments context /\* \*/ brown/22 # C preprocessor directives context linestart # \n brightred/18 keyword \\\n yellow/24 # C string constants context " " green/6 keyword %d yellow/24 keyword %s yellow/24 keyword %c yellow/24 keyword \\" yellow/24 Each context starts with a line of the form: context [exclusive] [whole|wholeright|wholeleft] [lines- tart] delim [linestart] delim [foreground] [background] One exception is the first context. It must start with the command context default [foreground] [background] or else cooledit will return an error. The linestart option dictates that delim must start at the beginning of a line. The whole option tells that delim must be a whole word. What constitutes a whole word are a set of characters that can be changed at any point in the file with the wholechars command. The wholechars command at the top just sets the set exactly to its default and could therefore have been omitted. To specify that a word must be whole on the left only, you can use the wholeleft option, and similarly on the right. The left and right set of charac- ters can be set separately with, wholechars [left|right] characters The exclusive option causes the text between the delim- iters to be colourised, but not the delimiters themselves. Each rule is a line of the form: keyword [whole|wholeright|wholeleft] [linestart] string foreground [background] Important to note is the line keyword \\\n yellow/24 This line defines a keyword containing the \ and newline characters. Because keywords have a higher precedence than context delimiters, this keyword prevents the context from ending at the end of a line if the line ends in a \ thus allowing C preprocessor directive to continue across multiple lines. The colours themselves need to apply to the Midnight Com- mander internal editor as well as to Cooledit. Therefore the form midnight-commander-color/cooledit-color is used. See some of the many rule sets given, for exam- ples on using this. Usually the background colour is omit- ted, thus defaulting to the usual background colour. Context or keyword strings are interpreted so that you can include tabs and spaces with the sequences \t and \s. New- lines and the \ are specified with \n and \\ respectively. Since whitespace is used as a seperator, it may not be used explicitedly. Also, \* must be used to specify a *, and a \+ to specify a +. The * itself is a wildcard that matches any length of characters. The + is like the * but matches a length of non-whitespace characters only. For example, keyword '+' green/6 keyword '\s' green/6 colours all C single character constants green. You could also have used keyword "*" green/6 to colour string constants, except that the matched string may not cross newlines. The \{ wild card matches any characters that exists between it and its matching \}. For example, the following matches C style octals: keyword '\\\{0123\}\{01234567\}\{01234567\}' brightgreen/16 The \[ \] wild card is similar and matches any number of characters. All wild cards may be used within context delimiters as well, but you cannot have a wildcard as the first charac- ter of a context delimiter. In addition, using a wildcard as the first character of a keyword, impacts hugely on performance. Comments may be included on a line of there own and begin with a #. Because of the simplicity of the implementation, there are a few intricacies that will not be coped with correctly but these are a minor irritation. On the whole, a broad spectrum of quite complicated situations are handled with these simple rules. It is a good idea to take a look at the syntax file to see some of the nifty tricks you can do with a little imagination. If you can't get by with the rules I have coded, and you think you have a rule that would be useful, please email me with your request. How- ever, do not ask for regular expression support, because this is flatly impossible. A useful hint is to work as much as possible with the things you can do rather than try to do things that this implementation can't cope with. Also remember that the aim of syntax highlighting is to make programming less prone to error, not to make code look pretty. From szaszg at hu.inter.net Fri May 16 12:45:23 2003 From: szaszg at hu.inter.net (szaszg at hu.inter.net) Date: Fri, 16 May 2003 12:45:23 GMT Subject: [PATCH] fstab, mfstab Message-ID: Hi! Here is a newer 'fstab' VFS script, and an 'mfstab' (modified-fstab). The 'mfstab' not need any rescanning, because give info via running info file rather than viewing it. Gergely -------------- next part -------------- A non-text attachment was scrubbed... Name: fstab Type: application/octet-stream Size: 8543 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mfstab Type: application/octet-stream Size: 9542 bytes Desc: not available URL: From proski at gnu.org Fri May 16 15:38:48 2003 From: proski at gnu.org (Pavel Roskin) Date: Fri, 16 May 2003 11:38:48 -0400 (EDT) Subject: Syntax highlighting README In-Reply-To: <20030515155256.GA29343@tech2.scuola> References: <20030514174929.GA2275@tech2.scuola> <20030515155256.GA29343@tech2.scuola> Message-ID: On Thu, 15 May 2003, Marco Ciampa wrote: > I though that would be useful this 'cut & paste' from the cooledit > manual for syntax highlighting hacking to be put on the /syntax dir as a > README file. Actually, there is some information about syntax rules in "man mcedit". If we make a separate document, maybe it should be another manpage? -- Regards, Pavel Roskin From proski at gnu.org Fri May 16 15:56:40 2003 From: proski at gnu.org (Pavel Roskin) Date: Fri, 16 May 2003 11:56:40 -0400 (EDT) Subject: [PATCH] fstab, mfstab In-Reply-To: References: Message-ID: On Fri, 16 May 2003 szaszg at hu.inter.net wrote: > Here is a newer 'fstab' VFS script, and an 'mfstab' (modified-fstab). > The 'mfstab' not need any rescanning, because give info via running > info file rather than viewing it. This is all cool and nice, but I don't think this can be included into the sources in its present form. We shouldn't encourage users to do system administration from mc. I don't want to answer e-mails from the users who lost their data because they didn't see and didn't know what they were doing. System administration tools must provide a very high level of reliability that the development process of GNU Midnight Commander doesn't provide and doesn't aim to provide. Also, the level of testing received by undocumented external VFSs is inadequate for system administration tools. There were major bugs sitting for years in some of the scripts, and nobody complained. I'm ready to put your script to the "contribution" section on the website if you write a README and settle on one script. -- Regards, Pavel Roskin From szaszg at hu.inter.net Fri May 16 22:52:53 2003 From: szaszg at hu.inter.net (Sza'sz Gergely) Date: Fri, 16 May 2003 23:52:53 +0100 Subject: [PATCH] fstab, mfstab In-Reply-To: References: Message-ID: <20030516225252.GA2596@ixtys> On Fri, May 16, 2003 at 11:56:40AM -0400, Pavel Roskin wrote: > This is all cool and nice, but I don't think this can be included into the Thanks! > sources in its present form. We shouldn't encourage users to do system > administration from mc. I don't want to answer e-mails from the users who > lost their data because they didn't see and didn't know what they were > doing. I see. But I don't think, it is 'system administration' at all: - my script is just a frontend for '(u)mount' and 'df' - (u)mounting a partition is less 'dangerouse' than delete it [F8] :-) - you don't lose any data even if you (u)mount 'root/system' partitions - my script can't do any extra thing, which you can't do with (u)mount - you can only (u)mount normally a floppy, a CD-ROM (DVD), or e.g. a CF card. Those which exist in '/etc/fstab' with 'user' option - you can't do any 'unexpected' (u)mount, because, only root (uid=0) can (u)mount - All in all, to (u)mount user (u)mountable partitions (imho) *not system administration* And to top it all: - I think that, most of the people (I'm sure, You too), do system administration 'from' mc, when editing /etc/xxx files :-) :-) **But, You are the boss** > > System administration tools must provide a very high level of reliability > that the development process of GNU Midnight Commander doesn't provide > and doesn't aim to provide. Also, the level of testing received by > undocumented external VFSs is inadequate for system administration tools. > There were major bugs sitting for years in some of the scripts, and nobody > complained. I see. But my script cannot change any of system files (fstab), or system settings. And if you can't (u)mount a partition from 'fstab VFS', or get wrong info from an 'fstab' entry/mount... I think that, it is not critical :-) > I'm ready to put your script to the "contribution" section on the website > if you write a README and settle on one script. Thanks. I think this will be the 'mfstab' script, because it can work with the present state of 'mc' VFS... (fstab need a patch on 'extfs.c', which I send before...) Gergely P.s.: And what about the extfs.c patch? Don't we need any similar function in VFS? (Rescan (get a new list/kill from cache) from an external FS data when it is neccesary?) -------------- next part -------------- #! /usr/bin/perl # # 2003 (c) Gergely Sz?sz # This software is under GNU license # sub mcfstabfs_list { # # print "-r--r--r-- 1 root root 0 $date README\n"; print "-r--r--r-- 1 root root 0 $date TODO\n"; print "-r--r--r-- 1 root root 0 $date BUGS\n"; print "-r--r--r-- 1 root root 0 $date read_fstab\n"; print "-r--r--r-- 1 root root 0 $date pipe_mount\n"; print "-r--r--r-- 1 root root 0 $date read_mtab\n"; $i = 0; foreach (@f) { @_ = @{$_}; print "-r-xr-xr-x 1 root root 0 $date $_[0] on $_[1]/info\n"; if ($_[6] eq 'Yes (not in fstab)') { printf "lr-xr-xr-x 1 root root 0 $date _mount_%03d -> $_[0] on $_[1]\n", $i; } else { printf "lr-xr-xr-x 1 root root 0 $date _fstab_%03d -> $_[0] on $_[1]\n", $i; print "---x--x--x 1 root root 0 $date $_[0] on $_[1]/mount\n"; print "---x--x--x 1 root root 0 $date $_[0] on $_[1]/umount\n"; } $i++; } } sub mcfstabfs_dumpfile # $destfile $string { if (open (FILEOUT,">$_[0]")) { print FILEOUT $_[1]; close FILEOUT; # system ("chmod a+x $_[0]"); #we need it? } } sub mcfstab_uline { @_ = split //, $_[0]; return '_' . join ('_', @_); } sub mcfstab_bold { my $r; @_ = split //, $_[0]; foreach (@_) { $r .= $_ . '' . $_; } return $r; } sub mcfstab_red { return '' . $_[0] . ''; } sub mcfstab_yellow { return '' . $_[0] . ''; } sub mcfstabfs_copyout { local($archive,$filename,$destfile)=@_; if ($filename eq 'README') { mcfstabfs_dumpfile ($destfile, $readme_str); exit 0; } if ($filename eq 'BUGS') { mcfstabfs_dumpfile ($destfile, $bugs_str); exit 0; } if ($filename eq 'TODO') { mcfstabfs_dumpfile ($destfile, $todo_str); exit 0; } if ($filename eq 'read_fstab') { open (FSTAB, "); close FSTAB; mcfstabfs_dumpfile ($destfile, $fstab); exit 0; } if ($filename eq 'pipe_mount') { open (FSTAB, "/bin/mount |"); $fstab .= $_ while (); close FSTAB; mcfstabfs_dumpfile ($destfile, $fstab); exit 0; } if ($filename eq 'read_mtab') { open (FSTAB, "); close FSTAB; mcfstabfs_dumpfile ($destfile, $fstab); exit 0; } unless ($filename =~ /_mount_([0-9]+)/) { $fs =~ /$filename ([^\n]+)/m; } @_ = @{@f[$1]}; if ($filename =~ s/\/info$//) { mcfstabfs_dumpfile ($destfile, sprintf ($info_str, mcfstab_uline ($_[0]), mcfstab_uline ($_[1]))); exit 0; } if ($filename =~ s/\/umount$//) { ($_, $filename) = split / on /, $filename; mcfstabfs_dumpfile ($destfile, sprintf ($umount_str, mcfstab_uline ($_[0]), mcfstab_uline ($_[1]))); exit 0; } if ($filename =~ s/\/mount$//) { ($_, $filename) = split / on /, $filename; mcfstabfs_dumpfile ($destfile, sprintf ($mount_str, mcfstab_uline ($_[0]), mcfstab_uline ($_[1]))); exit 0; } if ($filename eq 'mount-OPEN-ERROR') { mcfstabfs_dumpfile ($destfile, "*** ERROR***\n\nCannot execute '/bin/mount' system utility!\n"); exit 0; } if ($filename eq 'fstab-OPEN-ERROR') { mcfstabfs_dumpfile ($destfile, "*** ERROR***\n\nCannot read the '/etc/fstab' file!\n"); exit 0; } } sub mcfstabfs_run { local($archive,$filename)=@_; unless ($filename =~ /_mount_([0-9]+)/) { $fs =~ /$filename ([^\n]+)/m; } @_ = @{@f[$1]}; if($filename =~ /\/info$/) { $_ = "\n\nDevice:\t\t" . mcfstab_yellow ($_[0]) . "\nMount point:\t" . mcfstab_yellow ($_[1]) . "\nType:\t\t" . mcfstab_red ($_[2]) . "\nOptions:\t" . mcfstab_red ($_[3]) . "\nDump:\t\t" . $_[4] . "\nPass:\t\t" . $_[5] . "\nMounted:\t" . mcfstab_yellow ($_[6]); if ($_[7] ne undef) { $_ .= "\nSize:\t\t" . mcfstab_yellow ($_[7]) . "k\nUsed:\t\t" . mcfstab_yellow ($_[8]) . "k\nFree:\t\t" . mcfstab_yellow ($_[9]) . "k\nUsage:\t\t" . mcfstab_yellow ($_[10]); } print $_ . "\n\n"; } elsif($filename =~ /\/umount$/) { if ($_[6] eq 'Yes') { print "Umounting: $_[0] from $_[1]...\n"; system("umount $_[1]"); } else { print "This filesystem " . mcfstab_red ('do not') . " mounted yet.\n"; } } else { if ($_[6] eq 'No') { print "Mounting: $_[0] to $_[1]...\n"; system("mount $_[1]"); # system("mount -t $_[2] -o $_[4] $_[0] $_[1]"); } else { print "This filesystem " . mcfstab_red ('already') . " mounted.\n"; } } } $readme_str=< EOS $bugs_str=<... EOS $info_str=<... EOS umask 077; chop($date=`LC_ALL=C date "+%b %d %Y %H:%M"`); unless (-x '/bin/mount') { print "-r--r--r-- 1 root root 0 $date mount-EXEC-ERROR\n"; exit 0; } unless (-r '/etc/fstab') { print "-r--r--r-- 1 root root 0 $date fstab-OPEN-ERROR\n"; exit 0; } unless (-r '/etc/mtab') { print "-r--r--r-- 1 root root 0 $date mtab-OPEN-ERROR\n"; exit 0; } undef $/; open (IN, "; open (IN, "mount |") and $mn = ; open (IN, "df |") and $df = ; close IN; $/ = "\n"; $fs =~ s/^#.*\n|^[ \t]*\n//mg; $fs =~ s/[ \t]+/ /mg; $mn =~ s/ on | type / /mg; $mn =~ s/\((.*?)\)\n/$1\n/mg; $df =~ s/File.*?\n//g; $df =~ s/[ \t]+/ /mg; @fs = split /\n/, $fs; @mn = split /\n/, $mn; @df = split /\n/, $df; $i = 0; foreach (@fs) #process predefined ones { split; #get pieces $_[0] = filesys, 1 = mountp, 2 = type, # 3 = options, 4 = dump, 5 = pass if ($mn =~ /^$_[0] $_[1] ([^ ]+) ([^\n]+)/m) #ok! mounted # get actual options... { $_[6] = 'Yes'; #mounted $_[2] = $1; $_[3] = $2; #type and options if ($df =~ /^$_[0] ([^ ]+) ([^ ]+) ([^ ]+) ([^\n]+) $_[1]$/m) # # ok, have size info!!! { $_[7] = $1; $_[8] = $2; $_[9] = $3; $_[10] = $4; #size, used, free, use% } } else { $_[6] = 'No'; #umounted } push (@f, [@_]); #an array $_[0] =~ s/^\///; #we throw it away... :-) $fs .= join (' ', $_[0], 'on', $_[1], $i) . "\n"; #a matchable var with linenum $i++; } foreach (@mn) #process actual mounts { split; #get pieces $_[0] = filesys, 1 = mountp, 2 = type, # 3 = options, 4 = dump, 5 = pass next if ($fs =~ /^$_[0] $_[1]/m); #ok! already have # get actual options... $_[4] = '-'; $_[5] = '-'; $_[6] = 'Yes (not in fstab)'; #mounted if ($df =~ /^$_[0] ([^ ]+) ([^ ]+) ([^ ]+) ([^\n]+) $_[1]$/m) # # ok, have size info!!! { $_[7] = $1; $_[8] = $2; $_[9] = $3; $_[10] = $4; #size, used, free, use% } push (@f, [@_]); #an array $_[0] =~ s/^\///; #we throw it away... :-) $fs .= join (' ', $_[0], 'on', $_[1], $i) . "\n"; #a matchable var with linenum $i++; } if($ARGV[0] eq "list") { shift; &mcfstabfs_list(@ARGV); exit 0; } elsif($ARGV[0] eq "copyout") { shift; &mcfstabfs_copyout(@ARGV); exit 0; } elsif($ARGV[0] eq "run") { shift; &mcfstabfs_run(@ARGV); exit 0; } exit 1; -------------- next part -------------- **FSTAB VFS** This is a modified version of the original fstab VFS, to work with an unmodified 'mc'. We found executable 'info' files in each leaf directory, and we can get information from a specified mount when executing this info file, rather than showing ([F3]) it... The sizes of symlinks are all zero (no mount/umount info in it), and the 'mount' and 'umount' executables exist together, and warn if you try to mount a mounted, or umount a not mounted filesystem... So, not so nice interface, but works with unpatched VFS... The original README: This virtual filesystem (fstab) gives you an easy to use (u)mounting tool for 'mounting' and 'umounting' filesystems defined in '/etc/fstab'. You see one symlink for each definition in fstab, named '_mount_NNN'. Where NNN is a number. The size of the symlinks is 0 if not mounted, 1 if mounted and 2 if mounted, but there is no size information (e.g. usbfs, procfs ...). Every symlink points to a directory, which represents the fstab entry. The path of the directory is like 'DEVICE on MOUNTPOINT', where DEVICE is the device and the MOUNTPOINT is the mount point of it (e.g. '/dev/hda1 on /usr'. There is a 'dev' directory, containing a 'hda1 on' directory, which containing an 'usr' directory.). There are two files in every 'leaf' directory: - a readable 'info' and - an executable 'mount' or 'umount' depend on the state of the filesystem Read the 'info' ([F3]) to get some information, and execute ([ENTER]) the (u)mount file, to (u)mount the specified device. You should add a line (mfstab:) to the 'extfs.ini' file, and copy the 'mfstab' script to that directory (where is 'extfs.ini'). Then start 'mc' and type: cd #mfstab[ENTER] Please enjoy... Created by Gergely Sz?sz From bulia at dr.com Sun May 18 02:15:31 2003 From: bulia at dr.com (bulia byak) Date: Sat, 17 May 2003 21:15:31 -0500 Subject: ESC in MC Message-ID: <20030518021531.32901.qmail@mail.com> ----- Original Message ----- From: Vyacheslav Filyayev Date: Sat, 17 May 2003 12:39:57 +0300 To: bulia at dr.com Subject: ESC in MC > Dear bulia byak, > right now I trying to do what you say about once pressing instead of double pressing ESC in MC. > > However how I tried MC don't care about my 1000, 1000000 or any else value. > It seem to me MC simply ignore those lines, which include ESCMODE_TIMEOUT. What I need to do? src/key.c: change: /* timeout for old_esc_mode in usec */ #define ESCMODE_TIMEOUT 1000000 to /* timeout for old_esc_mode in usec */ #define ESCMODE_TIMEOUT 1000 and recompile. Works for me. -- __________________________________________________________ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup From ciampix at libero.it Sun May 18 16:12:44 2003 From: ciampix at libero.it (Marco Ciampa) Date: Sun, 18 May 2003 18:12:44 +0200 Subject: Syntax highlighting README In-Reply-To: References: <20030514174929.GA2275@tech2.scuola> <20030515155256.GA29343@tech2.scuola> Message-ID: <20030518161244.GA15131@ksei.casa> On Fri, May 16, 2003 at 11:38:48AM -0400, Pavel Roskin wrote: > On Thu, 15 May 2003, Marco Ciampa wrote: > > > I though that would be useful this 'cut & paste' from the cooledit > > manual for syntax highlighting hacking to be put on the /syntax dir as a > > README file. > > Actually, there is some information about syntax rules in "man mcedit". > If we make a separate document, maybe it should be another manpage? Arg! Gosh! You are right! Shame on me! Ok man page is good and enough; I have to drink less beer... -- Marco Ciampa From Dmitry.Semyonov at oktet.ru Mon May 19 07:19:51 2003 From: Dmitry.Semyonov at oktet.ru (Dmitry Semyonov) Date: Mon, 19 May 2003 11:19:51 +0400 (MSD) Subject: "Cannot create temporary command file" error Message-ID: Hello all! mc-4.6.0 creates temporary files under "/tmp/mc-$USER" directory by default. Old contents of /tmp is cleared from time to time via cron. So, mc-* folders may be cleared too while mc is running (e.g. it is opened on some console during several weeks). After that any attempt to view e.g. *.bz2 file via F3 results in "Cannot create temporary command file" error message. Why not to check the /tmp/mc-$USER folder existence, and try to create it first before showing the error? ...Bye..Dmitry. From aliakc at web.de Mon May 19 07:29:25 2003 From: aliakc at web.de (Ali Akcaagac) Date: 19 May 2003 09:29:25 +0200 Subject: "Cannot create temporary command file" error In-Reply-To: References: Message-ID: <1053329364.21667.0.camel@localhost> On Mon, 2003-05-19 at 09:19, Dmitry Semyonov wrote: > mc-4.6.0 creates temporary files under "/tmp/mc-$USER" directory by > default. Old contents of /tmp is cleared from time to time via cron. > So, mc-* folders may be cleared too while mc is running (e.g. it is > opened on some console during several weeks). After that any attempt to > view e.g. *.bz2 file via F3 results in "Cannot create temporary command > file" error message. > > Why not to check the /tmp/mc-$USER folder existence, and try to create > it first before showing the error? Maybe you gonna fix your tmp dir first and chmod it correctly. It has to be 1777 if the user isn't able to create some temporary stuff in that dir then something is seriously wrong. From Dmitry.Semyonov at oktet.ru Mon May 19 07:40:12 2003 From: Dmitry.Semyonov at oktet.ru (Dmitry Semyonov) Date: Mon, 19 May 2003 11:40:12 +0400 (MSD) Subject: "Cannot create temporary command file" error In-Reply-To: <1053329364.21667.0.camel@localhost> Message-ID: On 19 May 2003, Ali Akcaagac wrote: > On Mon, 2003-05-19 at 09:19, Dmitry Semyonov wrote: > > mc-4.6.0 creates temporary files under "/tmp/mc-$USER" directory by > > default. Old contents of /tmp is cleared from time to time via cron. > > So, mc-* folders may be cleared too while mc is running (e.g. it is > > opened on some console during several weeks). After that any attempt to > > view e.g. *.bz2 file via F3 results in "Cannot create temporary command > > file" error message. > > > > Why not to check the /tmp/mc-$USER folder existence, and try to create > > it first before showing the error? > > Maybe you gonna fix your tmp dir first and chmod it correctly. It has to > be 1777 if the user isn't able to create some temporary stuff in that > dir then something is seriously wrong. Don't pay too much attention to confusing error message ;) Users are able to create files under /tmp. The problem arises after /tmp/mc-$USER is deleted during active mc session. ...Bye..Dmitry. From aliakc at web.de Mon May 19 07:54:11 2003 From: aliakc at web.de (Ali Akcaagac) Date: 19 May 2003 09:54:11 +0200 Subject: "Cannot create temporary command file" error In-Reply-To: References: Message-ID: <1053330851.703.2.camel@localhost> On Mon, 2003-05-19 at 09:40, Dmitry Semyonov wrote: > > Maybe you gonna fix your tmp dir first and chmod it correctly. It has to > > be 1777 if the user isn't able to create some temporary stuff in that > > dir then something is seriously wrong. > > Don't pay too much attention to confusing error message ;) > Users are able to create files under /tmp. > The problem arises after /tmp/mc-$USER is deleted during active mc > session. Ahh! .... Yes this situation, yeah I find this quite annoying myself from time to time when deleting that mc-* dir by mistake within a mc session. I was wrong by assuming that this was a general tmp dir issue with general creating of that dir. I think that this stuff should be handled not in the tmp dir rather than the user dir itself e.g. .mc/ .mc/tmp/ <--- here .mc/history .mc/ini Would make more sense. But I think that MC itself use the tmpdir functioncalls to deal with that stuff. From makovick at kmlinux.fjfi.cvut.cz Mon May 19 09:59:53 2003 From: makovick at kmlinux.fjfi.cvut.cz (Jindrich Makovicka) Date: Mon, 19 May 2003 11:59:53 +0200 Subject: "Cannot create temporary command file" error In-Reply-To: <1053330851.703.2.camel@localhost> References: <1053330851.703.2.camel@localhost> Message-ID: <3EC8AB19.2050505@kmlinux.fjfi.cvut.cz> Ali Akcaagac wrote: > On Mon, 2003-05-19 at 09:40, Dmitry Semyonov wrote: > >>>Maybe you gonna fix your tmp dir first and chmod it correctly. It has to >>>be 1777 if the user isn't able to create some temporary stuff in that >>>dir then something is seriously wrong. >> >>Don't pay too much attention to confusing error message ;) >>Users are able to create files under /tmp. >>The problem arises after /tmp/mc-$USER is deleted during active mc >>session. > > Ahh! .... Yes this situation, yeah I find this quite annoying myself > from time to time when deleting that mc-* dir by mistake within a mc > session. I was wrong by assuming that this was a general tmp dir issue > with general creating of that dir. The attached patch hopefully fixes it. > I think that this stuff should be handled not in the tmp dir rather than > the user dir itself e.g. > > .mc/ > .mc/tmp/ <--- here > .mc/history > .mc/ini > > Would make more sense. But I think that MC itself use the tmpdir > functioncalls to deal with that stuff. It doesn't seem to, it just uses getenv('TMPDIR') so it's matter of changing one line of code. But I think an advantage of using /tmp is that /tmp can be cleaned much easier. When using .mc/tmp/mc-XXXX, these directories will pile up, as with current mc, there are lots of situations when the user has to kill -9 mc because it froze. Regards, -- Jindrich Makovicka From makovick at kmlinux.fjfi.cvut.cz Mon May 19 10:02:22 2003 From: makovick at kmlinux.fjfi.cvut.cz (Jindrich Makovicka) Date: Mon, 19 May 2003 12:02:22 +0200 Subject: "Cannot create temporary command file" error In-Reply-To: <3EC8AB19.2050505@kmlinux.fjfi.cvut.cz> References: <1053330851.703.2.camel@localhost> <3EC8AB19.2050505@kmlinux.fjfi.cvut.cz> Message-ID: <3EC8ABAE.6030407@kmlinux.fjfi.cvut.cz> aargh :( _here_ is the patch -- Jindrich Makovicka -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: utilunix.c.diff URL: From Dmitry.Semyonov at oktet.ru Mon May 19 10:21:39 2003 From: Dmitry.Semyonov at oktet.ru (Dmitry Semyonov) Date: Mon, 19 May 2003 14:21:39 +0400 (MSD) Subject: "Cannot create temporary command file" error In-Reply-To: <3EC8AB19.2050505@kmlinux.fjfi.cvut.cz> Message-ID: On Mon, 19 May 2003, Jindrich Makovicka wrote: > Ali Akcaagac wrote: > > On Mon, 2003-05-19 at 09:40, Dmitry Semyonov wrote: > > > >>Don't pay too much attention to confusing error message ;) > >>Users are able to create files under /tmp. > >>The problem arises after /tmp/mc-$USER is deleted during active mc > >>session. > > > > > Ahh! .... Yes this situation, yeah I find this quite annoying myself > > from time to time when deleting that mc-* dir by mistake within a mc > > session. I was wrong by assuming that this was a general tmp dir issue > > with general creating of that dir. > > The attached patch hopefully fixes it. mc_tmpdir() function you are patching has the following comment: * The first call should be done early, since we are using fprintf() * and not message() to report possible problems. So, in our case, a user will see some garbage on the screen if the mc-* directory does not exist and can not be created. ...Bye..Dmitry. From nerijus at users.sourceforge.net Mon May 19 12:06:03 2003 From: nerijus at users.sourceforge.net (Nerijus Baliunas) Date: 19 May 2003 15:06:03 +0300 Subject: "Cannot create temporary command file" error In-Reply-To: <1053330851.703.2.camel@localhost> References: <1053330851.703.2.camel@localhost> Message-ID: <1053345963.2197.98.camel@nerijus> Pr, 2003-05-19 10:54, Ali Akcaagac wrote: > I think that this stuff should be handled not in the tmp dir rather than > the user dir itself e.g. > > .mc/ > .mc/tmp/ <--- here It was so, but was changed to /tmp because files were not cleaned by cron scripts in ~/.mc/tmp. Regards, Nerijus From makovick at kmlinux.fjfi.cvut.cz Mon May 19 17:14:44 2003 From: makovick at kmlinux.fjfi.cvut.cz (Jindrich Makovicka) Date: Mon, 19 May 2003 19:14:44 +0200 Subject: "Cannot create temporary command file" error In-Reply-To: References: Message-ID: <3EC91104.9020805@kmlinux.fjfi.cvut.cz> Dmitry Semyonov wrote: > mc_tmpdir() function you are patching has the following comment: > > * The first call should be done early, since we are using fprintf() > * and not message() to report possible problems. > > So, in our case, a user will see some garbage on the screen if the mc-* > directory does not exist and can not be created. well, it could at least try to create the directory, with no complaints if it fails. -- Jindrich Makovicka -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: utilunix.c.diff URL: From badalyan at informa.ru Tue May 20 12:24:50 2003 From: badalyan at informa.ru (=?Windows-1251?B?weDk4Ov/7SDC//fl8evg4g==?=) Date: Tue, 20 May 2003 16:24:50 +0400 Subject: MC + Colorer = good :) Message-ID: <1403073429.20030520162450@informa.ru> Hello. Whether there is an opportunity in future to include an opportunity of support of separate modules? Replacement of yours parser to colorer (http://colorer.sf.net) especially interests. -- Best regals, Badalian Slava HTML-Coder of Office811 badalyan at informa.ru tel.: +7 (8632) 652448, 654076, 654061 http://www.office811.com From Dmitry.Semyonov at oktet.ru Tue May 20 14:20:14 2003 From: Dmitry.Semyonov at oktet.ru (Dmitry Semyonov) Date: Tue, 20 May 2003 18:20:14 +0400 (MSD) Subject: "Cannot create temporary command file" error In-Reply-To: <20030520135308.GA5002@mentat.localdomain> Message-ID: Hello Adam. On Tue, 20 May 2003, Adam Byrtek / alpha wrote: > On Mon, May 19, 2003 at 11:19:51AM +0400, Dmitry Semyonov wrote: > > Why not to check the /tmp/mc-$USER folder existence, and try to create > > it first before showing the error? > > See patch in BTS: > https://savannah.gnu.org/patch/?func=detailpatch&patch_id=1299&group_id=3521 The following note I've sent to Jindrich also applies to your patch: ----- mc_tmpdir() function you are patching has the following comment: * The first call should be done early, since we are using fprintf() * and not message() to report possible problems. So, in our case, a user will see some garbage on the screen if the mc-* directory does not exist and can not be created. ----- Therefore, I personally like the latest patch from Jindrich more. ...Bye..Dmitry. From alpha at student.uci.agh.edu.pl Tue May 20 13:53:09 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Tue, 20 May 2003 15:53:09 +0200 Subject: "Cannot create temporary command file" error In-Reply-To: References: Message-ID: <20030520135308.GA5002@mentat.localdomain> On Mon, May 19, 2003 at 11:19:51AM +0400, Dmitry Semyonov wrote: > Why not to check the /tmp/mc-$USER folder existence, and try to create > it first before showing the error? See patch in BTS: https://savannah.gnu.org/patch/?func=detailpatch&patch_id=1299&group_id=3521 -- _.|._ |_ _. : Adam Byrtek /alpha alpha at debian.org (_|||_)| |(_| : http://krakow.linux.org.pl/ pgp 0xB25952C0 | From proski at gnu.org Tue May 20 19:19:43 2003 From: proski at gnu.org (Pavel Roskin) Date: Tue, 20 May 2003 15:19:43 -0400 (EDT) Subject: Snapshots available over http Message-ID: Hello! The ibiblio.org has recently had a disk crash that affected the FTP archives, including those of of GNU Midnight Commander. The files have been restored. However, the files and directories are still owned by root and cannot be changed. The ownership will be restored once all the data is restored. Until the FTP server is fixed snapshots are available over http: http://www.ibiblio.org/mc/snapshots/ The link on the homepage has been updated. -- Regards, Pavel Roskin From egmont at uhulinux.hu Sun May 25 11:26:26 2003 From: egmont at uhulinux.hu (Koblinger Egmont) Date: Sun, 25 May 2003 13:26:26 +0200 (CEST) Subject: 4 patches (file4, glib2 locale, ...) Message-ID: Hi, I send you four small patches, all of them cleanly apply to both 4.6.0 and the latest snapshot. Please apply them (in case you don't have a good reason not to do so :-))) colors.patch: file copying and similar dialogue windows turned their color from yellow to blue from 4.5.55 to 4.6.0. However, focused hotkey remained yellow, which IMHO looks now ugly, blue is much nicer there. error.patch: g_strerror() in glib2 returns utf8, which appears incorrectly on the screen. E.g. try to remove a file not owned by you using LANG=hu_HU. This patch autodetects whether glib2 is used, and inserts an utf8 -> current locale conversion in this case. file4.patch: using version 4 of the file command (I've tried with file-4.02, grab it from ftp://ftp.astron.com/pub/file/) viewing files inside tarballs often give an error message. The reason is that file 4 prints "/dev/stdin: blahblah" instead of "standard input: blahblah". hu.po.patch: fixes some minor bugs in the Hungarian translation. Anyway, it would be a good idea to change src/boxes.c:460 to contain "iso 8859-*" instead of "iso 8859-1", since this option works perfectly with other iso charsets as well. cheers, Egmont -------------- next part -------------- diff -urN mc-4.6.0-pre2.orig/src/text.c mc-4.6.0-pre2/src/text.c --- mc-4.6.0-pre2.orig/src/text.c 2002-10-14 00:12:14.000000000 +0200 +++ mc-4.6.0-pre2/src/text.c 2002-12-29 16:33:38.000000000 +0100 @@ -41,7 +41,7 @@ "dnormal=black,lightgray:" "dfocus=black,cyan:" "dhotnormal=blue,lightgray:" -"dhotfocus=yellow,cyan:" +"dhotfocus=blue,cyan:" "viewunderline=brightred,blue:" "menuhot=yellow,cyan:" "menusel=white,black:" -------------- next part -------------- diff -urN mc-4.6.0.orig/src/util.c mc-4.6.0/src/util.c --- mc-4.6.0.orig/src/util.c 2003-01-28 23:58:23.000000000 +0100 +++ mc-4.6.0/src/util.c 2003-05-25 13:02:31.000000000 +0200 @@ -765,9 +765,17 @@ char *unix_error_string (int error_num) { static char buffer [BUF_LARGE]; +#if GLIB_MAJOR_VERSION >= 2 + gchar *strerror_currentlocale; + strerror_currentlocale = g_locale_from_utf8(g_strerror (error_num), -1, NULL, NULL, NULL); + g_snprintf (buffer, sizeof (buffer), "%s (%d)", + strerror_currentlocale, error_num); + g_free(strerror_currentlocale); +#else g_snprintf (buffer, sizeof (buffer), "%s (%d)", g_strerror (error_num), error_num); +#endif return buffer; } -------------- next part -------------- diff -urN mc-4.6.0.orig/src/ext.c mc-4.6.0/src/ext.c --- mc-4.6.0.orig/src/ext.c 2002-11-14 08:25:19.000000000 +0100 +++ mc-4.6.0/src/ext.c 2003-04-13 17:12:48.000000000 +0200 @@ -437,6 +437,13 @@ for (content_shift = 15; content_string[content_shift] == ' '; content_shift++); + } else if (!islocal + && !strncmp (content_string, "/dev/stdin:", + 11)) { + /* Skip "/dev/stdin: " */ + for (content_shift = 11; + content_string[content_shift] == ' '; + content_shift++); } } else { /* No data */ -------------- next part -------------- diff -urN mc-4.6.0.orig/po/hu.po mc-4.6.0/po/hu.po --- mc-4.6.0.orig/po/hu.po 2003-02-05 19:09:47.000000000 +0100 +++ mc-4.6.0/po/hu.po 2003-05-25 12:57:38.000000000 +0200 @@ -934,19 +934,19 @@ #: src/boxes.c:460 msgid "Full 8 bits output" -msgstr "8-bites kijelz?s" +msgstr "8 bites kijelz?s" #: src/boxes.c:460 msgid "ISO 8859-1" -msgstr "ISO 8859-1" +msgstr "ISO-8859-*" #: src/boxes.c:460 msgid "7 bits" -msgstr "7-bites" +msgstr "7 bites" #: src/boxes.c:467 src/boxes.c:591 msgid "F&ull 8 bits input" -msgstr "&8-bites bevitel" +msgstr "&8 bites bevitel" #: src/boxes.c:475 src/boxes.c:572 msgid " Display bits " @@ -954,7 +954,7 @@ #: src/boxes.c:556 src/boxes.c:578 src/selcodepage.c:71 msgid "Other 8 bit" -msgstr "Egy?b 8-bites" +msgstr "Egy?b 8 bites" #: src/boxes.c:575 msgid "Input / display codepage:" @@ -2144,7 +2144,7 @@ #: src/filegui.c:772 msgid "&Background" -msgstr "&H?tt?rben" +msgstr "H?tt?r&ben" #: src/filegui.c:782 msgid "&Stable Symlinks" @@ -3060,7 +3060,7 @@ #: src/main.c:2273 msgid "Use stickchars to draw" -msgstr "7-bites ASCII karakterekkel val? megjelen?t?s." +msgstr "7 bites ASCII karakterekkel val? megjelen?t?s." #: src/main.c:2277 msgid "Enables subshell support (default)" @@ -3601,7 +3601,7 @@ #: src/util.c:670 src/util.c:696 msgid "%b %e %H:%M" -msgstr "%b %e %H:%M" +msgstr "%b %e %H.%M" #: src/util.c:671 src/util.c:694 msgid "%b %e %Y" From baudouin.dussard at club-internet.fr Sun May 25 10:48:07 2003 From: baudouin.dussard at club-internet.fr (baudouin dussard) Date: Sun, 25 May 2003 12:48:07 +0200 Subject: small problem Message-ID: <3ED09F67.50508@club-internet.fr> Hello With a mandrake 9.0, when i want to start Midnight Commander in a Konsole, i have this message: Screen size 0x0 is not supported check the TERM environment variable. Could you help me ? Thank Baudouin. From mikey at wirelabs.lublin.pl Sun May 25 23:17:46 2003 From: mikey at wirelabs.lublin.pl (Michal Szwaczko) Date: Mon, 26 May 2003 01:17:46 +0200 Subject: [PATCH] paste-ext revisited Message-ID: <20030525231746.GA32607@matrix> Call me stubborn ;-) I'm sending this little patch once again - this time it's for 4.6.0 as the previous one was said to be outdated. Hope Pavel sees it fit. -- [ Micha? 'Mikey' Szwaczko | GPG Key#:0x653CBD53 ] [ Developer/Troubleshooter | GNU Generation Now! ] [ You're using a keyboard! How quaint! ] From mikey at wirelabs.lublin.pl Sun May 25 23:19:42 2003 From: mikey at wirelabs.lublin.pl (Michal Szwaczko) Date: Mon, 26 May 2003 01:19:42 +0200 Subject: [PATCH] mc-ext revisited Message-ID: <20030525231942.GB32607@matrix> Ooops, the previous post was too fast. Forgot to attach the code ;-) Sorry. The patch included. -- [ Micha? 'Mikey' Szwaczko | GPG Key#:0x653CBD53 ] [ Developer/Troubleshooter | GNU Generation Now! ] [ Fear is good. Paranoia is better. ] -------------- next part -------------- diff -Nur mc-4.6.0-orig/edit/edit.c mc-4.6.0/edit/edit.c --- mc-4.6.0-orig/edit/edit.c Mon Dec 23 11:13:35 2002 +++ mc-4.6.0/edit/edit.c Mon May 26 00:52:42 2003 @@ -2558,6 +2558,9 @@ case CK_Sort: edit_sort_cmd (edit); break; + case CK_ExtCmd: + edit_ext_cmd (edit); + break; case CK_Mail: edit_mail_dialog (edit); break; @@ -2573,6 +2576,7 @@ case CK_Ctags: case CK_Terminal: case CK_Terminal_App: + case CK_ExtCmd: #endif case CK_Complete: case CK_Cancel: diff -Nur mc-4.6.0-orig/edit/edit.h mc-4.6.0/edit/edit.h --- mc-4.6.0-orig/edit/edit.h Mon Jan 27 17:00:12 2003 +++ mc-4.6.0/edit/edit.h Mon May 26 00:56:59 2003 @@ -221,6 +221,7 @@ void edit_word_wrap (WEdit * edit); unsigned char *edit_get_block (WEdit * edit, long start, long finish, int *l); int edit_sort_cmd (WEdit * edit); +int edit_ext_cmd (WEdit * edit); void edit_help_cmd (WEdit * edit); void edit_left_word_move (WEdit * edit, int s); void edit_right_word_move (WEdit * edit, int s); diff -Nur mc-4.6.0-orig/edit/editcmd.c mc-4.6.0/edit/editcmd.c --- mc-4.6.0-orig/edit/editcmd.c Thu Dec 19 14:01:34 2002 +++ mc-4.6.0/edit/editcmd.c Mon May 26 00:56:26 2003 @@ -2304,6 +2304,32 @@ return 0; } +int edit_ext_cmd (WEdit * edit) +{ + char *exp; + int e; + + exp = ""; + exp = input_dialog(_(" Paste output of external command "), + _(" Enter shell command(s): "),exp); + + if (!exp) return 1; + + e = system (catstrs (exp, " "," > ", home_dir, TEMP_FILE, 0)); + + if (e) { + edit_error_dialog (_(" External "), + get_sys_error (_(" Error trying to execute command "))); + return -1; + } + + edit->force |= REDRAW_COMPLETELY; + + edit_printf(edit,catstrs("sh> ",exp,"\n",0)); + edit_insert_file (edit, catstrs (home_dir, TEMP_FILE, 0)); + return 0; +} + /* if block is 1, a block must be highlighted and the shell command processes it. If block is 0 the shell command is a straight system command, that just produces some output which is to be inserted */ diff -Nur mc-4.6.0-orig/edit/editcmddef.h mc-4.6.0/edit/editcmddef.h --- mc-4.6.0-orig/edit/editcmddef.h Mon Jan 21 18:49:57 2002 +++ mc-4.6.0/edit/editcmddef.h Mon May 26 00:52:52 2003 @@ -92,6 +92,7 @@ #define CK_Match_Bracket 421 #define CK_Terminal 422 #define CK_Terminal_App 423 +#define CK_ExtCmd 424 #define CK_User_Menu 425 /* application control */ diff -Nur mc-4.6.0-orig/edit/editkeys.c mc-4.6.0/edit/editkeys.c --- mc-4.6.0-orig/edit/editkeys.c Wed Dec 25 23:53:07 2002 +++ mc-4.6.0/edit/editkeys.c Mon May 26 00:53:51 2003 @@ -72,6 +72,7 @@ XCTRL ('f'), CK_Save_Block, KEY_F (1), CK_Help, ALT ('t'), CK_Sort, + ALT ('u'), CK_ExtCmd, ALT ('m'), CK_Mail, XCTRL ('z'), CK_Word_Left, XCTRL ('x'), CK_Word_Right, @@ -118,6 +119,7 @@ KEY_F (2), CK_Save, ALT ('p'), CK_Paragraph_Format, ALT ('t'), CK_Sort, + ALT ('u'), CK_ExtCmd, XCTRL ('a'), CK_Home, XCTRL ('e'), CK_End, XCTRL ('b'), CK_Left, diff -Nur mc-4.6.0-orig/edit/editmenu.c mc-4.6.0/edit/editmenu.c --- mc-4.6.0-orig/edit/editmenu.c Tue Jan 28 21:13:20 2003 +++ mc-4.6.0/edit/editmenu.c Mon May 26 01:01:23 2003 @@ -204,7 +204,11 @@ { menu_cmd (CK_Sort); } - +static void +menu_ext_cmd (void) +{ + menu_cmd (CK_ExtCmd); +} static void menu_date_cmd (void) { @@ -373,6 +377,7 @@ {' ', N_("Format p&aragraph M-p"), 'A', menu_format_paragraph}, {' ', N_("'ispell' s&pell check C-p"), 'P', menu_ispell_cmd}, {' ', N_("Sor&t... M-t"), 'T', menu_sort_cmd}, + {' ', N_("Paste o&utput of ... M-u"), 'U', menu_ext_cmd}, {' ', N_("E&xternal Formatter F19"), 'C', menu_c_form_cmd}, {' ', N_("&Mail... "), 'M', menu_mail_cmd} }; @@ -396,6 +401,7 @@ {' ', N_("Format p&aragraph M-p"), 'a', menu_format_paragraph}, {' ', N_("'ispell' s&pell check M-$"), 'P', menu_ispell_cmd}, {' ', N_("Sor&t... M-t"), 'T', menu_sort_cmd}, + {' ', N_("Paste o&utput of ... M-u"), 'U', menu_ext_cmd}, {' ', N_("E&xternal Formatter F19"), 'C', menu_c_form_cmd}, {' ', N_("&Mail... "), 'M', menu_mail_cmd} }; From hg at technosis.de Tue May 27 17:45:59 2003 From: hg at technosis.de (Heiko Gerdau) Date: Tue, 27 May 2003 19:45:59 +0200 Subject: Feature Requests Message-ID: <200305271945.59307.hg@technosis.de> Hi, i recently changed from windows to linux and therefore switched the norton like file commander "fcw" to "mc". I really like the midnight commander, thanks for this outstanding tool. There are a few minor features I miss. Are the following issues on the todo list or do I just don't know how to do it? Please take the following as feature requests. 1) I would like to use a copy (cut) from the buildin editor to paste into other (x-)programs. This seems not to work, at least on my SuSE 8.2 System using console windows. Since I prefer the keyboard, selecting with the arrow keys would be nice to. 2) It would be great to have hot keys to change the sort order of the panels quickly. 3) Allthough I may use "C-a C-k" I would prefer "Esc Esc" to clear the command line (maybe this is because I'm used to it). I'm not subscribed to the list so please cc to my mail address should you respond. Thanks. Greetings Heiko From alpha at student.uci.agh.edu.pl Tue May 27 18:51:17 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Tue, 27 May 2003 20:51:17 +0200 Subject: Feature Requests In-Reply-To: <200305271945.59307.hg@technosis.de> References: <200305271945.59307.hg@technosis.de> Message-ID: <20030527185117.GA3282@mentat.localdomain> On Tue, May 27, 2003 at 07:45:59PM +0200, Heiko Gerdau wrote: > 1) I would like to use a copy (cut) from the buildin editor to paste into > other (x-)programs. This seems not to work, at least on my SuSE 8.2 System > using console windows. Since I prefer the keyboard, selecting with the Hold Shift when selecting text with mouse, then paste it with middle mouse button to other app. This is because normally mc handles mouse on its own, but when Shift is pressed mouse is controlled by X terminal, which is responsible for copy and paste. Regards Adam -- _.|._ |_ _. : Adam Byrtek /alpha alpha at debian.org (_|||_)| |(_| : http://krakow.linux.org.pl/ pgp 0xB25952C0 | From agcosta at gmx.net Wed May 28 23:01:46 2003 From: agcosta at gmx.net (Alfie Costa) Date: Wed, 28 May 2003 19:01:46 -0400 Subject: A fix for the F3 /var/log bug... Message-ID: <3ED53FDA.4060406@gmx.net> An attempted practical fix for a longstanding bug and/or nuisance. Earlier I posted it to a Debian buglist, but the Debian maintainer is presently silent, so... In 'mc', hitting F3 or 'Enter' doesn't work right for files in /var/log. There was a thread about this on 'mc-devel' in June 2001: Viewer config (was: TODO list for the next version) http://mail.gnome.org/archives/mc-devel/2001-June/msg00032.html ...their prognosis was pessimistic. The fix is described (with a patch for '/etc/mc/mc.ext') here: Debian Bug report logs - #179350 mc hangs viewing a .gz file http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=179350 (It's about the fourth message down.) Please CC: replies (if any) to agcosta at gmx.net, as I don't subscribe to 'mc-devel'. ------- version data ---------- Debian 'mc' version: 1:4.6.0-4 >mc --version GNU Midnight Commander 4.6.0 Virtual File System: tarfs, extfs, cpiofs, ftpfs, fish With builtin Editor Using included S-Lang library with terminfo database With subshell support as default With support for background operations With mouse support on xterm and Linux console With internationalization support From proski at gnu.org Thu May 29 04:05:19 2003 From: proski at gnu.org (Pavel Roskin) Date: Thu, 29 May 2003 00:05:19 -0400 (EDT) Subject: MC + Colorer = good :) In-Reply-To: <1403073429.20030520162450@informa.ru> Message-ID: On Tue, 20 May 2003, [Windows-1251] ??????? ???????? wrote: > Hello. Whether there is an opportunity in future to include an > opportunity of support of separate modules? Replacement of yours parser > to colorer (http://colorer.sf.net) especially interests. Chances are certainly better now when it can be distributed under LGPL. The existing syntax highlighting in mcedit is quite limited. Patches are welcome. -- Regards, Pavel Roskin From proski at gnu.org Thu May 29 04:09:10 2003 From: proski at gnu.org (Pavel Roskin) Date: Thu, 29 May 2003 00:09:10 -0400 (EDT) Subject: A fix for the F3 /var/log bug... In-Reply-To: <3ED53FDA.4060406@gmx.net> Message-ID: On Wed, 28 May 2003, Alfie Costa wrote: > The fix is described (with a patch for '/etc/mc/mc.ext') here: > > Debian Bug report logs - #179350 > mc hangs viewing a .gz file > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=179350 I believe double hash used in the patch is non-portable. -- Regards, Pavel Roskin From proski at gnu.org Thu May 29 04:16:25 2003 From: proski at gnu.org (Pavel Roskin) Date: Thu, 29 May 2003 00:16:25 -0400 (EDT) Subject: Feature Requests In-Reply-To: <200305271945.59307.hg@technosis.de> Message-ID: On Tue, 27 May 2003, Heiko Gerdau wrote: > There are a few minor features I miss. Are the following issues on the todo > list or do I just don't know how to do it? Please take the following as > feature requests. The TODO list is available online: http://cvs.gnome.org/lxr/source/mc/src/TODO?raw=1 > 1) I would like to use a copy (cut) from the buildin editor to paste into > other (x-)programs. This seems not to work, at least on my SuSE 8.2 System > using console windows. Since I prefer the keyboard, selecting with the > arrow keys would be nice to. In the TODO list: Support for X clipboard. > 2) It would be great to have hot keys to change the sort order of the > panels quickly. Not in the TODO list. Shouldn't be hard to implement once support for loading keys with modifiers is implemented. I don't want to hardcode more and more sequences into the binary. > 3) Allthough I may use "C-a C-k" I would prefer "Esc Esc" to clear the > command line (maybe this is because I'm used to it). Not in the TODO list. -- Regards, Pavel Roskin From proski at gnu.org Thu May 29 04:21:30 2003 From: proski at gnu.org (Pavel Roskin) Date: Thu, 29 May 2003 00:21:30 -0400 (EDT) Subject: [PATCH] mc-ext revisited In-Reply-To: <20030525231942.GB32607@matrix> Message-ID: On Mon, 26 May 2003, Michal Szwaczko wrote: > Ooops, the previous post was too fast. > Forgot to attach the code ;-) > Sorry. > The patch included. You forgot the ChangeLog entry. Sorry, I'm very busy now and I don't have time to write ChangeLog entries for others. THe format of ChangeLog is described in GNU Coding Standards. -- Regards, Pavel Roskin From proski at gnu.org Thu May 29 04:22:30 2003 From: proski at gnu.org (Pavel Roskin) Date: Thu, 29 May 2003 00:22:30 -0400 (EDT) Subject: small problem In-Reply-To: <3ED09F67.50508@club-internet.fr> Message-ID: On Sun, 25 May 2003, baudouin dussard wrote: > Hello > > With a mandrake 9.0, when i want to start Midnight Commander in a > Konsole, i have this message: > Screen size 0x0 is not supported check the TERM environment variable. > Could you help me ? Thank Please read http://www.ibiblio.org/mc/MAILING_LISTS -- Regards, Pavel Roskin From proski at gnu.org Thu May 29 04:51:35 2003 From: proski at gnu.org (Pavel Roskin) Date: Thu, 29 May 2003 00:51:35 -0400 (EDT) Subject: 4 patches (file4, glib2 locale, ...) In-Reply-To: Message-ID: On Sun, 25 May 2003, Koblinger Egmont wrote: > I send you four small patches, all of them cleanly apply to both 4.6.0 and > the latest snapshot. Please apply them (in case you don't have a good > reason not to do so :-))) The first three patches have been applied. Thank you! The patch to the translation didn't apply cleanly. I only applied the parts that could be applied. > hu.po.patch: fixes some minor bugs in the Hungarian translation. Anyway, > it would be a good idea to change src/boxes.c:460 to contain "iso 8859-*" > instead of "iso 8859-1", since this option works perfectly with other iso > charsets as well. I didn't apply that bit. "iso 8859-1" may be not the best name, but the manual explains what it is. I'm actually considering removing "8-bit" option because it's unsafe on many terminals. Then "iso 8859-1" would be called "8-bit". -- Regards, Pavel Roskin From proski at gnu.org Thu May 29 05:00:06 2003 From: proski at gnu.org (Pavel Roskin) Date: Thu, 29 May 2003 01:00:06 -0400 (EDT) Subject: [PATCH] fstab, mfstab In-Reply-To: <20030516225252.GA2596@ixtys> Message-ID: On Fri, 16 May 2003, Sza'sz Gergely wrote: I've put your script on http://www.ibiblio.org/mc/contrib/fstab-vfs/ Better design of http://www.ibiblio.org/mc/contrib/ will be done if I have time. > P.s.: And what about the extfs.c patch? Don't we need any similar function > in VFS? (Rescan (get a new list/kill from cache) from an external FS > data when it is neccesary?) I'd prefer the scripts return their capabilities and properties. It would be easier to manage than a list of all filesystems. -- Regards, Pavel Roskin From ossi at kde.org Thu May 29 09:31:12 2003 From: ossi at kde.org (Oswald Buddenhagen) Date: Thu, 29 May 2003 11:31:12 +0200 Subject: A fix for the F3 /var/log bug... In-Reply-To: References: <3ED53FDA.4060406@gmx.net> Message-ID: <20030529093112.GA2773@ugly.local> On Thu, May 29, 2003 at 12:09:10AM -0400, Pavel Roskin wrote: > On Wed, 28 May 2003, Alfie Costa wrote: > > > The fix is described (with a patch for '/etc/mc/mc.ext') here: > > > > Debian Bug report logs - #179350 > > mc hangs viewing a .gz file > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=179350 > > I believe double hash used in the patch is non-portable. > yep. it's a bash-ism (or a ksh-ism, fwiw). other than that, i pretty much dislike this directory-based special-casing. i think my suggestion with "file -z" (or equivalent) is much cleaner. greetings -- Hi! I'm a .signature virus! Copy me into your ~/.signature, please! -- Chaos, panic, and disorder - my work here is done. From makovick at kmlinux.fjfi.cvut.cz Thu May 29 09:54:33 2003 From: makovick at kmlinux.fjfi.cvut.cz (Jindrich Makovicka) Date: Thu, 29 May 2003 11:54:33 +0200 Subject: A fix for the F3 /var/log bug... In-Reply-To: <20030529093112.GA2773@ugly.local> References: <3ED53FDA.4060406@gmx.net> <20030529093112.GA2773@ugly.local> Message-ID: <3ED5D8D9.6040101@kmlinux.fjfi.cvut.cz> Oswald Buddenhagen wrote: > On Thu, May 29, 2003 at 12:09:10AM -0400, Pavel Roskin wrote: > >>On Wed, 28 May 2003, Alfie Costa wrote: >> >> >>>The fix is described (with a patch for '/etc/mc/mc.ext') here: >>> >>> Debian Bug report logs - #179350 >>> mc hangs viewing a .gz file >>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=179350 >> >>I believe double hash used in the patch is non-portable. >> > > yep. it's a bash-ism (or a ksh-ism, fwiw). > other than that, i pretty much dislike this directory-based > special-casing. i think my suggestion with "file -z" (or equivalent) is > much cleaner. > > greetings > btw, nroff "hangs" on binary files because it refuses to proceed further until somebody reads its stderr, which mc doesn't do during reading its stdout. i personally prefer to append "2> /dev/null" after actions containing nroff in my mc.ext, after which i see malformed file contents, but at least mc doesn't freeze. -- Jindrich Makovicka From agcosta at gmx.net Thu May 29 18:44:59 2003 From: agcosta at gmx.net (Alfie Costa (backup address)) Date: Thu, 29 May 2003 14:44:59 -0400 Subject: A fix for the F3 /var/log bug... In-Reply-To: References: <3ED53FDA.4060406@gmx.net> Message-ID: <3ED61CEB.27576.85860B@localhost> On 29 May 2003, at 0:09, Pavel Roskin wrote: > I believe double hash used in the patch is non-portable. I only use Linux, so all I know for sure is that double hash works on Debian, (ash, dash, bash, etc.), and judging by the 'ash/dash' man page, '##' (as adopted from the Korn shell), now seems to be POSIX compliant... The current ver- sion of sh is in the process of being changed to conform with the POSIX 1003.2 and 1003.2a specifications for the shell. This version has many features which make it appear similar in some respects to the Korn shell, but it is not a Korn shell clone (see ksh(1)). Only features designated by POSIX, plus a few Berkeley extensions, are being incorporated into this shell. We expect POSIX conformance by the time 4.4 BSD is released. The 'mc' official site shows binaries for a few Linuxes, (these all use the same shells as Debian), AIX, (which a web search shows also knows '##'), SunOS, and HP-UX. I couldn't find out whether the last two knew '##' or not. Could some kind SunOS or HP-UX user please test this code? x=QuousqueTandemAbutere echo ${x##Quousque} TandemAbutere # expected output From agcosta at gmx.net Thu May 29 20:00:56 2003 From: agcosta at gmx.net (Alfie Costa (backup address)) Date: Thu, 29 May 2003 16:00:56 -0400 Subject: A fix for the F3 /var/log bug... Message-ID: <3ED62EB8.26643.CB0F21@localhost> On Thu, 29 May 2003 11:31, Oswald Buddenhagen wrote: > yep. it's [ double hashes ] a bash-ism (or a ksh-ism, fwiw). It came from from Korn, but it's POSIX shell syntax now. > other than that, i pretty much dislike this directory-based special-casing. i > think my suggestion with "file -z" (or equivalent) is much cleaner. I agree directory based conditionals are not ideal, but standard unix directory structures are a poor man's file type, and it's fast and it works. The only trouble is if you move a log file out of '/var/log' 'mc' would think the log file was a man page. Better than nothing though, and no speed hit. A 'file -z' clause wouldn't be locationally challenged, but it'd be slower. Example: file -z /var/log/syslog.1.gz /var/log/syslog.1.gz: regular file, file -z /usr/man/man1/debclean.1.gz /usr/man/man1/debclean.1.gz: ASCII troff or preprocessor input text (gzip compressed data, was "debclean.1", from Unix, max compression) ...then you've got to parse the output of that. Using substitutions like '##' would make that quick, but if substitutions are taboo, then it'd have to be 'grep'. Sample compressed man code: View=%view{ascii,nroff} t=`file -z %f | grep troff` ; if [ -z "$t" ] ; then gzip -dc %f ; else gzip -dc %f | nroff -c -Tlatin1 -mandoc ; fi This assumes 'troff' is a good magic word for man pages. Mostly it is, but how do you parse for this? file -z /usr/man/man1/sync.1.gz /usr/man/man1/sync.1.gz: ASCII English text (gzip compressed data, was "sync.1", from Unix, max compression) Apart from the directory name, there ain't nuthin there! :( Most efficient of all would be a new file type attribute created either when the file is first made, or on some regular basis, (like the locate database). "Never do at run time what you can do at compile time" goes the motto. The new ReiserFS offers many possibilities for this sort of thing. In the meantime, for those who prefer the 'file -z' way, attached is the same patch, changed so it does it the 'file -z | grep' way. -------------- next part -------------- The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any another MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance. ---- File information ----------- File: mc.ext.2nd.patch Date: 27 May 2003, 2:02 Size: 1663 bytes. Type: Unknown -------------- next part -------------- A non-text attachment was scrubbed... Name: mc.ext.2nd.patch Type: application/octet-stream Size: 1663 bytes Desc: not available URL: From ossi at kde.org Thu May 29 21:26:03 2003 From: ossi at kde.org (Oswald Buddenhagen) Date: Thu, 29 May 2003 23:26:03 +0200 Subject: A fix for the F3 /var/log bug... In-Reply-To: <3ED62EB8.26643.CB0F21@localhost> <3ED61CEB.27576.85860B@localhost> References: <3ED62EB8.26643.CB0F21@localhost> <3ED53FDA.4060406@gmx.net> <3ED61CEB.27576.85860B@localhost> Message-ID: <20030529212603.GA11964@ugly.local> On Thu, May 29, 2003 at 02:44:59PM -0400, Alfie Costa (backup address) wrote: > On 29 May 2003, at 0:09, Pavel Roskin wrote: > > I believe double hash used in the patch is non-portable. > > I only use Linux, so all I know for sure is that double hash works on Debian, > (ash, dash, bash, etc.), and judging by the 'ash/dash' man page, '##' (as > adopted from the Korn shell), now seems to be POSIX compliant... > > The current ver- > sion of sh is in the process of being changed to conform with the POSIX > 1003.2 and 1003.2a specifications for the shell. [...] > We expect POSIX conformance by the time 4.4 BSD is released. > according to the unix history graph (http://www.levenez.com/unix/history.html) this sentence must be at least ten years old. ergo i would not bet on the accuracy of the rest of the paragraph or other standards-related claims in this page. > Could some kind SunOS or HP-UX user please test this code? > > x=QuousqueTandemAbutere > echo ${x##Quousque} > /bin/sh on solaris 8: bad substitution bye bye ... On Thu, May 29, 2003 at 04:00:56PM -0400, Alfie Costa (backup address) wrote: > On Thu, 29 May 2003 11:31, Oswald Buddenhagen wrote: > > yep. it's [ double hashes ] a bash-ism (or a ksh-ism, fwiw). > It came from from Korn, but it's POSIX shell syntax now. > the point is, that it does not matter whether it is posix-compliant ... there are simply shells in active use that are non-posix. > > other than that, i pretty much dislike this directory-based > > special-casing. i think my suggestion with "file -z" (or equivalent) > > is much cleaner. > [...] > A 'file -z' clause wouldn't be locationally challenged, but it'd be slower. > we are talking about viewing files here ... a .2 sec delay is not exactly a catastrophe. > In the meantime, for those who prefer the 'file -z' way, attached is > the same patch, changed so it does it the 'file -z | grep' way. > this solution is sort of ... stupid ... :] as mc does not automatically call file -z (or uncompresses the file itself), i created the wrapper /usr/local/bin/file: ---------------------------- #! /bin/sh /usr/bin/file -z "$@" echo "Warning: -z switch implicitly used" ---------------------------- in mc.ext i have these: -------------------------------- [here comes the .me & .ms stuff] # Manual page - compressed type/^(ASCII )?troff.*gzip compressed Open=gzip -dc %f | nroff -Tlatin1 -mandoc | sensible-pager View=%view{ascii,nroff} gzip -dc %f | nroff -Tlatin1 -mandoc type/^(ASCII )?troff.*bzip compressed Open=bzip -dc %f | nroff -Tlatin1 -mandoc | sensible-pager View=%view{ascii,nroff} bzip -dc %f | nroff -Tlatin1 -mandoc type/^(ASCII )?troff.*bzip2 compressed Open=bzip2 -dc %f | nroff -Tlatin1 -mandoc | sensible-pager View=%view{ascii,nroff} bzip2 -dc %f | nroff -Tlatin1 -mandoc # Manual page type/^(ASCII )?troff Open=nroff -Tlatin1 -mandoc %f | sensible-pager View=%view{ascii,nroff} nroff -Tlatin1 -mandoc %f [... and here comes the video and image stuff. at least on my box] -------------- the type/ query prolly does not even cost anything, as the info-page pattern already calls file and i suppose mc caches the result. of course file -z is slower than pure file, but we are talking about uncompressing a few (hundred) bytes ... greetings -- Hi! I'm a .signature virus! Copy me into your ~/.signature, please! -- Chaos, panic, and disorder - my work here is done. From proski at gnu.org Fri May 30 21:14:20 2003 From: proski at gnu.org (Pavel Roskin) Date: Fri, 30 May 2003 17:14:20 -0400 (EDT) Subject: [PATCH] mc-ext revisited In-Reply-To: <20030525231942.GB32607@matrix> References: <20030525231942.GB32607@matrix> Message-ID: On Mon, 26 May 2003, Michal Szwaczko wrote: > Ooops, the previous post was too fast. > Forgot to attach the code ;-) > Sorry. > The patch included. Sorry for my previous e-mail. I tries to process as much e-mail as possible in a very short time, so it might have sounded rude. Unfortunately, my time is still very limited. I can fix patches for everybody, but I think it would be better if I just post my observation to the list as I fix your code. It will save me time for working on the project. The fixes are very simple, but I cannot do it over and over again. This is addressed to other contributors, not just to you. Please separate text from formatting. There should not be any leading or trailing spaces in the translatable text. The standard dialog functions should provide correct spacing. If not, fix those functions. Please avoid technical jargon. Put yourself in the position of somebody who doesn't know English and has no UNIX experience. Please don't use any "sh", "chdir'ing", "mkdir'ing", "cannot cd" etc. Use phrases that you can understand without context. Otherwise, the risk is high that they will be translated incorrectly. In this case, "External" is a bad title. Let's use the same form for error messages. Diversity only adds work for translators. If something fails, use "cannot do this", not "error trying to do this". When adding Emacs hotkeys, please check what hotkey is used in Emacs for the same functionality. Otherwise we'll end up with the mode that nobody uses. Maybe we have reached that stage already - them the Emacs mode should be removed. Please leave at least one newline between different functions. Please write comments for new functions unless they are trivial. I've applied your patch with minor changes. -- Regards, Pavel Roskin