Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Apr 2012 21:59:46 +0300
From:      "Andrew W. Nosenko" <andrew.w.nosenko@gmail.com>
To:        freethread <freethread.sw@gmail.com>
Cc:        ports@freebsd.org, fjoe@freebsd.org
Subject:   Re: FreeBSD Port: mc-4.8.1.1
Message-ID:  <CALa-7vzSVpkzojuTgeEsaKhnsnCp5bKpM9AEwncxscdJwf3%2Bpw@mail.gmail.com>
In-Reply-To: <03AAF100C4104D97B51E4EDC6AAE29D3@freethread.lan>
References:  <03AAF100C4104D97B51E4EDC6AAE29D3@freethread.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Apr 19, 2012 at 20:05, freethread <freethread.sw@gmail.com> wrote:
> hi, I'm facing an issue with last mc version. After upgrading ports (from=
 source with portmaster) the syntax highlight in mcedit no more works, well=
, it works, but...
>
> Explanation
>
> I made some customization in mc for fileext, syntax highlight and menus, =
some of them are documentend, some others are partially documented and some=
 others are undocumented. The syntax highlight customization is partially d=
ocumented, however that's what I've done on my system:
>
> The syntax highlight are composed by files with .syntax extention and a m=
ain 'Syntax' file that recognize file type (extentions + content) and redir=
ect to the right .syntax file.
> =A01.. I created a new directory where I copied that files (located in /u=
sr/local/share/mc/syntax) in that new directory.
> =A02.. In each home directory there is an '.mc' directory where mc place =
per user configuration files, so I found that copying the above files in $H=
OME/.mc/cedit directory you can customize the syntax highlight recognition =
and coloration, so what I've done (for each user) is to create symlinks to =
that files in 'cedit' directory, pointing at files copied in step 1. So, ea=
ch user has the same customized syntax highlight.
> Now, it worked for years, but when updated mc to version 4.8.1.1, it show=
 me a syntax error in Syntax file at line 41, that contain the following cu=
stomization:
> 40 =A0file .\*(csh|\\.(csh|cshrc|tcsh|tcshrc|login|logout))$ tcsh/csh\sSc=
ript ^#!\s\*/(.\*/|usr/bin/env\s)(tc|c)sh41 =A0include csh.syntaxOk, I rest=
ored the original 'Syntax' file to replace the customized one, but it seems=
 it has no effect, it display the same error and in the editor menu 'Option=
s -> Syntax Highlight...' it still display my customized additions (in the =
previous example 'tcsh/csh Script'), and it uses its own .syntax files in /=
usr/local/share/mc/syntax for all file types.
>
> I don't know if mc has a cache and where it is, in /tmp there is nothing =
to help. This is not a FreeBSD issue instead something changed in mc syntax=
 highlight policy, anyhow, perhaps you know or heard about some changes, I =
use mcedit for small shell files, small perl and python scripts on FreeBSD =
server but the most of the time I works on Windows desktops (and access it =
with remote terminals), so I can revert mc to works as default and edit the=
m in Windows.

The latest mc from ports changed the paths to be more XDG complaint.
Config files live now in ~/.config/mc/ (and, as consequence,
~/.config/mc/mcedit/ if you need mcedit-related ones).  State-related
files live in ~/.local/mc/ now.

At the 1st run after update, the mc copies the "old" configs into
"new" locations, which explains why your changes to the files inside
~/.mc/ had no effect and why you had a feeling like something cached
somewhere.

Also, at the 1st run (just after copying), mc shows message about new
paths and what happened, and exits.  But you can easy to miss it if
your terminal emulator closes the window automatically after mc exit.

>
> FYI: I made many other customizations to mc but I don't know if they inte=
rfere with this issue, all of them have more than 2 years and always worked=
 and they are the same from at least 1 year, anyway my system was installed=
 from 'disk 1' in september 2010, fresh FreeBSD 9.0-BETA1 installation (it =
was an 8.2-RELEASE but I made a fresh install to test bsdinstall and have S=
U+J on UFS), upgraded to 9.0-RELEASE in january or frebuary with freebsd-up=
date (binary), all ports are uptodate.
> =A0FreeBSD alpha.xxxxxxx.xxx 9.0-RELEASE FreeBSD 9.0-RELEASE #1: Fri Jan =
20 07:29:38 CET 2012
> =A0root@alpha.xxxxxxx.xxx:/usr/obj/usr/src/sys/ALPHA =A0i386
> Thanks in advance for your advices (if you have any)
> paul

--=20
Andrew W. Nosenko <andrew.w.nosenko@gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALa-7vzSVpkzojuTgeEsaKhnsnCp5bKpM9AEwncxscdJwf3%2Bpw>