From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Chunyang Xu Newsgroups: gmane.emacs.help Subject: Can el-search-query-replace replace mapcar with --map ? Date: Fri, 22 Dec 2017 19:45:07 +0800 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1513943036 8512 195.159.176.226 (22 Dec 2017 11:43:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 22 Dec 2017 11:43:56 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 27.0.50 Cc: michael_heerdegen@web.de To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 22 12:43:52 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eSLjx-0001k2-9J for geh-help-gnu-emacs@m.gmane.org; Fri, 22 Dec 2017 12:43:49 +0100 Original-Received: from localhost ([::1]:46447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSLlv-0000Ik-Pg for geh-help-gnu-emacs@m.gmane.org; Fri, 22 Dec 2017 06:45:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSLlR-0000IW-7r for help-gnu-emacs@gnu.org; Fri, 22 Dec 2017 06:45:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eSLlO-00077Y-27 for help-gnu-emacs@gnu.org; Fri, 22 Dec 2017 06:45:21 -0500 Original-Received: from forward102p.mail.yandex.net ([77.88.28.102]:52762) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eSLlN-0006xv-Ld for help-gnu-emacs@gnu.org; Fri, 22 Dec 2017 06:45:17 -0500 Original-Received: from mxback13j.mail.yandex.net (mxback13j.mail.yandex.net [IPv6:2a02:6b8:0:1619::88]) by forward102p.mail.yandex.net (Yandex) with ESMTP id AB7884301A61; Fri, 22 Dec 2017 14:45:14 +0300 (MSK) Original-Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback13j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 33ElkO5RcR-jEdSSauW; Fri, 22 Dec 2017 14:45:14 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xuchunyang.me; s=mail; t=1513943114; bh=4kmqULRP+oPQC4lLR07ix1ZPp8mPdVfAvJ5sjr2XIGA=; h=From:To:Cc:Subject:Date:Message-ID; b=Roi90ni9P3JeP9HYGSRQmiUHCilN1NPbEJeOT1PLsjr3qMbC1r90C77fSqryBrDVq kdn2QyMcKAINLp0FUJO39+LlAYzChFjszz/Pm6K7yrow5dSf0Kv/dNMr7q4OKhLX0A dJ9p3avXhT60IQLSCDH/GYCVcyq7wCb5cuEWIhS4= Original-Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Ol7fEDNVGL-jCT8FWT9; Fri, 22 Dec 2017 14:45:13 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xuchunyang.me; s=mail; t=1513943114; bh=4kmqULRP+oPQC4lLR07ix1ZPp8mPdVfAvJ5sjr2XIGA=; h=From:To:Cc:Subject:Date:Message-ID; b=Roi90ni9P3JeP9HYGSRQmiUHCilN1NPbEJeOT1PLsjr3qMbC1r90C77fSqryBrDVq kdn2QyMcKAINLp0FUJO39+LlAYzChFjszz/Pm6K7yrow5dSf0Kv/dNMr7q4OKhLX0A dJ9p3avXhT60IQLSCDH/GYCVcyq7wCb5cuEWIhS4= Authentication-Results: smtp4j.mail.yandex.net; dkim=pass header.i=@xuchunyang.me X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 77.88.28.102 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:115426 Archived-At: Hi. 'C-h P el-search' mentions 'el-search-query-replace' can replace 'mapc' with 'dolist'. I would like to know if it is also possible to replace 'mapcar' with '--map' (from dash.el), for example, change (mapcar (lambda (x) (* x x)) '(1 2 3)) into (--map (* it it) '(1 2 3)) I have tried: M-x el-search-query-replace RET `(mapcar (lambda (,val) . ,body) ,list) -> `(--map ,@body ,list) RET It gives me: (--map (* x x) '(1 2 3)) it is almost right except the variable name, '--map' only knows 'it', not 'x'. Any suggestion? Thanks.