unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: yzhh <yezonghui@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: recording-elisp.el - try recording commands as elisp code
Date: Sat, 03 Nov 2007 12:23:54 +0800	[thread overview]
Message-ID: <fggt4t$kc1$1@ger.gmane.org> (raw)
In-Reply-To: jwv8x5gjq7s.fsf-monnier+emacs@gnu.org

Stefan Monnier wrote:

> I suspect that this kind of problem is going to re-appear in various
> other forms for other commands.  I think the right way to do it is to
> provide "hooks" in record-lisp which isearch can then use to explain
> what it does.  E.g. record-lisp could check the last command's
> `record-lisp-cleanup-function' symbol and if set call it to clean up the
> last few commands.  Isearch could then set this property on
> `isearch-exit'.  Well, to tell you the truth, I have no idea what I'm
> talking about, so the suggestion probably isn't workable as is, but
> hopefully it gives you an idea of how to cleanly interface the
> two packages.

I saw your post later than I took actions. Your suggestion is similar to
what I did:

I've reconstructed the code so that the output procedure uses an alist to
lookup a "special treatment" function for certain commands. The function
takes the original recorded commands and already-have output command list,
and returns a modified output.

I implemented 3 such functions: one for simply ignoring a command, one for
cumulating consecutive self-insert-command, and another for isearch-exit.
More to come.

In this way I think we can put some special treatment of commonly used
commands here. And other not-very-common commands can be taken care of by
the corresponding package developer or the user. I'm I right?

-- 
   regards,
yzhh

  reply	other threads:[~2007-11-03  4:23 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-01 21:27 recording-elisp.el - try recording commands as elisp code yzhh
2007-11-01 23:01 ` Juri Linkov
2007-11-02  5:39   ` yzhh
2007-11-02 20:46     ` Juri Linkov
2007-11-03  3:35       ` yzhh
2007-11-03 10:21         ` Reiner Steib
2007-11-04  5:02           ` yzhh
2007-11-02  2:06 ` Richard Stallman
2007-11-02  5:44   ` yzhh
2007-11-03  3:58     ` Richard Stallman
2007-11-03  7:14       ` yzhh
2007-11-02  6:14 ` yzhh
2007-11-02 20:45   ` Juri Linkov
2007-11-03  3:57     ` yzhh
2007-11-03 20:48       ` Richard Stallman
2007-11-04  8:51         ` yzhh
2007-11-04 16:48           ` Drew Adams
2007-11-05  5:40             ` yzhh
2007-11-06  2:16               ` Richard Stallman
2007-11-06  6:29                 ` yzhh
2007-11-07  0:15                   ` Richard Stallman
2007-11-06 16:33                 ` Mathias Dahl
2007-11-06 22:28                   ` Juri Linkov
2007-11-07  7:55                   ` Richard Stallman
2007-11-05  6:20           ` Richard Stallman
2007-11-05 14:27             ` yzhh
2007-11-05 14:43               ` Stefan Monnier
2007-11-05 15:03                 ` yzhh
2007-11-06  2:16                 ` Richard Stallman
2007-11-06  8:28                   ` Stefan Monnier
2007-11-05  6:20           ` Richard Stallman
2007-11-06  0:45           ` Juri Linkov
2007-11-06  6:12             ` yzhh
2007-11-07  0:15               ` Richard Stallman
2007-11-06  8:37             ` Richard Stallman
2007-11-06 22:28               ` Juri Linkov
2007-11-07  7:56                 ` Richard Stallman
2007-11-02 21:28   ` Stefan Monnier
2007-11-03  4:23     ` yzhh [this message]
2007-11-03  3:58   ` Richard Stallman
2007-11-03  7:12     ` yzhh

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='fggt4t$kc1$1@ger.gmane.org' \
    --to=yezonghui@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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).