unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* (progn (top-level) A B C)
@ 2007-02-14 15:38 A Soare
  2007-02-14 16:38 ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 5+ messages in thread
From: A Soare @ 2007-02-14 15:38 UTC (permalink / raw)
  To: Emacs   Help  [help-gnu-emacs]

Hello,

Can somebody tell me how you write a code to execute the followiung commands in the order t-l A B C:

(top-level)
(A ...)
(B ...)
(C ...) ?


Thanks.

Alin Soare

^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <mailman.4495.1171467492.2155.help-gnu-emacs@gnu.org>]
* Re: (progn (top-level) A B C)
@ 2007-02-14 17:37 A Soare
  2007-02-14 17:48 ` Andreas Schwab
  0 siblings, 1 reply; 5+ messages in thread
From: A Soare @ 2007-02-14 17:37 UTC (permalink / raw)
  To: Lennart Borgman (gmail)
  Cc: Emacs   Help  [help-gnu-emacs], Emacs   Bug  [bug-gnu-emacs]


> I do not think you can do it directly, but maybe you can use a timer?
> 
> (run-with-idle-timer 0 nil (lambda()

Thanks, I will check. Another method that I found is

(unwind-protect
    (prog1
        (message "x")
      (top-level))
  (message "a")
  (message "b"))


By the way, this code returns "Back to top level." . BAD.

x
a
b
Back to top level.

What is the definition of prog1? It should return the first argument. It seems that in this case the 1st argument is lost.

This is a BUG in prog1... I think that prog2, progn give the same bug... That is?


Does somebody else knows another methods? Let us make all of you that know a list of methods here for this problem, please...


Trying to solve a bug in the E debugger I asked myself this problem...

Alin Soare.



> Message du 14/02/07 à 17h38
> De : "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> A : alinsoar@voila.fr
> Copie à : "Emacs Help [help-gnu-emacs]" <help-gnu-emacs@gnu.org>
> Objet : Re: (progn (top-level) A B C)
> 
> A Soare wrote:
> > Hello,
> > 
> > Can somebody tell me how you write a code to execute the followiung commands in the order t-l A B C:
> > 
> > (top-level)
> > (A ...)
> > (B ...)
> > (C ...) ?
> 
> 
> I do not think you can do it directly, but maybe you can use a timer?
> 
> (run-with-idle-timer 0 nil (lambda()
>                               (message "a")(sit-for 1)
>                               (message "b")(sit-for 1)
>                               (message "c")(sit-for 1)
>                               ))
> (top-level)
> 
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-02-14 17:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-14 15:38 (progn (top-level) A B C) A Soare
2007-02-14 16:38 ` Lennart Borgman (gmail)
     [not found] <mailman.4495.1171467492.2155.help-gnu-emacs@gnu.org>
2007-02-14 16:22 ` Pascal Bourguignon
  -- strict thread matches above, loose matches on Subject: below --
2007-02-14 17:37 A Soare
2007-02-14 17:48 ` Andreas Schwab

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).