all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: kent williams <nkwmailinglists@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: wait/sleep in a keyboard macro?
Date: Mon, 30 Aug 2010 09:44:19 -0500	[thread overview]
Message-ID: <AANLkTikJ-SOh+ehFkDPpTRNzQUfXDuZ59qd9v2sRs-KL@mail.gmail.com> (raw)

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 ?* ?* ?* ?* ?* ?* ?* ?* ?* ?*
?\C-m])

in other words: alt-X 'telnet chat.f4.ca 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	other threads:[~2010-08-30 14:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-30 14:44 kent williams [this message]
2010-09-10  6:10 ` wait/sleep in a keyboard macro? Kevin Rodgers
     [not found] <mailman.0.1283179471.17644.help-gnu-emacs@gnu.org>
2010-08-30 19:06 ` Sean McAfee

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikJ-SOh+ehFkDPpTRNzQUfXDuZ59qd9v2sRs-KL@mail.gmail.com \
    --to=nkwmailinglists@gmail.com \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.