From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
Cc: ding@gnus.org
Subject: Re: Mechaincal question Show filename of # marked
Date: 22 Dec 2000 09:44:39 +0100 [thread overview]
Message-ID: <vaf4rzw6e14.fsf@lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: <m24rzxoxcc.fsf@gnus-5.8.8-cvs.now.playing>
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
next prev parent reply other threads:[~2000-12-22 8:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-21 3:06 Harry Putnam
2000-12-21 10:02 ` Kai Großjohann
2000-12-21 14:28 ` Harry Putnam
2000-12-21 15:42 ` Kai Großjohann
2000-12-21 15:55 ` Harry Putnam
2000-12-22 3:15 ` Colin Walters
2000-12-22 5:10 ` Harry Putnam
2000-12-22 6:05 ` Colin Walters
2000-12-22 8:44 ` Kai Großjohann [this message]
2000-12-22 8:40 ` Kai Großjohann
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=vaf4rzw6e14.fsf@lucy.cs.uni-dortmund.de \
--to=kai.grossjohann@cs.uni-dortmund.de \
--cc=ding@gnus.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).