From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.bugs Subject: bug#70524: [PATCH] Fix `map-elt` with `setf` for subplaces Date: Thu, 25 Apr 2024 14:49:22 +0200 Message-ID: <871q6tobe5.fsf@gmail.com> References: <87a5lji9bg.fsf@web.de> <9a68b4fc-55ee-41fc-aa2c-c69e9498aff0@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15535"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Michael Heerdegen , Stefan Monnier , 70524@debbugs.gnu.org To: okamsn@protonmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 25 14:50:16 2024 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 1rzyYK-0003rO-MZ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Apr 2024 14:50:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzyY4-0002Gq-KN; Thu, 25 Apr 2024 08:50:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rzyY1-00029f-Ev for bug-gnu-emacs@gnu.org; Thu, 25 Apr 2024 08:49:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rzyY1-0002pD-3p for bug-gnu-emacs@gnu.org; Thu, 25 Apr 2024 08:49:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rzyYH-0008Dn-Vc for bug-gnu-emacs@gnu.org; Thu, 25 Apr 2024 08:50:14 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Apr 2024 12:50:13 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70524 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70524-submit@debbugs.gnu.org id=B70524.171404940531511 (code B ref 70524); Thu, 25 Apr 2024 12:50:13 +0000 Original-Received: (at 70524) by debbugs.gnu.org; 25 Apr 2024 12:50:05 +0000 Original-Received: from localhost ([127.0.0.1]:60661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rzyY1-0008Ar-Bd for submit@debbugs.gnu.org; Thu, 25 Apr 2024 08:50:02 -0400 Original-Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]:52498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rzyXt-00089E-1u for 70524@debbugs.gnu.org; Thu, 25 Apr 2024 08:49:53 -0400 Original-Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-51abd9fcbf6so1576143e87.1 for <70524@debbugs.gnu.org>; Thu, 25 Apr 2024 05:49:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714049365; x=1714654165; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=6NlRdo9ZIoK+UQc2VonLNHt+oZ24xI56y+3sIDFZ5Nc=; b=ho3jiOOl1rGDTQCE/aGSqUmKHXrrWq2baTAvrJSEXOjBJsiK+wV8qujsk7nSHSJj5J Ky3oV6AAEXVn+f4Z0Kl4zmT0l96fCgcoUXh2isZEPPS/E1iCC6sOXHcBF3dW96QwS99Z ZDaRoAUwj7fYgKutsQrcTOd3Bg4QYLZwwC+0qilsPnRvMNg2C2Jdv0s3utyfzPX67RbH GqT2v4WaS9uM0fs2BwyqmI0XywFGREpBVAxEIH/uQLKUCBaAG1lI+NK+c2vfdGG3HeR4 JDRT9f/REynRBKWH04oQwOKxeltNG1KcpiQIxgLPF5VlQH/y63wQ6TDFjLJG7u8DU+6M Hj7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714049365; x=1714654165; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6NlRdo9ZIoK+UQc2VonLNHt+oZ24xI56y+3sIDFZ5Nc=; b=Vn7jCJKVsq8/4+R6QBns6196tUctYsx1BXjrWUPEXsaQqAW9PDSAhJDEu3oyk4Ulq6 sjXmSJN0rRURESH1XW4q3UezhQ5AE5mpvoAbEppYaha+angUJ/pPk7BdkgDDnKcIwhCf IIL9+8asxJUbktmOOBBkxnzEBR0pgJzLm6ydE2UEsItO6+/g1iVLrzaxD0SZ/AJrYrr7 Acl9DJYNe18QbatbYfBZZFLpTH0eO2ZkrZT7xsU/BbXvVMpPwSyQXp4LkqGyvNqSyY2D nGRyJBa18AJF5XMzevSSVRsD94AnL1vlqEesT1sOTLn+6yWGRSh7isJ/k5rIKf5lAp0S dTEQ== X-Forwarded-Encrypted: i=1; AJvYcCUDQJtVQs0TkhpAkaS3J4DNy+Vz0ja8iKLLndlzgKpC0NBzy4xaHMQVyBrQAzc3CiaYbZeZh5J16J4BLXTkNsj2KmUJ/wY= X-Gm-Message-State: AOJu0Ywo/0KmlkZa9p7lJyNmli0A0r+Exx17C2O7CCxb3xHtFjWPKJB4 VJtZdFFc23R7RT1PugQfGF22rxRi06kfYPygOoeDttcBSMExaixqWqBKug== X-Google-Smtp-Source: AGHT+IE9qblZs8P3ES+kBq+u6HUavsuaY5RNe2w8sSWhhN6qmfOcD1ei+jLMEpwHV0pyxpQqX+j8Sw== X-Received: by 2002:a05:6512:6cd:b0:51c:5570:f570 with SMTP id u13-20020a05651206cd00b0051c5570f570mr2014496lff.59.1714049364474; Thu, 25 Apr 2024 05:49:24 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8a87:ff00::6223]) by smtp.gmail.com with ESMTPSA id d18-20020a1709061f5200b00a587831c09fsm3521449ejk.186.2024.04.25.05.49.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 05:49:23 -0700 (PDT) In-Reply-To: <9a68b4fc-55ee-41fc-aa2c-c69e9498aff0@protonmail.com> (okamsn@protonmail.com's message of "Thu, 25 Apr 2024 01:59:36 +0000") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:283944 Archived-At: On Thu, 25 Apr 2024 at 01:59, okamsn@protonmail.com wrote: > I would have assumed that `aref` would work with subplaces. I am still > thinking of `setf` like a more flexible version of Python allowing > things like `my_list[0][0] = 27`. The right way to achieve this IMO would be the one indicated in bug#62068: (setq my-list (map-insert-in my-list '(0 0) 27)) (I believe I even had an implementation for it, but never submitted the patch.) If there's a reasonable way to make a bunch of nested setf's expand to this, I don't know. I guess it should be possible, but I'm also not sure it would be really convenient.