From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: C K Kashyap Newsgroups: gmane.emacs.help Subject: Re: keyboard macro to record scp (password) Date: Tue, 12 Jul 2011 16:20:37 +0530 Message-ID: References: <87mxgkexh5.fsf@gmx.de> <4E1B0E7C.7050700@dogan.se> <8762n8t49a.fsf@micropit.couberia.bzh> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=00151744845cf973bb04a7dd11c5 X-Trace: dough.gmane.org 1310467942 3990 80.91.229.12 (12 Jul 2011 10:52:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 12 Jul 2011 10:52:22 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: =?ISO-8859-1?Q?Peter_M=FCnster?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 12 12:52:18 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QgaZe-0004HH-Ds for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Jul 2011 12:52:18 +0200 Original-Received: from localhost ([::1]:42068 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgaZd-0004m7-Lv for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Jul 2011 06:52:17 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:59215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgaY6-0004lh-Vo for help-gnu-emacs@gnu.org; Tue, 12 Jul 2011 06:50:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgaY4-00015S-Cy for help-gnu-emacs@gnu.org; Tue, 12 Jul 2011 06:50:42 -0400 Original-Received: from mail-fx0-f52.google.com ([209.85.161.52]:34737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgaY3-00015C-GS for help-gnu-emacs@gnu.org; Tue, 12 Jul 2011 06:50:40 -0400 Original-Received: by fxd18 with SMTP id 18so1064595fxd.39 for ; Tue, 12 Jul 2011 03:50:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=YVRPH4A97FE6xuOxqyUcQAGGm3G8+8iwWbJD67v11H8=; b=Ug5QaKKPZ5s5Fsv6SxR2zV+hZZXXhvwESwL/SgubpLDT+5YOdG7EhxK/rqY7+NZX0o VwAxqis2M3HBaMziHqdFZtPumIo+K8kjnP0dN2eA6+GeDKni3B5br/1hV7h4FpzYWwTa 8dmNSvzsddUIdbBR75J5f+5TTYy4JbAV1QfBk= Original-Received: by 10.223.64.80 with SMTP id d16mr2560266fai.86.1310467838014; Tue, 12 Jul 2011 03:50:38 -0700 (PDT) Original-Received: by 10.223.106.195 with HTTP; Tue, 12 Jul 2011 03:50:37 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.52 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81556 Archived-At: --00151744845cf973bb04a7dd11c5 Content-Type: text/plain; charset=ISO-8859-1 > > > Hi Peter, > I tried the (sleep-for 3) idea - there seems to be a problem though - for > some reason, when I playback the macro, the sleep happens first and then the > whole thing gets typed. > > What I did was, record the macro and then edit it and insert the M-: > (sleep-for 3)C-j right after the return key after the ssh command. > > > (defun fun (n) (progn (insert "ssh machinename") (sleep-for 2) (insert "password") ) ) the above function illustrates my point. When I execute this function, the sleep happens first and then the complete inserts. Regards, Kashyap --00151744845cf973bb04a7dd11c5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Hi Peter,
= I tried the (sleep-for 3) idea - there seems to be a problem though - for s= ome reason, when I playback the macro, the sleep happens first and then the= whole thing gets typed.=A0

What I did was, record the macro and then edit it and i= nsert the M-: (sleep-for 3)C-j right after the return key after the ssh com= mand.



(defun fun (n) (progn
(insert "ssh machinename")=A0
(s= leep-for 2)
(in= sert "password")
)
)
=A0
the above function illustrates my point. When I execute = this function, the sleep happens first and then the complete inserts.
=

Regards,
Kashyap
--00151744845cf973bb04a7dd11c5--