From unknown Tue Jun 24 13:54:15 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#18837 <18837@debbugs.gnu.org> To: bug#18837 <18837@debbugs.gnu.org> Subject: Status: 25.0.50; `sort` -- modify function to preserve original list. Reply-To: bug#18837 <18837@debbugs.gnu.org> Date: Tue, 24 Jun 2025 20:54:15 +0000 retitle 18837 25.0.50; `sort` -- modify function to preserve original list. reassign 18837 emacs submitter 18837 Keith David Bershatsky severity 18837 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 25 17:03:54 2014 Received: (at submit) by debbugs.gnu.org; 25 Oct 2014 21:03:55 +0000 Received: from localhost ([127.0.0.1]:35527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xi8V8-0002Sn-02 for submit@debbugs.gnu.org; Sat, 25 Oct 2014 17:03:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38199) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xi8V4-0002Sa-RO for submit@debbugs.gnu.org; Sat, 25 Oct 2014 17:03:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xi8Ut-0005w2-53 for submit@debbugs.gnu.org; Sat, 25 Oct 2014 17:03:45 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xi8Ut-0005vy-24 for submit@debbugs.gnu.org; Sat, 25 Oct 2014 17:03:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xi8Un-0005fU-Ds for bug-gnu-emacs@gnu.org; Sat, 25 Oct 2014 17:03:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xi8Uh-0005tt-QI for bug-gnu-emacs@gnu.org; Sat, 25 Oct 2014 17:03:33 -0400 Received: from cobb.liquidweb.com ([50.28.13.150]:46997) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xi8Uh-0005tD-Ip for bug-gnu-emacs@gnu.org; Sat, 25 Oct 2014 17:03:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com; s=default; h=Content-Type:MIME-Version:Subject:To:From:Message-ID:Date; bh=CJXQF5cdBf7LWFQ0IOMve/QRNVXvmmC17vfsEEqXP7g=; b=gRihxOePZOozN4+SIGau3anXzC4844IU3szLBFMsmb472SSUkVdXV4EmBmh+aRhzKUBwFyIXaLxvpBzWLUAszQV19z0TGI96gPmGAtlQcyDVhSEKXcbtGLyU0Fz+bPLU; Received: from cpe-104-173-54-60.socal.res.rr.com ([104.173.54.60]:52005 helo=MP.local) by cobb.liquidweb.com with esmtp (Exim 4.82) (envelope-from ) id 1Xi8Uc-0005mq-E9 for bug-gnu-emacs@gnu.org; Sat, 25 Oct 2014 17:03:22 -0400 Date: Sat, 25 Oct 2014 14:03:25 -0700 Message-ID: From: Keith David Bershatsky To: bug-gnu-emacs@gnu.org Subject: 25.0.50; `sort` -- modify function to preserve original list. User-Agent: / () / () APEL/10.8 Emacs/25.0.50 (x86_64-apple-darwin10.8.0) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by - "") Content-Type: text/plain; charset=US-ASCII X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cobb.liquidweb.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry: lawlist|lawlist.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) The doc-string for the function `sort` states that `SEQ is modified by side effects`; however, it does not state in what way the original list gets modified or why such a feature might somehow be useful. I attempted to find out the answer to this question on `superuser.com`, however, the community has expressed an interest in closing the question without offering an explanation on this issue: http://superuser.com/questions/831608/emacs-sort-usefulness-of-side-effect-modifying-initial-list In my use case, I want to preserve an initial list that is set to a let-bound variable so that I can use it again elsewhere in the function. To achieve this objection, I used `copy-list`. Unless the modified `SEQ` is somehow useful, perhaps it would be appropriate to modify the function `sort` so that it preserves the initial list. Thanks, Keith ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 25.0.50.1 (x86_64-apple-darwin10.8.0, NS appkit-1038.36 Version 10.6.8 (Build 10K549)) of 2014-10-01 on MP.local Repository revision: 117996 dmantipov@yandex.ru-20141001132108-zdsxru2390mqyjlu Windowing system distributor `Apple', version 10.3.1038 Configured using: `configure --with-ns' Configured features: ACL LIBXML2 ZLIB Important settings: locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: sd-mode: t sb-mode: t tb-mode: t shell-dirtrack-mode: t cm-mode: t bc-mode: t as-mode: t ds-mode: t ml-mode: t Recent input: Recent messages: Load-path shadows: /Users/HOME/.0.data/.0.emacs/.0.apel_flim_simi/md4 hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/md4 /Users/HOME/.0.data/.0.emacs/.0.apel_flim_simi/hex-util hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/hex-util /Users/HOME/.0.data/.0.emacs/.0.apel_flim_simi/sasl hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/net/sasl /Users/HOME/.0.data/.0.emacs/.0.apel_flim_simi/sasl-ntlm hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/net/sasl-ntlm /Users/HOME/.0.data/.0.emacs/.0.apel_flim_simi/sasl-digest hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/net/sasl-digest /Users/HOME/.0.data/.0.emacs/.0.apel_flim_simi/sasl-cram hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/net/sasl-cram /Users/HOME/.0.data/.0.emacs/.0.apel_flim_simi/ntlm hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/net/ntlm /Users/HOME/.0.data/.0.emacs/.0.apel_flim_simi/hmac-md5 hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/net/hmac-md5 /Users/HOME/.0.data/.0.emacs/.0.apel_flim_simi/hmac-def hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/net/hmac-def /Users/HOME/.0.data/.0.emacs/.0.wl/rfc2368 hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/mail/rfc2368 /Users/HOME/.0.data/.0.emacs/.0.wl/utf7 hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/gnus/utf7 /Users/HOME/.0.data/.0.emacs/.0.apel_flim_simi/smime hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/gnus/smime /Users/HOME/.0.data/.0.emacs/.0.apel_flim_simi/pgg hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/obsolete/pgg /Users/HOME/.0.data/.0.emacs/.0.apel_flim_simi/pgg-pgp5 hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/obsolete/pgg-pgp5 /Users/HOME/.0.data/.0.emacs/.0.apel_flim_simi/pgg-pgp hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/obsolete/pgg-pgp /Users/HOME/.0.data/.0.emacs/.0.apel_flim_simi/pgg-parse hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/obsolete/pgg-parse /Users/HOME/.0.data/.0.emacs/.0.apel_flim_simi/pgg-gpg hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/obsolete/pgg-gpg /Users/HOME/.0.data/.0.emacs/.0.apel_flim_simi/pgg-def hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/obsolete/pgg-def Features: (shadow mime-setup mail-mime-setup semi-setup mime-image modb-standard elmo-imap4 mule-util eieio-opt speedbar sb-image ezimage dframe emacsbug lawlist-desktop frameset lawlist-colors reporter lawlist-dv lawlist-mc rect lawlist-ztree lawlist-wl elmo-nntp wl-demo wl-news wl-address wl-thread wl wl-e21 wl-draft elmo-pop3 wl-template elmo-net elmo-cache elmo-map elmo-dop wl-folder wl-spam wl-action wl-summary wl-refile wl-message wl-mime pgg mime-pgp wl-util pp elmo-flag elmo-localdir mime-play filename mime-edit eword-encode pgg-parse pccl pccl-20 pgg-def signature sendmail elmo-mime mmelmo-buffer mmelmo-imap mime-view mime-conf calist semi-def mmimap mime-parse mmbuffer mmgeneric elmo-filter elmo-multi elmo-spam elsp-header elsp-generic elmo elmo-signal wl-highlight wl-vars wl-version elmo-msgdb modb modb-generic modb-entity luna mime elmo-util emu invisible inv-23 poem poem-e20 poem-e20_3 eword-decode std11 elmo-date elmo-vars elmo-version w3m-load mime-w3m w3m browse-url doc-view jka-compr image-mode w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util lawlist-dired dired-aux lawlist-vr-hr lawlist-ws disp-table lawlist-calc lawlist-flyspell lawlist-yas lawlist-tex-mode skeleton compare-w lawlist-txt-mode lawlist-tabbar lawlist-github ido view vc-git vc vc-dispatcher tramp tramp-compat tramp-loaddefs trampver shell thingatpt time-stamp rx log-view log-edit pcvs-util add-log help-mode grep compile find-lisp epa epg epg-config ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff ert ewoc debug eieio-base diff-mode conf-mode autorevert filenotify lorg-calendar org-element lorg-search org-agenda context-menu dired-read-filename lawlist-toodledo url-http url-auth url-gw url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source eieio eieio-core password-cache url-vars mailcap json xml lawlist-org lawlist-calendar derived org byte-opt bytecomp byte-compile cconv org-macro org-footnote org-pcomplete pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint comint ansi-color ring ob-core ob-eval org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs noutline outline gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls utf7 mel path-util mime-def alist mcharset mcs-20 mcs-e20 pcustom pces pces-e20 pces-20 broken poe pym static apel-ver product netrc nnoo parse-time gnus-spec gnus-int gnus-range message dired format-spec mml mml-sec mm-decode mm-bodies mm-encode gmm-utils mailheader gnus-win lawlist-frame lawlist-cm lawlist-bbdb gnus gnus-ems nnheader gnus-util mail-utils wid-edit mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-extr rfc822 cl timezone lawlist-init pcase cl-macs gv advice help-fns easy-mmode edmacro kmacro cl-loaddefs cl-lib savehist server ps-print ps-def lpr find-func saveplace easymenu time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process cocoa ns multi-tty emacs) Memory information: ((conses 16 1096676 58375) (symbols 48 62784 0) (miscs 40 214 364) (strings 32 147723 21599) (string-bytes 1 4679349) (vectors 16 42737) (vector-slots 8 761520 19326) (floats 8 1105 51) (intervals 56 5302 730) (buffers 976 15)) From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 25 22:44:53 2014 Received: (at 18837) by debbugs.gnu.org; 26 Oct 2014 02:44:53 +0000 Received: from localhost ([127.0.0.1]:35617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XiDp6-00027b-SK for submit@debbugs.gnu.org; Sat, 25 Oct 2014 22:44:53 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:48674) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XiDp5-00027O-Ax for 18837@debbugs.gnu.org; Sat, 25 Oct 2014 22:44:51 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNFpY87/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqDTCE X-IPAS-Result: ArYGAIDvNVNFpY87/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECNIZF456B4Q4BKkZgWqDTCE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="95209468" Received: from 69-165-143-59.dsl.teksavvy.com (HELO pastel.home) ([69.165.143.59]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Oct 2014 22:44:45 -0400 Received: by pastel.home (Postfix, from userid 20848) id 9FE713292; Sat, 25 Oct 2014 22:44:45 -0400 (EDT) From: Stefan Monnier To: Keith David Bershatsky Subject: Re: bug#18837: 25.0.50; `sort` -- modify function to preserve original list. Message-ID: References: Date: Sat, 25 Oct 2014 22:44:45 -0400 In-Reply-To: (Keith David Bershatsky's message of "Sat, 25 Oct 2014 14:03:25 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18837 Cc: 18837@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > The doc-string for the function `sort` states that `SEQ is modified by > side effects`; however, it does not state in what way the original > list gets modified or why such a feature might somehow be useful. The "usefulness" is to avoid allocating another list in the case where the unsorted list won't be used later on anyway. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 26 01:05:08 2014 Received: (at 18837) by debbugs.gnu.org; 26 Oct 2014 05:05:08 +0000 Received: from localhost ([127.0.0.1]:35648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XiG0o-0005Tb-Dn for submit@debbugs.gnu.org; Sun, 26 Oct 2014 01:05:06 -0400 Received: from cobb.liquidweb.com ([50.28.13.150]:34145) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XiG0k-0005Sy-Pl for 18837@debbugs.gnu.org; Sun, 26 Oct 2014 01:05:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com; s=default; h=Content-Type:MIME-Version:Cc:Subject:To:From:Message-ID:Date; bh=N5f4SwgA/IFiqj17HJCPKchpXDXnIxdrgFol91rVy+o=; b=ftVbVJJyJf/EBuHBsWzNcem+qx8nbYRstq5/Zw+kgV4YoCncWscWmzLKrC/VcOEqk3kyNH8aKW4XeyxSOhuQgA6Ukdj5bKDH+RRH+bfUSBbBgt8ZjT0cPkhUJsaVY6MW; Received: from cpe-104-173-54-60.socal.res.rr.com ([104.173.54.60]:54732 helo=MP.local) by cobb.liquidweb.com with esmtp (Exim 4.82) (envelope-from ) id 1XiG0c-0005kc-G6; Sun, 26 Oct 2014 01:04:54 -0400 Date: Sat, 25 Oct 2014 22:04:55 -0700 Message-ID: From: Keith David Bershatsky To: Stefan Monnier Subject: Re: bug#18837: 25.0.50; `sort` -- modify function to preserve original list. User-Agent: / () / () APEL/10.8 Emacs/25.0.50 (x86_64-apple-darwin10.8.0) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by - "") Content-Type: text/plain; charset=US-ASCII X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cobb.liquidweb.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry: lawlist|lawlist.com X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18837 Cc: 18837@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Thank you, Stefan, for taking a look at this Emacs report (#18837). Here is my workaround: (defun lawlist-sort (seq predicate) (let ((disposable-list (copy-list seq))) (sort disposable-list predicate))) There may be situations where `copy-list` might not work, but that is beyond my present level of understanding / knowledge. I suppose that there might be some time consumption issues involved with the function `copy-list` for extremely complex lists, but none of my lists would ever get so large/complex that this would be an issue. Thanks, Keith ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; At Sat, 25 Oct 2014 22:44:45 -0400, Stefan Monnier wrote: > > > The doc-string for the function `sort` states that `SEQ is modified by > > side effects`; however, it does not state in what way the original > > list gets modified or why such a feature might somehow be useful. > > The "usefulness" is to avoid allocating another list in the case where > the unsorted list won't be used later on anyway. > > > Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 16 01:30:55 2019 Received: (at 18837-done) by debbugs.gnu.org; 16 Sep 2019 05:30:55 +0000 Received: from localhost ([127.0.0.1]:49045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9jbC-0006Sn-PL for submit@debbugs.gnu.org; Mon, 16 Sep 2019 01:30:54 -0400 Received: from mail-pg1-f173.google.com ([209.85.215.173]:41427) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i9jbB-0006Sa-3M for 18837-done@debbugs.gnu.org; Mon, 16 Sep 2019 01:30:53 -0400 Received: by mail-pg1-f173.google.com with SMTP id x15so19111295pgg.8 for <18837-done@debbugs.gnu.org>; Sun, 15 Sep 2019 22:30:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=nECPJIHr2wnf8rzFIYwvclVWbvMHg1ipIfSxKhTpX8o=; b=tGXBUTnM5xXh3WgYXL2p4D3Y4gLhNNg76jupdsYeuPfZSu5b3tzOa412zMVwN/77zd ad4jWswKyIvAb9kbwYULK3G70nCsun8L6NfAupf2me1nP96OZO9MZbd52xx0i1PMDRaJ +6a734V0ngx0aO/nkSyNhDQNbMvXJ3KDBbc6NJa9N3xxy1lFOVuULrnwZrHUn4QpdCtW SMo483r9I8UD6U+HZ8Lv+AcWG3MF6DratClRyg5F0Cq+P88qIUbnSYkLhmy4md4aZ8kB 3cD8Daf2zE7pdPzKsa/BGNN5LHkXP+2++Hc3wiATi2Bxi7ETgFZ5LH4NSL8mnHKLHRdc fSCQ== X-Gm-Message-State: APjAAAUPlXceQAb8NI9u9dSMlOVq3hcnxnQXkimK/Z4k2A/SvLJDPkAD e8OchXu9v0LtDb+kC8Lq2GH0jbd4VGwq/L8nuwc= X-Google-Smtp-Source: APXvYqxJPKbI18kzC3/qDoa4gPhYnIBhmif9B3xbtTElb9OC1VsscjEQFu5dB4TK3vChlNKSLreo9y7VQawnu61npFk= X-Received: by 2002:a63:69c1:: with SMTP id e184mr52314287pgc.198.1568611847226; Sun, 15 Sep 2019 22:30:47 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Mon, 16 Sep 2019 07:30:36 +0200 Message-ID: Subject: Re: bug#18837: 25.0.50; `sort` -- modify function to preserve original list. To: Stefan Monnier Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 18837-done Cc: 18837-done@debbugs.gnu.org, Keith David Bershatsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Stefan Monnier writes: >> The doc-string for the function `sort` states that `SEQ is modified by >> side effects`; however, it does not state in what way the original >> list gets modified or why such a feature might somehow be useful. > > The "usefulness" is to avoid allocating another list in the case where > the unsorted list won't be used later on anyway. It doesn't seem like there is anything more to do here, so I'm closing this bug. Best regards, Stefan Kangas From unknown Tue Jun 24 13:54:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 14 Oct 2019 11:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator