From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juraj Kubelka Newsgroups: gmane.emacs.help Subject: Re: Call lisp function asynchronous Date: Thu, 7 Jun 2007 11:07:37 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1181207310 17682 80.91.229.12 (7 Jun 2007 09:08:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 7 Jun 2007 09:08:30 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Katsumi Yamaoka Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 07 11:08:27 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HwDyk-0006LL-VQ for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Jun 2007 11:08:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HwDyj-00082T-EN for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Jun 2007 05:08:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HwDyJ-00082O-PM for help-gnu-emacs@gnu.org; Thu, 07 Jun 2007 05:07:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HwDyI-00082C-65 for help-gnu-emacs@gnu.org; Thu, 07 Jun 2007 05:07:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HwDyI-000829-0M for help-gnu-emacs@gnu.org; Thu, 07 Jun 2007 05:07:58 -0400 Original-Received: from hades.mk.cvut.cz ([147.32.96.3]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HwDyG-0004rp-FB for help-gnu-emacs@gnu.org; Thu, 07 Jun 2007 05:07:57 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by hades.mk.cvut.cz (Postfix) with ESMTP id 0779E221DE2; Thu, 7 Jun 2007 11:07:45 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mk.cvut.cz Original-Received: from hades.mk.cvut.cz ([127.0.0.1]) by localhost (hades.mk.cvut.cz [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Vtvwz8yb9EVZ; Thu, 7 Jun 2007 11:07:41 +0200 (CEST) Original-Received: from [147.32.96.124] (cesta.mk.cvut.cz [147.32.96.124]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by hades.mk.cvut.cz (Postfix) with ESMTP id 26391221DBC; Thu, 7 Jun 2007 11:07:41 +0200 (CEST) In-Reply-To: X-Mailer: Apple Mail (2.752.3) X-detected-kernel: Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:44738 Archived-At: On 7.6.2007, at 4:02, Katsumi Yamaoka wrote: >>>>>> In >>>>>> 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)) Yes, it is the solution. Thank you a lot. Juraj