From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id qAIYEDse6mbsEwAAqHPOHw:P1 (envelope-from ) for ; Wed, 18 Sep 2024 00:26:35 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id qAIYEDse6mbsEwAAqHPOHw (envelope-from ) for ; Wed, 18 Sep 2024 02:26:35 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1726619195; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=awz9G9ghkKm973k2wuAs+LRAoHuKe+mSEvv/Gv5f7cg=; b=A3xYey1aE9ij6138aXOanrdNJgbeTiy4eDqzKxiHgSAYXhHG//jptRWdm2yz4pbexN//Td mH68ofcWJq9jgl6PUe/11yzIv6KazFHCXJOvyCTPY0WrtJJ84n9io4zIMod7uINuRR2iuk 2laaGd8TsFfNAUyApEodxSHeMH5HxopOavq8L+NYp9RgF9FXzloc8h5GiR9J/h+pSAhBho Hx6zIGGcCs3Al1jppT0nlpUcgy4TgYKK8o5iIaMzCQ5cfrUIVot+wQyJOpttb/jslkSGqV xWr4E2ufklGKkALOrstjzYEv8PWtVzrQh8tLSUbt2/UJlF36Wj3Kiq2KtmVIyQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726619195; a=rsa-sha256; cv=none; b=U4rrpfTLl5eihHAdh3yAL6IeCrQe/6o397/VdODbJdmx4eoLByFBG2h5UEjngx557T2pss bXKnBvfuKzHnWT+amnS0x0BnFG6P0DqsAq1KkkiqGVwgtE8wc2UcrFPDYQ3Axd8nNrrTTR Nw4EBKJausDpDoMUecJWsfEfX7Sl0ZJZlBR0xXJPp9kFkO6DiQ/k4W/1mD9gjwoJ2vw9+g YFlzg+/dI7sGyVBTyLdksl7XMAvXfyOEi3Y4W/XDP6bjFbGEfdrzjCPRqJC5FpUo4zDkfO /rZRbt+mXoCmdN4VmVzYJOy+M+JgIoO2xkHnJ2t51nDDB/8xbp3yf//gGhETUQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=none Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 09EB361F7F for ; Wed, 18 Sep 2024 02:26:35 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sqiVp-0005je-28; Tue, 17 Sep 2024 20:25:41 -0400 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 1sqiVk-0005jJ-N1 for emacs-orgmode@gnu.org; Tue, 17 Sep 2024 20:25:37 -0400 Received: from mail.w14.tutanota.de ([185.205.69.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sqiVh-0000Fz-36 for emacs-orgmode@gnu.org; Tue, 17 Sep 2024 20:25:35 -0400 Received: from tutadb.w10.tutanota.de (w10.api.tuta.com [IPv6:fd:ac::d:10]) by mail.w14.tutanota.de (Postfix) with ESMTP id D3FAF2268879 for ; Wed, 18 Sep 2024 02:24:58 +0200 (CEST) Date: Wed, 18 Sep 2024 02:24:58 +0200 (CEST) From: lra@phdk.org To: Emacs Orgmode Message-ID: Subject: [PATCH] Fixing a regression in org-persists ability to handle non-list container arguments. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.205.69.214; envelope-from=lra@phdk.org; helo=mail.w14.tutanota.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -6.50 X-Migadu-Queue-Id: 09EB361F7F X-Spam-Score: -6.50 X-TUID: +SJSh7Ew8jUG Hello org-mode mailing list Long time, first time. This is just a tiny patch fixing a regression in org-persist--find-index that was missed in the 95f77669e0 bugfix. It aff= ects calls to org-persist-read that don't use a list of containers, e.g. those in ox-latex's precompile function. I was having some issues getting the org-latex-preview branch to run smoothly when the xref-find-def trail led me to realize that it wasn't just my setup causing trouble. In the process of compiling a bug report I ended up fixing it on my end and thought I might as well send it your way and save sombody else the trouble. I took the liberty of clarifying a related comment that confused me a bit while working out the logic of the function. (This is just a quick fix of the specific regression, a more proper solution would probably move all the logic concerning container lists further up in the chain. However, actually doing something like rewriting o-p--normalize-container to achieve that is above my pay-grade. My experience writing elisp basically comes from writing a few advice-hacks to get stuff to do what I want, so feel free to reject and forget if you think this deserves a full treatment.) MWE running with -Q and org compiled from git (taken from the examples in org-persist documentation): =C2=A0 (let ((info1 "test") =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (info2 "test 2")) =C2=A0=C2=A0=C2=A0 (org-persist-register =C2=A0=C2=A0=C2=A0=C2=A0 `("Named data" (elisp info1 local) (elisp info2 lo= cal)) =C2=A0=C2=A0=C2=A0=C2=A0 nil :write-immediately t)) =C2=A0 (org-persist-read =C2=A0=C2=A0 "Named data" =C2=A0=C2=A0 nil nil nil :read-related t) Expected result: org-persist-read will return ("Named data" "test" "test 2"= ) Current result: it returns nil Kind regards, LRA P.S. Thank you all for all the hard work you put into this wonderful tool. It does not go unappreciated!