From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Allan Gottlieb Newsgroups: gmane.emacs.help Subject: Re: Wanted: Adding list-elements into an existing list Date: Thu, 16 Oct 2008 12:02:13 -0400 Message-ID: References: <874p3cvfwy.fsf@zeekat.nl> <002c01c92fa5$fba25940$c2b22382@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1224173379 18242 80.91.229.12 (16 Oct 2008 16:09:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Oct 2008 16:09:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 16 18:10:38 2008 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.50) id 1KqVQZ-0007s1-5x for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Oct 2008 18:10:19 +0200 Original-Received: from localhost ([127.0.0.1]:51006 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KqVPU-0002tq-F5 for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Oct 2008 12:09:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KqVIs-0005Q5-TR for help-gnu-emacs@gnu.org; Thu, 16 Oct 2008 12:02:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KqVIq-0005Jc-RG for help-gnu-emacs@gnu.org; Thu, 16 Oct 2008 12:02:22 -0400 Original-Received: from [199.232.76.173] (port=35115 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KqVIq-0005IR-Hc for help-gnu-emacs@gnu.org; Thu, 16 Oct 2008 12:02:20 -0400 Original-Received: from smtp.cs.nyu.edu ([128.122.80.33]:34814) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KqVIp-0006EX-P9 for help-gnu-emacs@gnu.org; Thu, 16 Oct 2008 12:02:19 -0400 Original-Received: from ajglap.localdomain (ool-4578d291.dyn.optonline.net [69.120.210.145]) (authenticated bits=0) by smtp.cs.nyu.edu (8.14.3/8.13.8) with ESMTP id m9GG2Ija016348 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 16 Oct 2008 12:02:18 -0400 (EDT) Original-Received: by ajglap.localdomain (Postfix, from userid 1502) id 02FA219D921; Thu, 16 Oct 2008 12:02:14 -0400 (EDT) In-Reply-To: <002c01c92fa5$fba25940$c2b22382@us.oracle.com> (Drew Adams's message of "Thu\, 16 Oct 2008 08\:43\:48 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) 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:58847 Archived-At: At Thu, 16 Oct 2008 08:43:48 -0700 Drew Adams wrote: >> (append) does not modify its first argument which is what I want. >> I can solve it through (setq x (append x y)) > > Depends what you want. You mentioned `add-to-list', which adds an element only > if it is not already there. Neither `append' nor `nconc' does that for combining > lists. > > Sounds more like you want something like set intersection: see functions > `intersection' or `nintersection' in library `cl-seq.el'. Sounds more like set union to me. allan