[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

wait/sleep in a keyboard macro?

From: kent williams
Subject: wait/sleep in a keyboard macro?
Date: Mon, 30 Aug 2010 09:44:19 -0500

Prior to emacs 23, I had a simple keyboard macro I used to log in to a
chat server via telnet.  Yes, the password was plain text in the macro
body in my .emacs, but this was not a high-security thing.

But this dumb macro stopped working in emacs 23.  The reason being --
well the behavior differs now based on whether the buffer for the
telnet session already exists, but most commonly, I get an error
message "Marker does not point anywhere".

The macro itself is this:

(fset 'hardcorps
   [?\M-x ?t ?e ?l ?n ?e ?t ?\C-m ?c ?h ?a ?t ?. ?f ?4 ?. ?c ?a ?  ?6
?6 ?2 ?3 ?\C-m ?* ?* ?* ?* ?\C-m ?* ?* ?* ?* ?* ?* ?* ?* ?* ?*

in other words: alt-X 'telnet 6623' <return> '<login name>'
<return> '<password>' return

It appears (to me) that what happens is that the macro runs too fast,
such that when it tries to add the login name to the buffer, the
buffer isn't yet connected to the server, or it isn't ready for input.
Or something!

I suppose it's possible to do this in a more sophisticated way in
lisp, but this hasn't risen to the level of importance for me that I'm
ready to puzzle out how to wait for prompts from a remote host before
adding text to the buffer.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]