bug-zile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-zile] Alpha release: any blockers?


From: Gary V. Vaughan
Subject: Re: [Bug-zile] Alpha release: any blockers?
Date: Thu, 18 Aug 2011 21:10:49 +0700

Hi Reuben,

On 17 Aug 2011, at 21:32, Reuben Thomas wrote:
> On 17 August 2011 03:02, Gary V. Vaughan <address@hidden> wrote:
>> * You might consider porting the simplification to keycode mapping from
>>  the Lua branch:
>> 
>>    
>> http://git.savannah.gnu.org/cgit/zile.git/commit/?h=lua&id=12f17f1b0a3ce30e2a803113fa6fd7f430ea7b1b
>> 
>>  Although, I've reintroduced the bug with quoted-insert, which I'm
>>  currently fixing, so if you want to put that in the alpha, please
>>  check for a followup that lets tests/interactive-quoted-insert.el
>>  work again :)
> 
> In that case I'll happily wait until the bug is fixed. Further, what
> would the equivalent simplification be in C, given that we don't have
> a C equivalent of table.invert?

I hadn't actually looked at the code when I suggested porting, however
we could certainly tighten things up with a table of mappings, and a
pair of macros to unpack them into the switch branches:

#define codetokey_map \
MAP('\0', CTRL('@')) \
...
codetokey (int c)
{
  switch (c)
    {
#define MAP(_code, _key) \
      case _code: return _key;
        codetokey_map
      default:
         if (c > 0xff || c < 0)
...
keytocodes (size_t key, int **codevec)
{
...
  switch (key)
    {
      case CTRL('h'):
        *p++ = 8;
        break;
      case CTRL('z'):
        *p++ = 26;
        break;
#define MAP(_code, _key) \
      case _key: *p++ = _code; break;
        codetokey_map
      default:
        if ((key && 0xff) == key)
...

That would certainly make the 2 way 1:1 mapping much clearer, and
eliminate the possibility of the two separate switch statements getting
out of synch.


>> * The FAQ entry on C-h/F1-F4 could do with updating again in light of
>>  our long discussion about Terminal.app, which I'll do presently...
>>  while I like your simplification, rebuilding against a newer curses
>>  is both difficult
> 
> Au contraire:
> 
> $ wget <URL>
> $ tar <TARBALL>
> $ cd <DIRECTORY>
> $ ./configure && sudo make install
> $ cd <ZILE-DIRECTORY>
> $ ./configure && make # assuming we have sane paths; on Mac OS X,
> where by default /usr comes before /usr/local, we need to prefix
> CFLAGS=-I/usr/local/include CPPFLAGS=-L/usr/local/lib, though again
> one is better off fixing the defaults for the sake of other builds

Well, that's only of you're not obsessed with keeping everything
properly segregated, and stopping tools from picking up the wrong
libraries at link-time in future.

It took me a good 4 hours to get the Brew Formulae for installing
a curses59 in a corner where it won't be picked up accidentally, or
interfere with the system version, and then to link Zile against it.

The only way I'd install something by hand from tarballs is into
my home-directory or a special /opt or something where it won't
mess up my brew packages - besides under normal circumstances it's
usually just as easy to write a Brew Formula as it is to actually
configure and install a package from your home directory.

>> and unnecessary for the terminfo problems on
>>  Mac OS X, so I think that is worth mentioning.
> 
> I see you've updated the FAQ.

I made a stab at it... as long as you like it too, then we're good :)

>> * It would be nice to agree on and implement a splash-screen format
>>  on the active branches too, per the famous (/me takes great care to
>>  paste the correct URL):
>> 
>>    https://lists.gnu.org/archive/html/bug-zile/2011-08/msg00037.html
> 
> Congrats on getting the right URL :)

That's 2 for 4, my average is improving all the time :-p


> Here's a step-by-step critique:
> 
> ==========================================================================
> Welcome to GNU Zile.
> 
> Get Help        C-h (Hold down CTRL and press h)
> 
> For this, I would want to implement something like Emacs's extra
> prompts. I don't think I can be bothered. Zile is designed for people
> who already know Emacs, hence my stripping out of a lot of help and
> tutorials over the years; Zile users won't need them and they're a
> maintenance burden.

Good point.  Agreed.

> View Zile FAQ   C-c h
> 
> We don't have this command. (At least, not on the C branch.)

At the time I was proposing putting it back in.  I'm still not against
that, but not keen enough to implement it myself either...

> Visit new file  C-x C-f
> 
> Emacs's splash screen doesn't have this command, as of 24.0.50.1.

Why ever not?  It seems like an obvious thing to have, especially for
Zile with no help prompting.  I think it's a shame not to put that
in.

> GNU Zile comes with ABSOLUTELY NO WARRANTY.
> Zile is Free Software--Free as in Freedom--so you can redistribute copies
> of Zile and modify it; see the file COPYING. Otherwise, a copy can be
> downloaded from http://www.gnu.org/licenses/gpl.html.
> 
> I've added this, thanks.

Cool.  Thanks, I'll port it to the other branches presently.

Cheers,
-- 
Gary V. Vaughan (gary AT gnu DOT org)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]