Re: [dev] [announce] mle: a small terminal-based text editor

From: S. Gilles <>
Date: Mon, 10 Apr 2017 09:57:47 -0400

On 2017-04-10T11:54:29+0000, Cág wrote:
> S. Gilles wrote:
> > I wrote a patch[0] for mg which sort of adds Unicode support a while
> > back via wchar_t. Upstream interest was low, as they were just about
> > to release 6.0 and I got the impression they'd rather write it
> > themselves, but as far as I can tell it works. At the very least,
> > it could be used as a guide towards which parts of mg need to be
> > ripped out and rewritten.
> Do you have a .diff file? I keep Alpine ports locally, so I could've
> added it without copying the whole tree.
> Does mg in 6.0 support Unicode? For some reason our version is
> 20140414 and I can't compile 20170401:
> -------
> fileio.c:104:17: error: 'DEFFILEMODE' undeclared (first use in this function)
> fileio.c: In function 'copy':
> fileio.c:384:17: error: 'DEFFILEMODE' undeclared (first use in this function)
> fileio.c: In function 'make_file_list':
> fileio.c:504:25: error: 'MAXNAMLEN' undeclared (first use in this function)
> -------
> with warnings before.

I've attached the patch I'm using against hboetes' portable branch
(rebased just now). I also run a few musl machines, and for them
I have a patches for the issue you describe. The patches aren't
anything clever (I just give definitions for MAXNAMELEN and
DEFFILEMODE), but it works as of 2017-04-10.

 - It should just work by default.

 - If you want to restore old octal
   expansion behavior, run `M-x show-raw-mode'.

 - If you want to insert a character by unicode codepoint, run `M-x
   insert-char' (I have `global-set-key "\^x\^i" insert-char' in
   my .mg).

 - Motion is on a byte-by-byte level, which for some reason
   I thought was a good idea (so you can wade into the middle of a
   wide character and insert bytes in the middle). (I predict you'll
   get fed up with this and change it.)

 - If you have a silly machine where wchar_t doesn't hold unicode
   codepoints, the results will be silly.

S. Gilles

Received on Mon Apr 10 2017 - 15:57:47 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 10 2017 - 16:00:14 CEST