From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry OReilly Newsgroups: gmane.emacs.help Subject: Re: shell-CLI for Emacs Date: Fri, 23 Aug 2013 18:02:49 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1377295379 18119 80.91.229.3 (23 Aug 2013 22:02:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Aug 2013 22:02:59 +0000 (UTC) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 24 00:03:02 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VCzRd-0006WK-Fe for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Aug 2013 00:03:01 +0200 Original-Received: from localhost ([::1]:38872 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCzRd-0007yE-46 for geh-help-gnu-emacs@m.gmane.org; Fri, 23 Aug 2013 18:03:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCzRT-0007xZ-AQ for help-gnu-emacs@gnu.org; Fri, 23 Aug 2013 18:02:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCzRS-0007La-GL for help-gnu-emacs@gnu.org; Fri, 23 Aug 2013 18:02:51 -0400 Original-Received: from mail-oa0-x22f.google.com ([2607:f8b0:4003:c02::22f]:46414) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCzRS-0007LS-Bi for help-gnu-emacs@gnu.org; Fri, 23 Aug 2013 18:02:50 -0400 Original-Received: by mail-oa0-f47.google.com with SMTP id g12so1431428oah.34 for ; Fri, 23 Aug 2013 15:02:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=bIKr5OkhWoxsfaOcvY6tbWDcFi2aFKR2XMK9p6byr7Y=; b=sGKJ7tL+qcBQARL5fa82aeVrUhyM8MAZ6HFBlPtCF/fauHmPL2etWKmCTqUBXzekfg A7oiWS2VnLuLmaFi6ezW+Vb8qjJc0Gy725C/bMckNnAp7rP7DgNsHKNP8Tiiiti0TBkt QDYlI0ZwXLRrjdS6RTpI+DGGjns+KWrFo9CWigqEoGp1Kcyq0q/6DaBMyy8h/xpVtRgr qE06d7evNGgWf5hbBqL4jcjx1IADaWDrGW8vsXPrdbFINAilbx8p1iKivZ6wbINOmq5n k5BX7YC6eK19mtTKcMoCNCUUKrNEPKX4KRvMr6AtKUx0P77Tph2eG2fqs6g2ClzP92xE 1jZQ== X-Received: by 10.60.115.164 with SMTP id jp4mr1603093oeb.19.1377295369667; Fri, 23 Aug 2013 15:02:49 -0700 (PDT) Original-Received: by 10.76.89.194 with HTTP; Fri, 23 Aug 2013 15:02:49 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c02::22f X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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:93070 Archived-At: > (defun string-to-cmd (str) > (interactive "s $> ") > (let*((cmd-and-args (split-string str " ")) > (cmd (car cmd-and-args)) > (args (cdr cmd-and-args))) > (eval `(,(read cmd) ,@args) ))) Clearer than (eval `(,(read cmd) ,@args) ) is (apply (read cmd) args)