unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Call lisp function asynchronous
Date: Thu, 07 Jun 2007 11:02:53 +0900	[thread overview]
Message-ID: <b4msl94iks2.fsf@jpl.org> (raw)
In-Reply-To: mailman.1698.1181180879.32220.help-gnu-emacs@gnu.org

>>>>> In <mailman.1698.1181180879.32220.help-gnu-emacs@gnu.org>
>>>>>	Juraj Kubelka wrote:

> Is it possible to call lisp function asynchronous?

It is possible but rather difficult to do it in earnest.  Good
examples are in emacs-w3m (http://emacs-w3m.namazu.org/).

> I would like to use it with this intention: I have defined overlay on
> a region. And after few seconds I would like to delete this overlay.

>          #'(lambda (overlay)
>              (sleep-for 2)
>              (delete-overlay overlay))

> But I do not know how to call it without waiting for response (funcall
> delete-overlay overlay).
> Can you help me?  Or is there better solution for it?

A timer seems to answer such a purpose.  For example:

#'(lambda (overlay)
    (run-at-time 2 nil #'delete-overlay overlay))

       reply	other threads:[~2007-06-07  2:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1698.1181180879.32220.help-gnu-emacs@gnu.org>
2007-06-07  2:02 ` Katsumi Yamaoka [this message]
2007-06-07  9:07   ` Call lisp function asynchronous Juraj Kubelka
2007-06-08  3:27   ` Tim X
2007-06-09  4:14     ` Barry Margolin
2007-06-07  1:47 Juraj Kubelka

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=b4msl94iks2.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=help-gnu-emacs@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.
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).