unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "yzhh" <yezonghui@gmail.com>, <emacs-devel@gnu.org>
Subject: RE: Is there a plan to record kbd macro as elisp code?
Date: Sat, 27 Oct 2007 11:01:03 -0700	[thread overview]
Message-ID: <BNELLINCGFJLDJIKDGACMECGCEAA.drew.adams@oracle.com> (raw)
In-Reply-To: <loom.20071027T171342-20@post.gmane.org>

> > 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	other threads:[~2007-10-27 18:01 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-27  9:28 Is there a plan to record kbd macro as elisp code? yzhh
2007-10-27 15:48 ` Robert J. Chassell
2007-10-27 17:30   ` yzhh
2007-10-27 18:01     ` Drew Adams [this message]
2007-10-28 13:50       ` Richard Stallman
2007-10-27 20:04     ` Stefan Monnier
2007-10-27 21:22       ` Kim F. Storm
2007-10-28 13:50         ` Richard Stallman
2007-10-28 22:00           ` Kim F. Storm
2007-10-29  5:20             ` yzhh
2007-10-29  9:22             ` Richard Stallman
2007-10-29  9:22             ` Richard Stallman
2007-10-27 21:45       ` Juri Linkov
2007-10-28  1:14         ` Stefan Monnier
2007-10-28  1:34           ` Juri Linkov
2007-10-29  0:11             ` Richard Stallman
2007-10-28  6:49         ` yzhh
2007-10-28  7:13           ` yzhh
2007-10-28 10:54           ` Juri Linkov
2007-10-28 13:50         ` Richard Stallman
2007-10-28 15:09           ` Juri Linkov
2007-10-29  9:21             ` Richard Stallman
2007-10-28 16:13           ` yzhh
2007-10-28 16:48             ` Juri Linkov
2007-10-29  9:21             ` Richard Stallman
2007-10-30 14:14               ` Juri Linkov
2007-10-31  7:46                 ` Richard Stallman
2007-10-27 19:26   ` Jay Belanger
2007-10-27 16:20 ` Drew Adams
2007-10-27 17:13   ` yzhh
2007-10-27 17:40     ` Drew Adams
2007-10-27 18:05       ` yzhh
2007-10-27 19:22       ` Robert J. Chassell
2007-10-27 20:11         ` Drew Adams
2007-10-28 13:50   ` Richard Stallman
2007-10-28 16:45     ` Juri Linkov
2007-10-29  6:41 ` Klaus Zeitler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BNELLINCGFJLDJIKDGACMECGCEAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=yezonghui@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).