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 YI6pF3LfQF/0VwAA0tVLHw (envelope-from ) for ; Sat, 22 Aug 2020 09:03:46 +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 CN1cE3LfQF+5MQAAbx9fmQ (envelope-from ) for ; Sat, 22 Aug 2020 09:03:46 +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 8E02394050F for ; Sat, 22 Aug 2020 09:03:45 +0000 (UTC) Received: from localhost ([::1]:49034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9PR9-0002Ok-Ky for larch@yhetil.org; Sat, 22 Aug 2020 05:03:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k9PQo-0002OO-7U for emacs-orgmode@gnu.org; Sat, 22 Aug 2020 05:03:22 -0400 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]:38258) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k9PQm-0003uT-4g for emacs-orgmode@gnu.org; Sat, 22 Aug 2020 05:03:21 -0400 Received: by mail-ot1-x329.google.com with SMTP id q9so3472028oth.5 for ; Sat, 22 Aug 2020 02:03:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=felesatra-moe.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DYskBziaKnUlrkH3/oPXauCPIPfX/eYZnykXTjEhUIY=; b=0QWER80HgiU4oghrivH7E37gAJkDBf1CMGLLuVTms4mz3K03WpVqQgCm0wKHHucJvJ lp8o0AGZAI9DBLT682bV4FQaHHrWwdC6a8SO0jSsKPrTAcxQIw5Um6OFsktrIOrkdFwR kYDfLhpOoAfia0lTiudWqS2wa4H+286RRMfRNyIjw+c7uBXZ0v8lLPvr7CKWhj5mcGos O4F9X8Yd0bFTpao4HO36O1GEsVAr/t89/nfCXCUrCHa+slqRuAWVADKUHq+HNlroddsE gCiP2Ff8ylZlSPbWx2OBHyv8B4Bi3cw7/TUOjn8Olg2po7izZJVNy/osbbeBYUXDyBSa XMhQ== 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; bh=DYskBziaKnUlrkH3/oPXauCPIPfX/eYZnykXTjEhUIY=; b=X8pOAUAyMsmk7ZK6idTptGO6g9LfLg3e2e51xRsBPqnUaQGCSz3NMhJVU0N5uvDrJ2 wcAT7e+kvjfFSQJn0f+Qd4ZWHBmVCom4FmLurPChE8MrfDxQuBiyz/fpr0R4NAeHn/YE lDT6Vn1QHH1ofCa11fdcJj6vtgHcHZGu9cAF8BVeidrM2fr7K4345+4+lp+ncm6h9ai8 gu+foZiKeHwnhL7SL7vpSrPv0VxqvvJlJq30THolqZmzRXB41k4IZanH4HcMoBbNxFCv 4DCKyJsInwXoIElCt28JsyHDvUG0uIiLraoygegX5Pcn9O8fO8QTno4onor1V1+15JzK WJvQ== X-Gm-Message-State: AOAM531Kuc7V3hS7idmS28CivUVQupxbWKVCFxaBmMXJ5cYR2RRLlJ3p R1aBcZixVvTfjQJMGwOctypYzPribTKq8uVLXqUCksUuSALz+Q== X-Google-Smtp-Source: ABdhPJw5K1pKU1grcgLG4J43P1iacyrCe6v3lIvuqc4R85sUbQ86lT+mjd7yQDqBAyetccbzHCPw+z1TyQWzUBn25Hg= X-Received: by 2002:a9d:604c:: with SMTP id v12mr4534011otj.301.1598086998258; Sat, 22 Aug 2020 02:03:18 -0700 (PDT) MIME-Version: 1.0 References: <80a6yry3sg.fsf@felesatra.moe> <87o8n7w8i7.fsf@kyleam.com> <805z9cxuje.fsf@felesatra.moe> In-Reply-To: <805z9cxuje.fsf@felesatra.moe> From: Allen Li Date: Sat, 22 Aug 2020 09:03:07 +0000 Message-ID: Subject: Re: 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/)] To: Kyle Meyer Content-Type: multipart/mixed; boundary="000000000000da2b3205ad739ff4" Received-SPF: pass client-ip=2607:f8b0:4864:20::329; envelope-from=darkfeline@felesatra.moe; helo=mail-ot1-x329.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: , Cc: Org Mode List 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=0QWER80H; 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: -0.11 X-TUID: KAarZO+2OH9T --000000000000da2b3205ad739ff4 Content-Type: text/plain; charset="UTF-8" On Fri, Aug 21, 2020 at 8:39 AM Allen Li wrote: > > Kyle Meyer writes: > > > That looks good as far as fixing the misbehavior you report. I wonder > > though whether there's a deeper org-get-tags issue here worth > > considering. Its documentation says > > > > ... the returned list of tags contains tags in this order: file > > tags, tags inherited from parent headlines, local tags. > > > > But it's not specified what happens when a tag is both local and > > inherited. The current implementation drops the local tag variant > > through its delete-dups call: > > > > (delete-dups > > (append (org-remove-uninherited-tags itags) ltags)) > > > > I would have expected the local tag to get priority here. If that were > > the case (e.g., something like below), that would also solve the issue > > you describe. > > > > Thoughts? > > That sounds reasonable, let me prepare a new patch. Attached new patch --000000000000da2b3205ad739ff4 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-org.el-Don-t-exclude-local-tags-that-are-also-inheri.patch" Content-Disposition: attachment; filename="0001-org.el-Don-t-exclude-local-tags-that-are-also-inheri.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_ke5fpztc0 RnJvbSAyNGMxYzljNDIzY2Q5MmQzMDcwMzNkNTZjYTA3NjkyYTIzZWFiMDg5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbGxlbiBMaSA8ZGFya2ZlbGluZUBmZWxlc2F0cmEubW9lPgpE YXRlOiBUdWUsIDE4IEF1ZyAyMDIwIDE1OjM0OjM4IC0wNzAwClN1YmplY3Q6IFtQQVRDSF0gb3Jn LmVsOiBEb24ndCBleGNsdWRlIGxvY2FsIHRhZ3MgdGhhdCBhcmUgYWxzbyBpbmhlcml0ZWQKClRo aXMgZml4ZXMgYSBidWcgaW4gc2V0LXRhZ3MtY29tbWFuZCBleGNsdWRpbmcgYSB0YWcgdGhhdCBp cyBib3RoIHNldApsb2NhbGx5IGFuZCBpbmhlcml0ZWQgZnJvbSB0aGUgaW5pdGlhbCBtaW5pYnVm ZmVyIGlucHV0IGJ5IG1vZGlmeWlu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bG9jYWwgdGFncy4KK3BhcmVudCBoZWFkbGluZXMs IGxvY2FsIHRhZ3MuICBJZiBhIHRhZyBhcHBlYXJzIG11bHRpcGxlIHRpbWVzLAorb25seSB0aGUg bW9zdCBsb2NhbCB0YWcgaXMgcmV0dXJuZWQuCiAKIEhvd2V2ZXIsIHdoZW4gb3B0aW9uYWwgYXJn dW1lbnQgTE9DQUwgaXMgbm9uLW5pbCwgb25seSByZXR1cm4KIHRhZ3Mgc3BlY2lmaWVkIGF0IHRo ZSBoZWFkbGluZS4KQEAgLTEyMzA2LDEyICsxMjMwNywxMyBAQCBJbmhlcml0ZWQgdGFncyBoYXZl IHRoZSBgaW5oZXJpdGVkJyB0ZXh0IHByb3BlcnR5LiIKICAgICAgICAgKGxldCAoKGx0YWdzIChv cmctLWdldC1sb2NhbC10YWdzKSkgaXRhZ3MpCiAgICAgICAgICAgKGlmIChvciBsb2NhbCAobm90 IG9yZy11c2UtdGFnLWluaGVyaXRhbmNlKSkgbHRhZ3MKICAgICAgICAgICAgICh3aGlsZSAob3Jn LXVwLWhlYWRpbmctc2FmZSkKLSAgICAgICAgICAgICAgKHNldHEgaXRhZ3MgKGFwcGVuZCAobWFw Y2FyICMnb3JnLWFkZC1wcm9wLWluaGVyaXRlZAotICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKG9yZy0tZ2V0LWxvY2FsLXRhZ3MpKQotICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGl0YWdzKSkpCisgICAgICAgICAgICAgIChzZXRxIGl0YWdzIChuY29u YyAobWFwY2FyICMnb3JnLWFkZC1wcm9wLWluaGVyaXRlZAorCQkJCQkgKG9yZy0tZ2V0LWxvY2Fs LXRhZ3MpKQorCQkJCSBpdGFncykpKQogICAgICAgICAgICAgKHNldHEgaXRhZ3MgKGFwcGVuZCBv cmctZmlsZS10YWdzIGl0YWdzKSkKLSAgICAgICAgICAgIChkZWxldGUtZHVwcwotICAgICAgICAg ICAgIChh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