From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6HJtCq+B6WErjQAAgWs5BA (envelope-from ) for ; Thu, 20 Jan 2022 16:37:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id QCrpBq+B6WG4aQEAauVa8A (envelope-from ) for ; Thu, 20 Jan 2022 16:37:19 +0100 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 D38BD3454D for ; Thu, 20 Jan 2022 16:37:18 +0100 (CET) Received: from localhost ([::1]:44648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAZUz-0006W5-To for larch@yhetil.org; Thu, 20 Jan 2022 10:37:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAVpb-0003yN-LM for emacs-orgmode@gnu.org; Thu, 20 Jan 2022 06:42:23 -0500 Received: from [2a00:1450:4864:20::129] (port=42797 helo=mail-lf1-x129.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nAVpa-0000Hq-3k for emacs-orgmode@gnu.org; Thu, 20 Jan 2022 06:42:19 -0500 Received: by mail-lf1-x129.google.com with SMTP id y15so12275483lfa.9 for ; Thu, 20 Jan 2022 03:42:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=aMUVOtGDeSPdiCiUH8ITVK5rlw+5v4yhvnIRyviEDMI=; b=YcIiN5GoEOZumrpBHXqYM35joCRJBXnwEdZB/jEdCxHOlEcvmfIVA9FEjqAdbrBbbB AN8RfraPv+oumT+VSmYhEdlSZMPsJ/RlbWozoHbHxUAz0in6/YEmMnY8JA8T1JAVxISW cNbmuFjflSVPrYhzBHYXZZijGsI6JUtJA3ymZ8JXWxQAXpskyLlZ0wboHgdzCt4REM0I w2hNWhbocuwgA32IFEMrPrOzPFlThrdEdV08+fR4lMi5J/ENWUXIcuPsoDJBshp5egSB fJt3sddnnYtrN67/LkDFPqXDOosfVRUWMyszlFOh2pgcKK0rsh4A97vhOUb54KQodT+t Z9bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=aMUVOtGDeSPdiCiUH8ITVK5rlw+5v4yhvnIRyviEDMI=; b=rJvsAaH2LjCMzzRxYREt74DZVrYTjb1Ka0uh47dNfYneV5pmj2VhA1GOi+aGfaQkrn i4fAI7xbpj8EU0LFYOIug/paBCvtLm0tabOnZ5DMhUe2AexWQU7tJd1BeoCldEmJgxgB vQS4MVoC8Ql1zLzsslcdFEXg1Sx8eqDleyCacIXmJKzfGB3HMGjYGPETBGYIvnJSsDog 8RCQcph/2PjfE3wHXj12oNJ1t1XEp7zH0sCSBLHXCjwynQBFyT7DbcA38IKmb2PswnB3 aLRDAEfmpU1XjqkADwxnIYNXzMiMm3zDX466M4/0y0a/nbrqh5YOYbEmQMnhrYA5Zxop 3cQg== X-Gm-Message-State: AOAM530rkjP9xk5VK/YKslILXpJJUl6+YeucecFgfrHNSTBmWxDqJ8JE DxwUbZMJomKwmPNn6/HAjbqf4/c9v98X9GcKETPi4X520Ps= X-Google-Smtp-Source: ABdhPJzx0UB5DJx2H190jvGERrg48evLYoQNk5bWCMu+mF4igikUSGbFWOR3HYep4AcgjS9LudVgs8X8dWi1jONFGmE= X-Received: by 2002:a2e:91d2:: with SMTP id u18mr26552127ljg.354.1642678935356; Thu, 20 Jan 2022 03:42:15 -0800 (PST) MIME-Version: 1.0 From: Anders Johansson Date: Thu, 20 Jan 2022 12:42:04 +0100 Message-ID: Subject: [BUG] org-element-cache: The inherited property is set wrong To: org-mode-email Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::129 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=mejlaandersj@gmail.com; helo=mail-lf1-x129.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642693038; 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:dkim-signature; bh=aMUVOtGDeSPdiCiUH8ITVK5rlw+5v4yhvnIRyviEDMI=; b=sMuttgmGYeLrDUoS8ZNz0udTEnS7YZJXCGrcbUk8Oo0VXC/gxTS4+2gr2YXp9bGMStZoSN xjynZ3dRG4tPn0NCOFrcHH2I7k56QTXUfDnEXm4aWLTvkAOWqdpMGhCvUYY/SgWhvLRxKa j+Youqu+LulyUP3vxjRaJGqGt7bIBdykeqWi3K9P+9kEFp8yzuitDlOZtyJhkvvoRtwUj5 TsZ4Oc7nPZc1ZtzGCNZ2S1dvrfxSn12kgN22ciK7Qw5YxBWUUTuI3SbGzDCBEbiBdkxxXo Mv4+c9YJW+ai+yCDTAGm/bclC6w7dFlqPFxOsMVJK6cLU5+AIGpBtXfQkKg5Yg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642693038; a=rsa-sha256; cv=none; b=mZdJJPa7FUM7NIt8Y/vYxuZThAeAYYfgkTN5CecqRUjhscjg5+3dLQP5j+Njhb1BpmT91R bUu0yDZBVlzlg/q0pzHw3EvVow5I7COV4HiJsrH3OMNy01QzwMWYA8J60PcnzMaM6EQTq2 zEhN07w5DyTOy+rDvNhmp5GWZRppElwMRVJ/SlcbqE/2mWptP16gCExK3tThLw0EmcbjI/ 0ZIMVBWbqOGc7wIRexuadeP3R949yBSbfhqRVlUx0lfGj+HOSTx9j/Iy3eFQ2Zk8qq7Nra u93cK7RZo+R98PpiFlEYbz8f9DMmqRxpPAQt1T38BfgOgz9ouL2ieDzWpvyKsg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YcIiN5Go; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Spam-Score: -5.42 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YcIiN5Go; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Queue-Id: D38BD3454D X-Spam-Score: -5.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: ER74nvN0DNS3 Hi, I had some trouble with completing tags, where the already set tags were wrongly identified. I have dug this down to a problem with caching. with org-element-use-cache=3Dt and org-use-tag-inheritance=3Dt --- Org * headline 1 :tag1: ** headline 2 :tag2: --- end org When invoking org-set-tags-command (and quitting), on headline 1, then headline 2, then headline 1 again, "tag1" is no longer shown as one of the existing tags in the minibuffer. This is because it has erronously been assigned an :inherited property in the cache-representation for headline 1 when inherited tags were calculated for headline 2. This happens in org-get-tags, where inherited tags are parsed from the cache and given the :inherited property, but unfortunately this is done to the same string objects, so that this property is added in the cache tree both for the taglist of headline 1 and headline 2. (cl-copy-list cached-tags) is used there, but only copies the list and not the string objects. A solution that seems to work for me was to change (cl-copy-list cached-tags) to (mapcar #'copy-sequence cached-tags) (found it here: https://stackoverflow.com/a/47794586) I don=E2=80=99t know if this is the best solution though. Perhaps this is needed also in org--get-local-tags where a similar thing is done? (but only the fontification seems to matter there) Best, Anders Johansson (who is otherwise as mentioned in an earlier discussion very appreciative of org-element-cache)