From unknown Wed Jun 18 23:05:08 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#47391 <47391@debbugs.gnu.org> To: bug#47391 <47391@debbugs.gnu.org> Subject: Status: 27.2; static list return from function and nconc Reply-To: bug#47391 <47391@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:05:08 +0000 retitle 47391 27.2; static list return from function and nconc reassign 47391 emacs submitter 47391 Rajeev Narang severity 47391 normal tag 47391 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 25 11:20:50 2021 Received: (at submit) by debbugs.gnu.org; 25 Mar 2021 15:20:50 +0000 Received: from localhost ([127.0.0.1]:39249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPRmz-0002Q9-Tu for submit@debbugs.gnu.org; Thu, 25 Mar 2021 11:20:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:33156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPRNl-0001iR-Pg for submit@debbugs.gnu.org; Thu, 25 Mar 2021 10:54:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPRNY-00023t-Qf; Thu, 25 Mar 2021 10:54:38 -0400 Received: from vr0.sivalik.com ([104.238.130.12]:57810 helo=smtp.sivalik.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPRNV-0007uQ-45; Thu, 25 Mar 2021 10:54:32 -0400 Received: from localhost (unknown [96.242.220.230]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: rajeev@sivalik.com) by smtp.sivalik.com (Postfix) with ESMTPSA id 91F3B5ED0A; Thu, 25 Mar 2021 10:54:20 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=sivalik.com; s=svlk; t=1616684060; bh=JHMTtaBABS9nLrMO7h9ueAJnEDYgLA7pU/2s0xTiku0=; h=From:To:Subject:Date:From; b=blnyL8xgLNiB7Is8ZmMLkH5CbEWcGeEDXLDQRi/HOPPUMgU15Q7glQM5nxrMxXCG8 WT09rfkcYN41ogRMbtyYFJFZhpgBrfs2YTiI/n5SPk/+gcR+Msp6/aiMqWfMfonzWk LrNSbglvi93BQYxR/+n+J6aZybHaLCEh4L0GzQFw= X-No-Archive: yes From: Rajeev Narang To: bug-gnu-emacs@gnu.org, emacs-devel@gnu.org Subject: 27.2; static list return from function and nconc Date: Thu, 25 Mar 2021 10:54:20 -0400 Message-ID: <87r1k32sir.fsf@hm.sivalik.com> MIME-Version: 1.0 Content-Type: text/plain Content-Disposition: inline Received-SPF: pass client-ip=104.238.130.12; envelope-from=rajeev.jnk@sivalik.com; helo=smtp.sivalik.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 25 Mar 2021 11:20:49 -0400 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: -2.4 (--) (defun fn () '(1 2)) (nconc (fn) '(3)) -> (1 2 3) (nconc (fn) '(3)) -> (1 2 3 3) ? should be (1 2 3) If this is not a bug, then hfy-invisible, hfy-face-to-style-i may need to be fixed. In GNU Emacs 27.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.24) of 2021-03-19 built on hp Repository revision: deef5efafb70f4b171265b896505b92b6eef24e6 Repository branch: emacs-27 Windowing system distributor 'The X.Org Foundation', version 11.0.12010000 System Description: Debian GNU/Linux bullseye/sid Recent messages: fn (1 2 3) (1 2 3 3) next-line: End of buffer [2 times] Mark activated next-line: End of buffer Making completion list... Quit Mark activated Making completion list... Configured using: 'configure --prefix=/home/rajeev/tmp/build/emacs' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP Important settings: value of $LC_TIME: en_GB.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: reveal-mode: t global-so-long-mode: t global-auto-revert-mode: t shell-dirtrack-mode: t midnight-mode: t display-time-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t transient-mark-mode: t hs-minor-mode: t Load-path shadows: /home/rajeev/.config/emacs/elpa/map-3.0/map hides /home/rajeev/tmp/build/emacs/share/emacs/27.2/lisp/emacs-lisp/map Features: (shadow emacsbug dired-aux tabify man cal-move sh-script smie executable smerge-mode diff vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc-dir ewoc vc vc-dispatcher sort gnus-cite gnus-async gnus-bcklg gnus-ml ob-ditaa ob-plantuml org-clock org-colview org-habit cl-print debug misearch multi-isearch js eieio-opt speedbar sb-image ezimage dframe hfy-cmap help-fns radix-tree htmlfontify htmlfontify-loaddefs cus-edit cus-start cus-load cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs utf-7 nnml mm-archive network-stream url-http url-gw nsm url-cache url-auth time-stamp org-duration view mule-util face-remap edmacro kmacro server cursor-sensor bbdb-gnus nnfolder pcase rx xt-mouse which-func imenu timeclock spam spam-stat gnus-uu yenc semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet org-indent reveal mailalias bbdb-message mail-extr ol-eww eww mm-url thingatpt url-queue ol-rmail ol-mhe ol-irc ol-info ol-gnus nnir ol-docview doc-view jka-compr image-mode exif ol-bibtex bibtex ol-bbdb ol-w3m icomplete so-long autorevert filenotify vc-git diff-mode bbdb-anniv cl-extra tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell ls-lisp hideshow printing ps-print ps-print-loaddefs ps-def lpr web-server web-server-status-codes el/web midnight el/cron bbdb-mua backtrace help-mode qp el/wthr el/av el/hass el/fin el/remote el/script type-break cal-iso org-id lunar solar cal-dst holidays hol-loaddefs el/calc el/loc term disp-table ehelp dirtrack dbus parsec plstore pp gnutls gnus-delay gnus-draft gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-cache gnus-msg nndraft nnmh gnus-icalendar org-capture gnus-art mm-uu mml2015 mm-view mml-smime smime dig icalendar sieve sieve-mode sieve-manage sasl sasl-anonymous sasl-login sasl-plain sendmail time ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html table ox-ascii ox-publish ox org-element avl-tree generator org-agenda org-refile org-crypt org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete pcomplete comint ansi-color ring org-list org-faces org-entities noutline outline easy-mmode org-version ob-emacs-lisp ob-core ob-eval org-table ol org-keys org-compat advice org-macs org-loaddefs find-func gnus-sum url url-proxy url-privacy url-expand url-methods url-history mailcap shr url-cookie url-domsuf url-util svg xml dom gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int gnus-range message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec epa derived epg epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums text-property-search time-date mail-utils mm-util mail-prsvr wid-edit el/org el/doc el/mail el/tools el/shell el/xmpp el/diary timer-list el/timer el/util bbdb-com crm mailabbrev bbdb bbdb-site timezone el/bbdb appt diary-lib diary-loaddefs cal-menu calendar cal-loaddefs el/init wombat-theme info package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded 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 threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 684512 118274) (symbols 48 40819 5) (strings 32 175683 17540) (string-bytes 1 5739083) (vectors 16 77783) (vector-slots 8 1527654 184718) (floats 8 1239 1715) (intervals 56 41435 1244) (buffers 1000 118)) From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 25 11:28:46 2021 Received: (at 47391) by debbugs.gnu.org; 25 Mar 2021 15:28:46 +0000 Received: from localhost ([127.0.0.1]:39279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPRug-0002g6-0q for submit@debbugs.gnu.org; Thu, 25 Mar 2021 11:28:46 -0400 Received: from mail-ot1-f51.google.com ([209.85.210.51]:33711) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPRud-0002fr-EO for 47391@debbugs.gnu.org; Thu, 25 Mar 2021 11:28:44 -0400 Received: by mail-ot1-f51.google.com with SMTP id s11-20020a056830124bb029021bb3524ebeso2351077otp.0 for <47391@debbugs.gnu.org>; Thu, 25 Mar 2021 08:28:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=04iAhbn11ttFnM/Nal2sMhWej4j73YlxGyQMCaVGnVA=; b=UkK2VGo9uqiHMHesBSKqPDdFwhXVwfK36aKbFUGQNpBOU7YsqSvh6W9QyJGPqfEkO2 fnd/51O1AEB8TMVOq/Us4ewz3rtovhVzBpnmjQgY2d3QZamsmQWszT2jwzHeZDaSe6Qp 0RHPGcWGuYGvkRLal3EnfzaUDsWn0Bx9kubD+k2iqaMLkJB8tcqsNqDeWS8wuC6Dpc2B Jah68H/4XfTVdSE9JHPmVtbvtBGT4ngf2DFoV49MQbc+0e21MKM1JzsToYdclDA2Pc0W W6Qa8UhP20nYfx2PpkNJr/drF8w2bfdvSR13LT6dR9sToy/ysW9qwSJ77fqZgBGX9Ffh w6bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=04iAhbn11ttFnM/Nal2sMhWej4j73YlxGyQMCaVGnVA=; b=ecSOwW6r8SyHo5/jedUjbmLfnBQuTAJxOJrB9Uc8poSvM2LLNFyaqUBOn/71ix1D92 Cklf9MyPh8Ld7jYVYfF/HY3h79ZIO+Yr/6bqSiqYC82BSAufiOrCI2KZdz1f+raIEM0Z IflYzsrigPU1UMXBBoL0j0KUWCNVb9AIFf7N/q3bIiJm1ZtiQbxvxvc2VkksoRMR666B 72Y1Bk7L0LIupOG97q9kY1S4EJPHH2NSWOS7zqM3KB02h9ghnfELsBh8LPUu3MraE99l GG/UvJC5K4Yw0tZoFok8OWlC5qxHYoDA9+D4CRKQI1uHwYFj4YtnRqwhWsmQ2ZJrPFf4 dywA== X-Gm-Message-State: AOAM532IPyN48p6YUKAMziRGlvYOxXpHmScuzjwY2BroMtiM9j2s2LX9 rYsW5MfQENV8wR+wbd0wxuDh2DFcFhRJBOgKq1c= X-Google-Smtp-Source: ABdhPJzJz+xO87RMalyef0s2RKqPXIDa+/jVpG8xtVqC9NE3hdFFmJ9kvQnfoonDBECTBCsPp5kbRTpVHVoRbPf04qI= X-Received: by 2002:a05:6830:1046:: with SMTP id b6mr8029972otp.156.1616686117625; Thu, 25 Mar 2021 08:28:37 -0700 (PDT) MIME-Version: 1.0 References: <87r1k32sir.fsf@hm.sivalik.com> In-Reply-To: <87r1k32sir.fsf@hm.sivalik.com> From: Philipp Stephani Date: Thu, 25 Mar 2021 16:28:26 +0100 Message-ID: Subject: Re: bug#47391: 27.2; static list return from function and nconc To: Rajeev Narang Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 47391 Cc: 47391@debbugs.gnu.org, Emacs developers 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.7 (/) Am Do., 25. M=C3=A4rz 2021 um 16:23 Uhr schrieb Rajeev Narang via Bug reports for GNU Emacs, the Swiss army knife of text editors : > > (defun fn () '(1 2)) > > (nconc (fn) '(3)) > -> (1 2 3) This is undefined behavior/unsupported. The value that (fn) evaluates to is immutable, but nconc mutates it. > > (nconc (fn) '(3)) > -> (1 2 3 3) ? should be (1 2 3) > > If this is not a bug, then hfy-invisible, hfy-face-to-style-i may need to= be fixed. If they use this pattern, then they should indeed be fixed. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 25 11:43:30 2021 Received: (at 47391) by debbugs.gnu.org; 25 Mar 2021 15:43:30 +0000 Received: from localhost ([127.0.0.1]:39304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPS8w-00035T-AE for submit@debbugs.gnu.org; Thu, 25 Mar 2021 11:43:30 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:64204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPS8u-00035G-Sh for 47391@debbugs.gnu.org; Thu, 25 Mar 2021 11:43:29 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 88367809E7; Thu, 25 Mar 2021 11:43:23 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 35FD380675; Thu, 25 Mar 2021 11:43:22 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1616687002; bh=yjukXNXFZuAbfp8EHWGt8jMMPpNGLNmo074RC9wuREY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=gLlKN09kzQDSmxTUv5Mz3dgR0YWnDCZ4pdDWMqGjyj3D2FcYtXRlTkMfcjYow4WKB Xc1kh9ZcVxw5CB+k8uqr4gHFAVk29FA0ALsx+nr8mnTT0KOtgKBbQGsoJk+DudJGQA nf0g3qys9fs/2lq0A9qcEVS90QKUODlVdTuvZHSLv0myQ9SKIp4GuOMCQbqRtYaZcE Mm4FJZAHl8PY4TFe3fQsrlge5CtqhQjyFxsGln/qPAdb1M/qIIv/ypvu60pcoZZDqb vDoKcHbSgqVgPHCPZs5WrBMdPQkx5+ELGkUf4vmASc6GD2tD+4fnk9acHTAz8UFOFR NSnFQBX+0lKPA== Received: from alfajor (unknown [216.154.43.249]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E671F12014C; Thu, 25 Mar 2021 11:43:21 -0400 (EDT) From: Stefan Monnier To: Philipp Stephani Subject: Re: bug#47391: 27.2; static list return from function and nconc Message-ID: References: <87r1k32sir.fsf@hm.sivalik.com> Date: Thu, 25 Mar 2021 11:43:20 -0400 In-Reply-To: (Philipp Stephani's message of "Thu, 25 Mar 2021 16:28:26 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.098 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 47391 Cc: Rajeev Narang , 47391@debbugs.gnu.org, Emacs developers 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: -3.3 (---) >> (defun fn () '(1 2)) >> >> (nconc (fn) '(3)) >> -> (1 2 3) > > This is undefined behavior/unsupported. The value that (fn) evaluates > to is immutable, but nconc mutates it. > >> >> (nconc (fn) '(3)) >> -> (1 2 3 3) ? should be (1 2 3) >> >> If this is not a bug, then hfy-invisible, hfy-face-to-style-i may need to be fixed. > > If they use this pattern, then they should indeed be fixed. Note that in the code above, we usually consider that the bug is not in `fn` but in the use of `nconc` on a list which the code doesn't know can safely be mutated (it should hence use `append` instead). Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 25 11:55:41 2021 Received: (at 47391) by debbugs.gnu.org; 25 Mar 2021 15:55:41 +0000 Received: from localhost ([127.0.0.1]:39317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPSKj-0003Nl-0I for submit@debbugs.gnu.org; Thu, 25 Mar 2021 11:55:41 -0400 Received: from heytings.org ([95.142.160.155]:41138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPSKg-0003Nd-Rr for 47391@debbugs.gnu.org; Thu, 25 Mar 2021 11:55:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1616687737; bh=ayPkMoeNHezgps/5G5CenuUaT4jD02qJIcRPElniDpk=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=C5dWbDLYk0W6Et1V4EopARtVuXcTby3ByzBmprlHQfr0wy9Bj1MQQm2E6lRPadFC4 FlaHlnOZYMwPXd09aoLsy4U1ugyzbn94GV8cDjqO3XWLLoUww0E6A2v0TR9Em6OwS4 lx0WGwUWpBQojv0qWeHAa9P0gmIJJ9zQZXK5iftnKfsxk8HL/cTHSBHvYDCM0LfI9a JHLiJCtujc0PVhdI2bZYqZn1+myuO9gqk/JbPbFKfiRzJKJCi81zZzUFA0I+AoVTou IGHDnMtDlObXrw2oXtH7skAoV0Lrgg5DNN0EY96zJVbKtJWvUlx2/CoenV/Dyc1mp4 weXUAhw0oMQ+Q== Date: Thu, 25 Mar 2021 15:55:37 +0000 From: Gregory Heytings To: Rajeev Narang Subject: Re: bug#47391: 27.2; static list return from function and nconc In-Reply-To: <87r1k32sir.fsf@hm.sivalik.com> Message-ID: References: <87r1k32sir.fsf@hm.sivalik.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="qvGcDqopp7" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 47391 Cc: 47391@debbugs.gnu.org, emacs-devel@gnu.org 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: -1.0 (-) --qvGcDqopp7 Content-Type: text/plain; charset=us-ascii; format=flowed > > (defun fn () '(1 2)) > > (nconc (fn) '(3)) > -> (1 2 3) > > (nconc (fn) '(3)) > -> (1 2 3 3) ? should be (1 2 3) > Why do you think this is a bug? The docstring of "nconc" says: "Concatenate any number of lists by _altering_ them. Only the last argument is not altered, and need not be a list." (append (fn) '(3)) always returns (1 2 3). > > If this is not a bug, then hfy-invisible, hfy-face-to-style-i may need > to be fixed. > Does the attached patch fix the bug you see? --qvGcDqopp7 Content-Type: text/x-diff; name=0001-lisp-htmlfontify.el-hfy-invisible-Return-a-new-list-.patch Content-Transfer-Encoding: base64 Content-ID: Content-Description: Content-Disposition: attachment; filename=0001-lisp-htmlfontify.el-hfy-invisible-Return-a-new-list-.patch RnJvbSAyNjhlMTVlYThkOTRkNGUyNThkNTc2NDA4YjYwMjZiYmM1ZTFmZGEz IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBUaHUsIDI1IE1h ciAyMDIxIDE1OjUxOjA1ICswMDAwDQpTdWJqZWN0OiBbUEFUQ0ggMi8yXSAq IGxpc3AvaHRtbGZvbnRpZnkuZWwgKGhmeS1pbnZpc2libGUpOiBSZXR1cm4g YSBuZXcgbGlzdA0KIGF0IGVhY2ggaW52b2NhdGlvbiAoYnVnIzQ3MzkxKQ0K DQotLS0NCiBsaXNwL2h0bWxmb250aWZ5LmVsIHwgMiArLQ0KIDEgZmlsZSBj aGFuZ2VkLCAxIGluc2VydGlvbigrKSwgMSBkZWxldGlvbigtKQ0KDQpkaWZm IC0tZ2l0IGEvbGlzcC9odG1sZm9udGlmeS5lbCBiL2xpc3AvaHRtbGZvbnRp ZnkuZWwNCmluZGV4IGJmYmUwZWUxNjUuLmNkN2RmNWRmZGYgMTAwNjQ0DQot LS0gYS9saXNwL2h0bWxmb250aWZ5LmVsDQorKysgYi9saXNwL2h0bWxmb250 aWZ5LmVsDQpAQCAtODIyLDcgKzgyMiw3IEBAIFZBTCBpcyBpZ25vcmVkLiIN CiAgICJUaGlzIHRleHQgc2hvdWxkIGJlIGludmlzaWJsZS4NCiBEbyBzb21l dGhpbmcgaW4gQ1NTIHRvIG1ha2UgdGhhdCBoYXBwZW4uDQogVkFMIGlzIGln bm9yZWQgaGVyZS4iDQotICAnKCgiZGlzcGxheSIgLiAibm9uZSIpKSkNCisg IChsaXN0ICcoImRpc3BsYXkiIC4gIm5vbmUiKSkpDQogDQogKGRlZnVuIGhm eS1jb21iaW5lZC1mYWNlLXNwZWMgKGZhY2UpDQogICAiUmV0dXJuIGEgYGRl ZmZhY2UnIHN0eWxlIGFsaXN0IG9mIHBvc3NpYmxlIHNwZWNpZmljYXRpb25z IGZvciBGQUNFLg0KLS0gDQoyLjMwLjINCg0K --qvGcDqopp7-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 25 11:58:58 2021 Received: (at 47391) by debbugs.gnu.org; 25 Mar 2021 15:58:58 +0000 Received: from localhost ([127.0.0.1]:39337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPSNu-0003TO-BZ for submit@debbugs.gnu.org; Thu, 25 Mar 2021 11:58:58 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:8977) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPSNt-0003TB-3n for 47391@debbugs.gnu.org; Thu, 25 Mar 2021 11:58:57 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 8850F8091E; Thu, 25 Mar 2021 11:58:51 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3F5228065D; Thu, 25 Mar 2021 11:58:50 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1616687930; bh=Q/SlNTep8nlxsIbMU3//xnB5ugDokG7nOmnTtSHUCag=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=BdWYZkQ9MjDhAXkSxii9rkRuzMZip1bdm1gSezWADVfDExQ9PGssSkWjcqZg9+Ntn IF2CFd4y8YH5Ge8NxGlGUdKaccJ2o2J5hKHETolM3iNB2yo5i0cvx6RtERJ3k59Udq aTdkEw2TpYAySRN9LWgy76AAYYnD1oZDmO1Kpko77kLgff39wcknbf7QJfYHHIA1dE eAyOPAhZaIrdAe+HbjBl8z38DVXLJcNHfnvtySXJpLECx//R5WVOfwOYwLJfLR+N1p PAtKnlUvQgqoVpMMWoyZhvpmaLLXJhKufSq8XT+ku40ZeF57tGVe/DRN0vsl6Z1jBo xzy6nMcG8GJ8A== Received: from alfajor (unknown [216.154.43.249]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E497F120257; Thu, 25 Mar 2021 11:58:49 -0400 (EDT) From: Stefan Monnier To: Gregory Heytings Subject: Re: bug#47391: 27.2; static list return from function and nconc Message-ID: References: <87r1k32sir.fsf@hm.sivalik.com> Date: Thu, 25 Mar 2021 11:58:48 -0400 In-Reply-To: (Gregory Heytings's message of "Thu, 25 Mar 2021 15:55:37 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.098 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 47391 Cc: Rajeev Narang , 47391@debbugs.gnu.org, emacs-devel@gnu.org 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: -3.3 (---) > Does the attached patch fix the bug you see? I pushed another one instead which avoids `nconc` instead of trying to allow it. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 25 12:03:28 2021 Received: (at 47391) by debbugs.gnu.org; 25 Mar 2021 16:03:28 +0000 Received: from localhost ([127.0.0.1]:39341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPSSF-0003cS-Tm for submit@debbugs.gnu.org; Thu, 25 Mar 2021 12:03:28 -0400 Received: from heytings.org ([95.142.160.155]:41160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPSSD-0003cG-9G for 47391@debbugs.gnu.org; Thu, 25 Mar 2021 12:03:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1616688203; bh=cyulDU83SISkxPsXOsfsFqFYQbIKPW3pUqSEZ9uWAFg=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=xHdZhv3kUmcEz9jALcP2UZ4dqByI33gxH5UTdPnnQWnMjEPocb/HB6U1q99OGcb8F B0Fi9e80TgVdMLwNl1mOT5buXLAp1FgK9iqxBU1j2rMPiUsmeP7HO8TY6ScnqYaHX/ mVg5dy0GozGAbEQul+qmLPcX1rPdR/dPwQYDgvSBeuULKWKdskYjn/HG6T6VMzih3x dR4dBJ5honMYRfgECM9WQj6+cIpQ0vjIMJhezmFzi9m2saho9ue6oCnZfHvGw5aakL wrSYKvSrr5dzYJ5718LjjXP63HAIXtfftbC2HlZ+lmrNGQRyCykKetBIUy8JtxerKc n0xPyLHKKUEzg== Date: Thu, 25 Mar 2021 16:03:23 +0000 From: Gregory Heytings To: Stefan Monnier Subject: Re: bug#47391: 27.2; static list return from function and nconc In-Reply-To: Message-ID: References: <87r1k32sir.fsf@hm.sivalik.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 47391 Cc: Rajeev Narang , 47391@debbugs.gnu.org, emacs-devel@gnu.org 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: -1.0 (-) >> Does the attached patch fix the bug you see? > > I pushed another one instead which avoids `nconc` instead of trying to > allow it. > Okay. Apparently htmlfontify.el was written with the idea of mutating lists returned by functions (for efficiency reasons?), hfy-invisible was an exception. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 28 09:21:32 2021 Received: (at 47391) by debbugs.gnu.org; 28 Mar 2021 13:21:33 +0000 Received: from localhost ([127.0.0.1]:45561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQVMC-0004R7-Lj for submit@debbugs.gnu.org; Sun, 28 Mar 2021 09:21:32 -0400 Received: from quimby.gnus.org ([95.216.78.240]:55506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQVMB-0004Qq-05 for 47391@debbugs.gnu.org; Sun, 28 Mar 2021 09:21:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=mL73Zrs5uBOOBWtMkja4B6NuHJ7yWsGIJKIiZyhlL/Q=; b=uUnQE3EGNvDRN3qeknkzseCrvY zeK1xgAkHmXFyTY2kK3wOWnnPhJ9oJ8SzlvikRiJGWYsbckfAYVh8/y8HeEuYUxo04cwYWedXgWAN P3eB2lc9moAEIjaA/R4BBoL9Fr/+Lp3ohaepcdHW8I36dmyYK80E9BsYByrE8+7Hn+Zo=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lQVM2-0002Dy-MZ; Sun, 28 Mar 2021 15:21:24 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#47391: 27.2; static list return from function and nconc References: <87r1k32sir.fsf@hm.sivalik.com> X-Now-Playing: Bobbie Gentry's _The Girl From Chickasaw County (5): Touch 'Em With Love_: "God Bless the Child" Date: Sun, 28 Mar 2021 15:21:21 +0200 In-Reply-To: (Stefan Monnier's message of "Thu, 25 Mar 2021 11:58:48 -0400") Message-ID: <87lfa75s8e.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: >> Does the attached patch fix the bug you see? > > I pushed another one instead which avoids `nconc` instead of trying to > allow it. I guess this means that this bug has been fixed? So I'm closing this report now. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47391 Cc: Gregory Heytings , 47391@debbugs.gnu.org, Rajeev Narang 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: -1.0 (-) Stefan Monnier writes: >> Does the attached patch fix the bug you see? > > I pushed another one instead which avoids `nconc` instead of trying to > allow it. I guess this means that this bug has been fixed? So I'm closing this report now. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 28 09:21:38 2021 Received: (at control) by debbugs.gnu.org; 28 Mar 2021 13:21:38 +0000 Received: from localhost ([127.0.0.1]:45564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQVMH-0004RP-U6 for submit@debbugs.gnu.org; Sun, 28 Mar 2021 09:21:38 -0400 Received: from quimby.gnus.org ([95.216.78.240]:55520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQVMG-0004R5-SV for control@debbugs.gnu.org; Sun, 28 Mar 2021 09:21:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=w9gNkyUxN8jH7Xt75OrDJdpOIwBWF0B7Afu1UbDS7w8=; b=tpl/g0EBOIcY7liQE5ao4NxHmz wy4A7YMgWAtcvC7CBP6HiGzUH6sSxolAbSx1EJaCp/OU8KMQIvHOwZ5FGtrdCA9A9f17rotOTWZ3c 51dfUV+EwWejgiKYsNMMvLZ7g8G60yktV2EBOUExhypkjyemiydJAsaJicoTkVuUry9E=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lQVM9-0002E5-BT for control@debbugs.gnu.org; Sun, 28 Mar 2021 15:21:31 +0200 Date: Sun, 28 Mar 2021 15:21:28 +0200 Message-Id: <87k0pr5s87.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #47391 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 47391 fixed close 47391 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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: -1.0 (-) tags 47391 fixed close 47391 28.1 quit From unknown Wed Jun 18 23:05:08 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, 26 Apr 2021 11:24:09 +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