From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christian Wittern Newsgroups: gmane.emacs.help Subject: problem with mapconcat Date: Wed, 3 Mar 2010 12:49:17 +0000 (UTC) Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1267623423 26447 80.91.229.12 (3 Mar 2010 13:37:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 3 Mar 2010 13:37:03 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 03 14:36:59 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nmoky-0002hL-Pv for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Mar 2010 14:36:57 +0100 Original-Received: from localhost ([127.0.0.1]:60402 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nmoky-0003vH-99 for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Mar 2010 08:36:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NmojD-00037h-Po for help-gnu-emacs@gnu.org; Wed, 03 Mar 2010 08:35:07 -0500 Original-Received: from [140.186.70.92] (port=46934 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NmojC-000374-QB for help-gnu-emacs@gnu.org; Wed, 03 Mar 2010 08:35:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NmojC-0005Ep-1x for help-gnu-emacs@gnu.org; Wed, 03 Mar 2010 08:35:06 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:44081) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NmojB-0005Eg-RP for help-gnu-emacs@gnu.org; Wed, 03 Mar 2010 08:35:05 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Nmoj9-0001bV-1X for help-gnu-emacs@gnu.org; Wed, 03 Mar 2010 14:35:03 +0100 Original-Received: from 58-190-15-193.eonet.ne.jp ([58.190.15.193]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Mar 2010 14:35:03 +0100 Original-Received: from cwittern by 58-190-15-193.eonet.ne.jp with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Mar 2010 14:35:03 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 58.190.15.193 (Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.18) Gecko/2010020219 Firefox/3.0.18 GTB6) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:72334 Archived-At: Hi there, I am trying to build a regex with lisp, which inserts a certain string into another string between each character, for example "abc" should turn into "a/b/c". With mapconcat, I think this should work: (mapconcat 'identity (string-to-list "abc") "/") since the description for mapconcat says (mapconcat FUNCTION SEQUENCE SEPARATOR) However, when I try to evaluate this in Emacs 23.1, here it throws the following error: Debugger entered--Lisp error: (wrong-type-argument sequencep 97) mapconcat(identity (97 98 99) "/") eval((mapconcat (quote identity) (string-to-list "abc") "/")) I wonder what I am doing wrong or if there is another way to achieve what I am trying to do. Any help appreciated, Christian