nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] implementing macro recording and playback


From: Marco Diego Aurélio Mesquita
Subject: Re: [Nano-devel] implementing macro recording and playback
Date: Sun, 8 Oct 2017 21:44:43 -0300

On Sun, Oct 8, 2017 at 4:59 PM, Benno Schulenberg <address@hidden> wrote:
>
> Op  8-10-2017 om 16:16 schreef Marco Diego Aurélio Mesquita:
>>
>> Please take a look at the attached patch.
>>
>> It implements your approach, but there are some problems when running
>> the macro sequentially. Don't know what causes it.
>
>
> What problems?  What macro have you tested it with?  What do you mean
> with "sequentially"?  Many times in a row?  Holding down the runmacro
> key?
>

I run nano, hit M-: a M-:, then I press and hold M-". Instead of a row
of a', I get a row of a"'s. There is one more problem: after doing
just what I described, move the cursor to the middle of the row,hit
M-: <Del> <Del> a a M-:, then when I run the macro, chars are removed
but I only see added chars after I move the cursor

> For the small test that I did, it worked fine.  The only problem is
> that it beeps every time that I type the runmacro key.
>
>> What else should be done to get this feature in?
>
>
> Rename the bindable functions to 'recordmacro' and 'runmacro' instead
> of just 'macro' and 'play'.  Bind the functions record_macro() and
> run_macro() to M-: and M-" by default.  Move those macro functions
> to src/winio.c, because they are keyboard stuff.  Use normal /* */
> style comments, and don't put comments in the wrong place ("//Do
> nothing if macro is playing!").  Don't use ALERT for starting and
> stopping the recording.  Use recording = !recording for toggling
> the state.  Remove the changes from nano.h and rcfile.c -- they are
> not options.  Put your additions to proto.h in the proper place --
> don't just dump them somewhere.  And fix the add_to_funcs() calls,
> so things look good and correct in the ^G help text.
>

The attached patch should address these points. Can you point me how
to fix the issues described?

Attachment: macro.diff
Description: Text document


reply via email to

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