From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: Dumb elisp question Date: Fri, 30 Sep 2011 17:15:36 +0800 Message-ID: <87ty7uz8zr.fsf@ericabrahamsen.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1317374182 7235 80.91.229.12 (30 Sep 2011 09:16:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 30 Sep 2011 09:16:22 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 30 11:16:16 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R9ZCZ-0005ZJ-Dh for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Sep 2011 11:16:15 +0200 Original-Received: from localhost ([::1]:52137 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9ZCY-0001i8-Gw for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Sep 2011 05:16:14 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9ZCT-0001hv-NK for help-gnu-emacs@gnu.org; Fri, 30 Sep 2011 05:16:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9ZCK-0007ts-DM for help-gnu-emacs@gnu.org; Fri, 30 Sep 2011 05:16:09 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:54773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9ZCK-0007tK-6q for help-gnu-emacs@gnu.org; Fri, 30 Sep 2011 05:16:00 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R9ZCJ-0005RG-AV for help-gnu-emacs@gnu.org; Fri, 30 Sep 2011 11:15:59 +0200 Original-Received: from 125.33.18.210 ([125.33.18.210]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 Sep 2011 11:15:59 +0200 Original-Received: from eric by 125.33.18.210 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 Sep 2011 11:15:59 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 31 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 125.33.18.210 User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:WZd7LRA0ONDJYuHRpOujdbKtZ3I= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:82384 Archived-At: I've made a function that takes as arguments an arbitrary format string and a list of arguments to that string. The list of arguments is of varying length, and the args need to be mapped through a function before they're passed to the format string. So in the bowels of the function there's something like: (format fmt-str-var (mapcar (lambda (arg) (do-thing-with arg)) list-of-arguments)) Obviously, the problem is that mapcar returns a single list of strings, not the series of atomic strings that format requires. I've tried to solve this problem many different ways, including turning this into a macro and using ",@", and using ",@" even when it's not a macro, and looking at other mapping functions, and trying to make some sort of "splice" function of my own, and… and… Nothing works quite right. This can't be a macro because elsewhere it needs to pass `commandp'. I can't make any of the other fixes work properly. Can anyone provide an elegant solution? Thanks, Eric -- GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.4) of 2011-04-04 on rothera, modified by Debian