[Top][All Lists]

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

About the nano rewrite (Was: Re: [Nano-devel] deleting whole words)

From: David Lawrence Ramsey
Subject: About the nano rewrite (Was: Re: [Nano-devel] deleting whole words)
Date: Sun, 29 Jan 2006 17:11:20 -0500
User-agent: Thunderbird 1.5 (X11/20051201)

David Benbennick wrote:
> On 1/29/06, David Lawrence Ramsey <address@hidden> wrote:
>> or at least not until Undo and Redo are implemented.
> David, have you looked at the rewritten version of Nano I mentioned on
> December 11? > It
> has undo/redo.

I was just about to email you about that, actually :) It seems to work
well in terms of basic operations, but the keys you identify as the
Undo/Redo keys don't seem to do anything, and I'm not sure how to hack
it so that they work, because the file appears to be a stub. (If I remember correctly, anyway; it was awhile ago. I accidentally
deleted the Boost library from my system, and SourceForge is down for
maintenance at the moment, so I can't download it again yet to give you
more details.)

About your nano rewrite in general: it's definitely good that you're
using a more efficient way of handling file data, especially because the
current way has major limitations (try using constant cursor position
mode and moving down in a file with a huge number of lines).  It has the
potential to be the future direction nano (1.5+) goes in, but I just
have a few questions and/or reservations about it before I can say that

1. Why the switch to C++, and how far down the road to C++ is it going
to go, so to speak?  In other words, is it going to be "C-like" C++, or
"full" C++?  I ask because one of my pet peeves with the latter kind of
C++ is how it can become so horribly complex that it's difficult to
maintain, and I really don't want nano to turn into that.  (For example,
putting one triangular bracket in the wrong place when dealing with
templates can make g++ spit out a ton of error messages, none of which
are near the original problem.)  Not to mention, the fact that g++ is
far more unstable than gcc in terms of its support for the C++ standard,
which means that compiler incompatibilities may become a real problem as

2. Some of the code appears to be derived from an older version of nano. I know that this is a rewrite, but is there going to be any effort to
merge some of the still-useful changes in what will be the 1.4 branch
once it comes out, such as the optimized display routines (which are
very noticeable when running nano 1.3.x over a slow remote connection,
as opposed to nano 1.2.x) and the various improvements merged from your
behemoth patch from 2003?  (If so, I can certainly help with it.)

> It also is close to having rebindable keys.  A benefit of rebindable
> keys is that you can add a new feature even if you can't find a
> default key for it.


> Once a feature like delete-word is implemented, anyone can bind it to
> any key they want in their .nanorc file. (Actually, I think
> Ctrl-delete would be a good default.  That's what Firefox uses.)

The problem is what to do when the keypad support for a given terminal
is broken.  If keypad support is working, you can just check for Escape
KEY_DC or Escape Ctrl-8 (depending on whether the -d option is used),
but if it isn't, there are all sorts of potential timing problems.  How
do you easily tell the difference between Escape (Escape [ 3 ^) for
Ctrl-Delete under rxvt-unicode, and (Escape Escape [) (3 ^) for Ctrl-[ 3
^ under rxvt-unicode?  And how do you deal with those terminals that
don't differentiate between Delete and Ctrl-Delete, such as the Linux
console?  If there were an X11-based frontend for nano, it would have no
trouble dealing with it, since X11 uses a different method for reading
keystrokes, but that's an entirely different matter.

reply via email to

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