From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wAlHNYVZPF8LQwAA0tVLHw (envelope-from ) for ; Tue, 18 Aug 2020 22:43:17 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id CD/sMIVZPF/zHQAAbx9fmQ (envelope-from ) for ; Tue, 18 Aug 2020 22:43:17 +0000 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 2A4789404E0 for ; Tue, 18 Aug 2020 22:43:16 +0000 (UTC) Received: from localhost ([::1]:50338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8AK3-0008Qj-Vq for larch@yhetil.org; Tue, 18 Aug 2020 18:43:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8AJJ-0007x3-Cy for emacs-orgmode@gnu.org; Tue, 18 Aug 2020 18:42:29 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:34544) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k8AJH-0005V4-Bh for emacs-orgmode@gnu.org; Tue, 18 Aug 2020 18:42:29 -0400 Received: by mail-pl1-x632.google.com with SMTP id v16so291178plo.1 for ; Tue, 18 Aug 2020 15:42:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=felesatra-moe.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version; bh=j4dU+zjn433hsbxXww3R9KrN3ytq5hF1R3tkLeQX9jE=; b=xOfvknad4YYh05sD5UtJhAqeiKji9N0lvL/GxTX1llZ1A1gkZPq7lYrYiOt+MQ9v+X dWod+fS5RPUf97gnOH1hnwGI6WNfqBBouydGefa+shEkeKoYJqZrxtmPptiR1nD/huJJ HLitNCjQOa3LlmNxop+RQupgcGstYeeqHBwFYtHOTjs2wuhwKYCWoNjB8SjF7g+z1LW4 cBLhrUjrCu4jvp6ooosOBBLWQb0ItpLgmsQzHRNSqZWrCkTV7689rNuxASIDpS/+3dXO sPLK7hyiVkA5oAbILYEqG2PaYeOaipv112umOma+WXCvyq5RDjmBnqQE5jRt4sAUOgTX c2KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=j4dU+zjn433hsbxXww3R9KrN3ytq5hF1R3tkLeQX9jE=; b=ni111J39bywp0V+AtOwAftf+RlYP1oOZ4uHTBdRvMHA2Hkm9oxeKEPFSY78it+IeKE aMVumN9efN8xWo/ldpAScHtx2aklvVA5dYHfENnDxqr6vb1EHqo4YYjydOIB0uWO5xF7 vkcwjlkzX+m4d4AjSekHtb5MTss/TqmeewWaYrxTVMs6cyMfFpv5HLgmD9U1hEskwL2M /Lrse0HRw0JV1PPMK8Z88ouCwwH1wh1/vYhwbz6o+pISfQ2R16H72qFeAIwTJFaf4Jtx LfMyfTr4/fZDjQeG2F4F3GN72fCOfbSdlw+Ym640n58UK+qDekqatFGSnZpHam2pqhhu Q92Q== X-Gm-Message-State: AOAM531MWbthhy2r2pM5WxvlMhYwcJn6Dtc7XALbcrNryj8JB7xCjfL4 kwbkLqvV0oebOO0FYyYdBcuH2CuRWH8kArkf X-Google-Smtp-Source: ABdhPJwzYEe0HAnQ/CwjmmIWTZm2dWvphRzkyXXpykCTHGQ3nMVwNLQfKKYxbLIjNXiVYvVC70ZkNQ== X-Received: by 2002:a17:902:bcc6:: with SMTP id o6mr16809025pls.109.1597790545136; Tue, 18 Aug 2020 15:42:25 -0700 (PDT) Received: from localhost ([2600:1700:7270:7d1f:fa59:71ff:fe00:10cc]) by smtp.gmail.com with ESMTPSA id e3sm22824316pgu.40.2020.08.18.15.42.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Aug 2020 15:42:24 -0700 (PDT) From: Allen Li To: emacs-orgmode@gnu.org Subject: Bug: org-set-tags-command deletes inherited tags [9.3.7 (9.3.7-18-g093b47-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20200810/)] Date: Tue, 18 Aug 2020 15:42:23 -0700 Message-ID: <80a6yry3sg.fsf@felesatra.moe> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=darkfeline@felesatra.moe; helo=mail-pl1-x632.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=felesatra-moe.20150623.gappssmtp.com header.s=20150623 header.b=xOfvknad; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.21 X-TUID: 7ZrMwiCCMEeE --=-=-= Content-Type: text/plain Example Org file: * Parent :foo:bar:baz: ** Child :foo:bar:spam: Invoking org-set-tags-command with point on Child prepopulates the minibuffer prompt with only the tags :spam: This is because org-get-tags doesn't distinguish between inherited only tags and inherited tags which are also explicitly set on a heading, so org-set-tags-command treats :foo:bar: as inherited only rather than also set locally on the heading. This is undesirable because having tags set directly on a heading has different semantics even if they are also inherited (e.g., the TAGS special property, or when headings will be refiled to a different location later). Attached patch. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org.el-Don-t-exclude-local-tags-that-are-also-inheri.patch >From 934d65537e46c68c10edbfa2d7140cebfe89d271 Mon Sep 17 00:00:00 2001 From: Allen Li Date: Tue, 18 Aug 2020 15:34:38 -0700 Subject: [PATCH] org.el: Don't exclude local tags that are also inherited * lisp/org.el (org-set-tags-command): Don't exclude local tags even if inherited. --- lisp/org.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index fb95590fc..49d7d24f2 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -11880,9 +11880,7 @@ in Lisp code use `org-set-tags' instead." (org-global-tags-completion-table (org-agenda-files))) (or org-current-tag-alist (org-get-buffer-tags))))) - (current-tags - (cl-remove-if (lambda (tag) (get-text-property 0 'inherited tag)) - all-tags)) + (current-tags (org-get-tags nil t)) (inherited-tags (cl-remove-if-not (lambda (tag) (get-text-property 0 'inherited tag)) all-tags)) -- 2.28.0 --=-=-= Content-Type: text/plain Emacs : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.22) of 2020-08-11 Package: Org mode version 9.3.7 (9.3.7-18-g093b47-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20200810/) --=-=-=--