emacs-devel
[Top][All Lists]
Advanced

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

RE: Is there a plan to record kbd macro as elisp code?


From: Drew Adams
Subject: RE: Is there a plan to record kbd macro as elisp code?
Date: Sat, 27 Oct 2007 11:01:03 -0700

> > Even the little bit you have done could be helpful.
> >
> > Please write up what you have as an Emacs Lisp library that can be
> > loaded by `emacs -q', with a name such as
> > yzhh-define-elisp-interactively.el, and submit it.
> >
>
> Thank you for your appreciation. But my modification is in the C code of
> emacs, because 'execute-command' and 'call-interactively' are in C code.
> And I don't think my dirty code would be a valid patch for the emacs
> developers.
>
> As far as I can see, recording everything including isearch, query-replace
> and alike in a general way would need modification in C code. And that
> modification very probably require quite some re-design of emacs internal
> control structure (the command loop and kbd macro implementation). All
> these are out of my reach for the moment.

Are you sure what you want is worth messing with the C code? If so, why
couldn't it be a valid C patch to Emacs? Other people here (not I) can
perhaps help you with the coding style (e.g. vs "dirty").

Why is it important to handle the cases you mentioned: isearch and
horizontal movement? I can see that it would be good to handle them better,
but if that means code that no one else can take advantage of, then the
benefit is limited. Maybe you could, as Robert suggested, at least post the
Lisp code part, unless it absolutely depends on the "dirty" C code part.

Wrt isearch, I think you said that the problem was that the code generated
multiple little searches (with missing search strings) instead of a single
big search (or something like that). Couldn't the tiny searches be combined
into an overall search, by hand (given knowledge of the search string)?

I don't mean to discourage you; I'm just looking for a way for you to make
your work into a useful contribution. Perhaps aim for something less than
100% complete, something that helps a user define a command based on a
keyboard macro, but doesn't do that completely automatically.





reply via email to

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