From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/33850 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: Mechaincal question Show filename of # marked Date: 22 Dec 2000 09:44:39 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: References: <874rzxtadi.church.of.emacs@meta.verbum.org> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035169879 27276 80.91.224.250 (21 Oct 2002 03:11:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:11:19 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by mailhost.sclp.com (Postfix) with ESMTP id 6B97FD049D for ; Fri, 22 Dec 2000 03:45:34 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id CAB29887; Fri, 22 Dec 2000 02:45:08 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 22 Dec 2000 02:44:34 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@66-209.196.61.interliant.com [209.196.61.66] (may be forged)) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id CAA19268 for ; Fri, 22 Dec 2000 02:44:23 -0600 (CST) Original-Received: from waldorf.cs.uni-dortmund.de (waldorf.cs.uni-dortmund.de [129.217.4.42]) by mailhost.sclp.com (Postfix) with ESMTP id CB3A0D049D for ; Fri, 22 Dec 2000 03:44:47 -0500 (EST) Original-Received: from marcy.cs.uni-dortmund.de (marcy.cs.uni-dortmund.de [129.217.20.159]) by waldorf.cs.uni-dortmund.de with ESMTP id JAA07093; Fri, 22 Dec 2000 09:44:39 +0100 (MET) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.20.160]) by marcy.cs.uni-dortmund.de id JAA29939; Fri, 22 Dec 2000 09:44:39 +0100 (MET) Original-Received: (from grossjoh@localhost) by lucy.cs.uni-dortmund.de (8.9.3/8.9.3/Debian 8.9.3-21) id JAA00614; Fri, 22 Dec 2000 09:44:39 +0100 Original-To: Harry Putnam X-Face: /B3twq_DELA4]7alR?%xv(/f1N;bi:NN=UlA=(1a"pKte&5/Y/9*z&8q[P}+}YgJX_9*}k_ 0E|EJBC~yEok<#VOw:9GQWq1-;PCR-hd;3|Vk]~"|EM{Q5ir5nr!HzZ,W4\k5G|QWHw45gQ*tWydTR , Original-Lines: 26 User-Agent: Gnus/5.090001 (Oort Gnus v0.01) Emacs/21.0.95 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:33850 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:33850 On 21 Dec 2000, Harry Putnam wrote: > (mapcar (lambda (x) (shell-command-to-string (concat "cat " x))) > "/home/reader/Mail/tmp/awk-work/13") > > C-x C-e > > ("cat: 47: No such file or directory > " "cat: 104: No such file or directory > " "cat: 111: No such file or directory I'm sure you're wondering what happened here. Well, mapcar can iterate (go) over a list as well as any other sequence. And a string is just a sequence of characters. So what the mapcar was doing was applying the lambda to the character "/", then "h", then "o", and so on. And in Emacs Lisp, the character "/" is the same as its ascii code. And what's the ascii code of "/"? -- Right, 47. So this was executing "cat 47", then "cat 104", ... Colin has told you how to correct the problem, I just thought you might like to know what's happening. kai -- ~/.signature