From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "scm" Newsgroups: gmane.emacs.help Subject: Interactive string input and comparison Date: 29 Jun 2006 12:58:56 -0700 Organization: http://groups.google.com Message-ID: <1151611136.194537.176220@y41g2000cwy.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1151613646 3279 80.91.229.2 (29 Jun 2006 20:40:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Jun 2006 20:40:46 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 29 22:40:44 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fw3JQ-0006dc-9S for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Jun 2006 22:40:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fw3JP-0003fg-Re for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Jun 2006 16:40:31 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!y41g2000cwy.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 16 Original-NNTP-Posting-Host: 169.244.70.146 Original-X-Trace: posting.google.com 1151611141 14506 127.0.0.1 (29 Jun 2006 19:59:01 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 29 Jun 2006 19:59:01 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060608 Ubuntu/dapper-security Firefox/1.5.0.4,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: y41g2000cwy.googlegroups.com; posting-host=169.244.70.146; posting-account=IygD7g0AAACdbwMyRejj4naJMV9QPwUF Original-Xref: shelby.stanford.edu gnu.emacs.help:140109 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:35735 Archived-At: Greetings, I am trying to write an interactive Elisp program that will take the input of a string, and depending what the string is, run a shell command. I also what to have an error printed if the given shell command does not exist. This is my attempt at the code so far: (defun ls () (interactive) (prompt for input? variable?) (if (string-match "ls" )) (shell-command "ls -l) Thanks in advance to anyone who can take the time to answer this question.