From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 4JubM+NKpF5BfgAA0tVLHw (envelope-from ) for ; Sat, 25 Apr 2020 14:36:19 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id IIP+K+pKpF4WagAA1q6Kng (envelope-from ) for ; Sat, 25 Apr 2020 14:36:26 +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 201FD94334B for ; Sat, 25 Apr 2020 14:36:25 +0000 (UTC) Received: from localhost ([::1]:38332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSLup-0004L1-KF for larch@yhetil.org; Sat, 25 Apr 2020 10:36:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42608) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSLuD-0004Kr-9z for emacs-orgmode@gnu.org; Sat, 25 Apr 2020 10:35:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSLuC-0004zN-U9 for emacs-orgmode@gnu.org; Sat, 25 Apr 2020 10:35:45 -0400 Received: from [183.249.128.92] (port=9961 helo=dark.localdomain) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSLte-0004Sg-Ga for emacs-orgmode@gnu.org; Sat, 25 Apr 2020 10:35:44 -0400 Received: by dark.localdomain (Postfix, from userid 1000) id CB10C241A10; Sat, 25 Apr 2020 22:34:57 +0800 (HKT) References: <87y2qkqaxj.fsf@gmail.com> <87pnbwhudn.fsf@nicolasgoaziou.fr> User-agent: mu4e 1.4; emacs 28.0.50 From: stardiviner To: Nicolas Goaziou Subject: [SOLVED] Re: org-set-tags function will overwrite original tags when use it pragmatically In-reply-to: <87pnbwhudn.fsf@nicolasgoaziou.fr> Date: Sat, 25 Apr 2020 22:34:54 +0800 Message-ID: <87sggrr5v5.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: softfail client-ip=183.249.128.92; envelope-from=numbchild@gmail.com; helo=dark.localdomain X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/25 10:34:58 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Received-From: 183.249.128.92 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: , Reply-To: numbchild@gmail.com Cc: Org Mode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 X-Spam-Score: 1.59 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=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-Scan-Result: default: False [1.59 / 13.00]; HAS_REPLYTO(0.00)[numbchild@gmail.com]; GENERIC_REPUTATION(0.00)[-0.5601543738578]; DWL_DNSWL_BLOCKED(0.00)[209.51.188.17:from]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; FREEMAIL_FROM(0.00)[gmail.com]; REPLYTO_ADDR_EQ_FROM(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; RCPT_COUNT_TWO(0.00)[2]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[larch=yhetil.org]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[numbchild@gmail.com,emacs-orgmode-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; URIBL_BLOCKED(0.00)[nicolasgoaziou.fr:email,stardiviner.github.io:url]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_REPLYTO(0.00)[gmail.com]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.20), country: US(-0.00), ip: 209.51.188.17(-0.56)]; HAS_LIST_UNSUB(-0.01)[]; MIME_TRACE(0.00)[0:+]; FORGED_SENDER_MAILLIST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none] X-TUID: FxIy55joJs9+ =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Nicolas Goaziou writes: > Hello, > > stardiviner writes: > >> I use function ~org-set-tags~ pragmatically like this: > > [...] > >> But I found a problem, it will overwrite original tags. It's not appendi= ng method. > > Well, it is expected according to its docstring, isn't it? > >> I hope this function can be improve to suitable for this purpose. What a= bout and >> optional argument of this function to decide overwrite or append >> method? > > I think=20 > > (org-set-tags (cons "LOG" (org-get-tags nil t))) > > is enough. No need to add arguments. This is great, thanks, Nicolas. =2D --=20 [ stardiviner ] I try to make every word tell the meaning what I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 =20=20=20=20=20=20 =2D----BEGIN PGP SIGNATURE----- iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl6kSo4UHG51bWJjaGls ZEBnbWFpbC5jb20ACgkQG13xyVromsP1rwgAg+zG8LIWq8W87pCLFqS6BHH+y4Zy zHMGpYUmIIfsLXrhDWyJCaEnABNICq7zTZV1Qa3UNt7vR5kapp7GuBzdFefcVjjx +QPG19YUDRD2Xr6U6MrJxXrvLBXcawsemZ+5eAJTC9oD6P38iCXvDO0r7rtBXYvd /OBiKw+Oih7Vlr0wqTAbBO2MKicPQmb8lhRQQlbUoy8SFN80dA3ih1bRsMfP2NX8 1knKruhi007WK2KVdAv90wa5m+FPHW2fLliz07QHv5b84YUOgK8I7UnRXr0wdwww IjmuWcF6iyOpysE5tHeGXZwugz0vgxDAayfHKsXwKuGVEczv2GGRzA62bQ=3D=3D =3DQRtm =2D----END PGP SIGNATURE-----