From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 0NVsCwgcYWSXHwAASxT56A (envelope-from ) for ; Sun, 14 May 2023 19:36:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aEV5CwgcYWRLAgEA9RJhRA (envelope-from ) for ; Sun, 14 May 2023 19:36:08 +0200 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 BE6BE16AC5 for ; Sun, 14 May 2023 19:36:07 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyFd2-00029Z-EF; Sun, 14 May 2023 13:35:28 -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 1pyFd0-00029B-L3 for emacs-orgmode@gnu.org; Sun, 14 May 2023 13:35:26 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pyFcy-0001zc-Se for emacs-orgmode@gnu.org; Sun, 14 May 2023 13:35:26 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 11ED424002A for ; Sun, 14 May 2023 19:35:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1684085723; bh=qyxtQ7W7dT+T/QBwki5Ps4lbJ9YFhQ88NkkliJiQVZQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=JOX1ohGbYm8DigOWAwuKJWZs+WPfRr9sHHHNPjJ9ChuobgJ1PakQqc57HUjZRdury Y8va8FVAtJrDQhLxLMlUd6CP1h/rxrLKBPuMWUtJFFNmPMdRn/mtRwDCM9X4HtKT27 drteUGppMTUvKvl8Ezf+2OqQ3A34QFYvUSA+QyTPdoZeUw+ZCAVhgjjnVR3k4hj2H7 xePiTcgd6ieCRRZ6d+QZ9cCN3aY6MoQrBfRnxHun8j7W9JOMH3GMJvL2paMzgZibLZ KjT9XuUFwX8/4D2cLQzaeQc2fHkGQ7o5cysJT2IKe1TcVbahYfzJjfeM46azAgki5+ PKUVefl3dS+JQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QK8lt1c3vz9rxP; Sun, 14 May 2023 19:35:22 +0200 (CEST) From: Ihor Radchenko To: "Christopher M. Miles" Cc: Org-mode Subject: Re: [PATCH] Re: Improve the performance of `org-set-tags-command` on large `org-tag-alist` In-Reply-To: <64611586.a70a0220.53db4.4151@mx.google.com> References: <878rds1xta.fsf@localhost> <87a5y8iiak.fsf@localhost> <645fc094.170a0220.4d545.38e1@mx.google.com> <87wn1cgjij.fsf@localhost> <64604168.170a0220.99926.5b4f@mx.google.com> <87lehrgwqn.fsf@localhost> <6460f5e3.630a0220.b9085.17d2@mx.google.com> <87ilcvdknx.fsf@localhost> <64611586.a70a0220.53db4.4151@mx.google.com> Date: Sun, 14 May 2023 17:38:44 +0000 Message-ID: <871qjiiziz.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1684085768; a=rsa-sha256; cv=none; b=cnXRh4DxclzrKKz6SdLBaAGYwsuez3rDR3+DXnt0ifi/KSv7Q216KEDmsvfNTJp7JO/xp4 m2jnz8DP/A9Kl4Oh8kDAgaCPH4NtmHC4ROjhFv05kH0xTUU2ZJ2vqeraUd+scr6X27whs2 hwB9bUlXC66/FpDV1T9am01v1S6faXuBx9kfZCE9dKbCouQNPrNFmUjGDO06YNtR+zeBd7 OOw5OT585q3RlO4By8Ta+P9qqx9WqnxDV/Xo1cD5pKbwi6UlSASop0U74DC/kQDiFfxACZ xfqXw64bg1M1LgOvyFYJmnc2LsIZjX/XJRLA/L72lNZ4pTqAhlwqYGt4i2ENiQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=JOX1ohGb; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1684085768; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=4VBV9e/XQ12TNzZLIqKJ2AHWWCIFFR4IKRjt92ln1Vk=; b=aGggfUCqY7TBKiBNaw/Xp5cbzOhbwntQVRlhpSFW7hyXlil3SObGhg/G09VGvUXGurT2mo OwMHTAb3fqKFIWhIn8I2ZMORxSKxLgW3+eFG5O57ZdYLpjgK9L7NT5SOjr0103Ou8Ql0gQ Thr541U/DJEHf5GRSM3BHmciQhpR3NwHcKxHGSvT/FRrpJy0OT64tfAn5zA0bXo3RWzc/r 912CcHXDdfOgCbAWzkYAidKcVoD6+xvxKmYjyy3CVIisxd8Ve/9KKuHZ6Z3u3BIaweVWt9 3pW/E+qfS1TjwkTt6KGPUCOHM/XnlzprETqubObUzwQo3N7EWIaYK5SlXMqzWQ== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=JOX1ohGb; dmarc=pass (policy=none) header.from=posteo.net; 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: -6.17 X-Spam-Score: -6.17 X-Migadu-Queue-Id: BE6BE16AC5 X-TUID: +1QKX8IPqA4T "Christopher M. Miles" writes: >>> #+begin_src emacs-lisp >>> (let ((bound-tags (seq-filter 'cdr temp-fulltable))) >>> (if (length> bound-tags 0) >>> bound-tags >>> (seq-take temp-fulltable 26))) >>> #+end_src >> >> This will unconditionally drop auto-labeled tags when user-bound tags >> exist, even if the total number of tags in buffer does not exceed 26. > > I try to read the source code of `org-fast-tag-selection', but the code is hard to read. Yeah. I agree. But we have what we have. > I don't know how to keep auto-labeled tags. Do you have any suggestions? You are almost there. Just run your code only when (lentgh> fulltable 26). Of course, 26 should be a defcustom rather than a hard-coded constant. And do the same for `org-fast-todo-selection'. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at