From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tak Kunihiro Newsgroups: gmane.emacs.bugs Subject: bug#50928: remove-dups Date: Mon, 04 Oct 2021 08:42:14 +0900 (JST) Message-ID: <20211004.084214.136025191776597692.tkk@misasa.okayama-u.ac.jp> References: <4CCC2E52-1B22-4852-9ED6-52612CF7D786@misasa.okayama-u.ac.jp> <87pmsox6a4.fsf@gnus.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29284"; mail-complaints-to="usenet@ciao.gmane.io" Cc: thievol@posteo.net, tkk@misasa.okayama-u.ac.jp, 50928@debbugs.gnu.org, dgutov@yandex.ru To: larsi@gnus.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 04 01:43:17 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXB8W-0007RG-RD for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Oct 2021 01:43:16 +0200 Original-Received: from localhost ([::1]:53566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXB8T-000865-CO for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 19:43:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXB8I-00085Z-T8 for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 19:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51793) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mXB8I-0001tq-Lw for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 19:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mXB8I-0000R2-DW for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 19:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tak Kunihiro Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Oct 2021 23:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50928 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 50928-submit@debbugs.gnu.org id=B50928.16333045511635 (code B ref 50928); Sun, 03 Oct 2021 23:43:02 +0000 Original-Received: (at 50928) by debbugs.gnu.org; 3 Oct 2021 23:42:31 +0000 Original-Received: from localhost ([127.0.0.1]:35106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXB7n-0000QJ-5i for submit@debbugs.gnu.org; Sun, 03 Oct 2021 19:42:31 -0400 Original-Received: from mx0b-00602c01.pphosted.com ([205.220.174.65]:37562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXB7j-0000Q9-BA for 50928@debbugs.gnu.org; Sun, 03 Oct 2021 19:42:29 -0400 Original-Received: from pps.filterd (m0238152.ppops.net [127.0.0.1]) by mx0a-00602c01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 193Luxpk016167; Mon, 4 Oct 2021 08:42:26 +0900 Original-Received: from mlsec.cc.okayama-u.ac.jp (mlsec.cc.okayama-u.ac.jp [150.46.12.254]) by mx0a-00602c01.pphosted.com (PPS) with ESMTPS id 3bf26rgsun-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Oct 2021 08:42:26 +0900 Original-Received: from jlsv301.okayama-u.ac.jp (unknown [150.46.12.5]) by mlsec.cc.okayama-u.ac.jp with smtp id 2a8f_d8ef_ac8cdf11_a0e1_48f0_8569_cecff27f61e6; Mon, 04 Oct 2021 08:42:14 +0900 Original-Received: from localhost (unknown [172.24.1.212]) by jlsv301.okayama-u.ac.jp (Postfix) with ESMTPSA id 49EE8760262; Mon, 4 Oct 2021 08:42:15 +0900 (JST) In-Reply-To: <87pmsox6a4.fsf@gnus.org> X-Mailer: Mew version 6.8 on Emacs 26.3 X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 11 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 4 Rules triggered EDT_SA_AU_PASS=0, EDT_SA_DN_PASS=0, EDT_SA_TS_TEMP_ERROR=0, RV6969=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6969> : inlines <7226> : streams <1903553> : uri <3327505> X-Proofpoint-GUID: 5s6hwZgA6S9A9gPHMqefQFQu1XhoywsG X-Proofpoint-ORIG-GUID: 5s6hwZgA6S9A9gPHMqefQFQu1XhoywsG X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10126 signatures=668683 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 impostorscore=0 malwarescore=0 mlxlogscore=553 lowpriorityscore=0 phishscore=0 suspectscore=0 clxscore=1011 bulkscore=0 adultscore=0 mlxscore=0 priorityscore=1501 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110030177 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:216312 Archived-At: > Tak Kunihiro writes: > >> I wanted to delete duplicated items from a list non-destructively. >> It took me a while to find out how to do so. >> >> (cl-remove-duplicates list :test 'equal) >> (delete-dups (copy-sequence list)) >> >> I think it is handy to have something like below in subr.el. >> Too obvious? >> >> (defun remove-dups (list) >> "Remove 'equal' duplicates from LIST non-destructively. >> Note that `delete-dups' deletes duplicates destructively." >> (delete-dups (copy-sequence list))) > > This is basically seq-uniq: Thank you to let me know. Now I can find its existence in (info "(elisp) Sequence Functions"). I wonder how I could have reached to the function by myself. How did you find it? (apropos-documentation "duplicate")?