From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 8I/YC6A2aWTXfwEASxT56A (envelope-from ) for ; Sat, 20 May 2023 23:07:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EDsOC6A2aWSCSwAAG6o9tA (envelope-from ) for ; Sat, 20 May 2023 23:07:44 +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 9BFEC35939 for ; Sat, 20 May 2023 23:07:43 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q0Tml-0001HF-IK; Sat, 20 May 2023 17:06:43 -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 1q0Tmk-0001Gr-48 for Emacs-orgmode@gnu.org; Sat, 20 May 2023 17:06:42 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q0Tmi-0006qK-1R for Emacs-orgmode@gnu.org; Sat, 20 May 2023 17:06:41 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-510d9218506so4286464a12.1 for ; Sat, 20 May 2023 14:06:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684616798; x=1687208798; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=fViiW/z0Xs3v7TkaDFspFOuHHO6ptGju714arXPr7PA=; b=kQPKAMSe8HN4v9Qwxcyx+Bedqmo6Ns4pYfpJKVQ0SHKc5fvr3US9FIjs3YR7S/6P+8 o+MWZtfDdhn9U3rWVkZIN/jWGynKojdd6K5WMoopKD6O/74Ou3XX9FSAoUew/41iNupv WjHTTkVgqaEtp9tZ5nSF+XRGvX+AYy/l7lXpWHWWKREkJnQmq3QooZA0st+33Gu1svDl UXtMJrT32zJYY10dgF4H2uesRELNd45V+w1JFIyyEE/633kwfmFbrFEx3oKQRdW9h17G altiO7+kL9qkXhDE7Z7AI7KbKjiiBfeKNKBeQt+UAfu3PtLHV48I5OFraXIrYw2j/L87 qm/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684616798; x=1687208798; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fViiW/z0Xs3v7TkaDFspFOuHHO6ptGju714arXPr7PA=; b=SWsZ8ETt51lwbl/NMJg2jpNf1qC60EfhOm3eWgp9q0bVqaK3yAU38uSeLKVTPTPofF q0KYScZhgTt9mSKqCPPglDGkAD2Jhop77yuK1KtD3i4BaEwLBYtWfmjGbJu6WdrQ/I1M /4ODWsvKW2X2kTYIMmd0WNnNj4PmM9oNQO+w0iGf4S18FHN23WoFTrac78SsbrBx6dkD q+lgKZM/Ljxu8KtiO/EliUagJga0MaK2VfSKc3GMyFoJ8otPEbupYR/vyQgxEJTC0jBv z2FP8+gvEEhm3aGsGhddqZftfDFqCCCzmZDHMHDi2iMoPIGBhh4y0yccWSV3tfEUrSoQ lopA== X-Gm-Message-State: AC+VfDztUQG1Ahk1gfJ6hIrjvCR7IBBPW2AsVaf39eG6F1j7Z3qnGwox Sgn/GikQDXDTXiT00uwtM0RxeEqBz7RfQA== X-Google-Smtp-Source: ACHHUZ4ZchFk7++O+lC9eyy23tsNSUGk2gDu/jNO0fW9Omx5gIllcRYxMBVBJwT+j+Zs1nbUegiYAw== X-Received: by 2002:a05:6402:128b:b0:50b:c56c:43d0 with SMTP id w11-20020a056402128b00b0050bc56c43d0mr6422778edv.1.1684616798338; Sat, 20 May 2023 14:06:38 -0700 (PDT) Received: from ?IPV6:2001:7e8:f813:d601:6930:7455:9b68:ca93? ([2001:7e8:f813:d601:6930:7455:9b68:ca93]) by smtp.gmail.com with ESMTPSA id m12-20020a1709060d8c00b0096b1206aa3fsm1127329eji.89.2023.05.20.14.06.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 20 May 2023 14:06:37 -0700 (PDT) Message-ID: <0da3d60f-e92c-77e9-3add-5e792f6bbdec@gmail.com> Date: Sat, 20 May 2023 23:06:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)] To: Ihor Radchenko Cc: Emacs-orgmode@gnu.org References: <003261a7-5860-6580-d1ad-5ffd6b36c028@gmail.com> <87o7mfoup8.fsf@localhost> <5c5f8319-0fbf-ad3b-4d41-fea7ab922a4f@gmail.com> <87lehipyan.fsf@localhost> Content-Language: en-US From: Patrick Useldinger In-Reply-To: <87lehipyan.fsf@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=uselpa@gmail.com; helo=mail-ed1-x532.google.com X-Spam_score_int: -36 X-Spam_score: -3.7 X-Spam_bar: --- X-Spam_report: (-3.7 / 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, NICE_REPLY_A=-1.597, RCVD_IN_DNSWL_NONE=-0.0001, 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1684616864; a=rsa-sha256; cv=none; b=i36u+cBFxPg3TWWm74k/fmMxVaRAGjyZl87Nbn5aLOKv4TLZVwzMfzbP3WUY1cyJ3lwa+5 dwBXqSMuq0QaeryxtA2HZJY8tXTuRypPsAce6NBEoQvcMtlp8eQZCVpNX7hQW6O9A40jdt 557boqrrI2d6C2eAK6wq4DCZiIVtWi/WBZm6/ZpvmJSbCwInrNJzuz4iJCi1DBKlXveZmU sj+1QluYjKn6Vm3y8pxV3Sy1Ijd91VWLD14DyNFK6Rd1Cdc0obvsFUfcaeekfPYrQZcmrY T3D0Qf1fNZas5xb5zl8R+oXGtvTyhVTk4pxVWkvDRda2PoX0DRhl/DRIKqN7Zg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=kQPKAMSe; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1684616864; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=fViiW/z0Xs3v7TkaDFspFOuHHO6ptGju714arXPr7PA=; b=u4ClTgckjKgqXz/0JoRwatZ/IXlxugUxg5QVnY9UQPU2x8k8Lvk5qorhReDO3s2ItNsJus 1nD1YauFUbdH7ZnOfVNC9suRwVQeSjnD0OSKkgF1i5CCa+c0gN209nrt508DvhjdSlpiKI bcoQsbf6/y5bE0sSdsgXag0HbbRgQWQUmruTiQoApQ/95KK1VwUo62wnlSIMqobMFnlg8o +hvIV77dRMNfZKTyKbR+0q58FpGXIVIN3et8j9oKQI6/1jdna7PDcEBeX6Bi5rEiA3UdQE GojRoUpngwOhjGuuKEly1jftin4U4y14qN4BvWeu05VFyQKo2si6gVACKYm1Rg== X-Migadu-Spam-Score: -6.65 X-Spam-Score: -6.65 X-Migadu-Queue-Id: 9BFEC35939 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=kQPKAMSe; 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-TUID: vMmN4wT4tGwn On 20/05/2023 22:01, Ihor Radchenko wrote: > You can try to bisect your config to identify which part is triggering > the problem. See > https://list.orgmode.org/orgmode/87ee2nlslt.fsf@localhost/ and > https://github.com/Malabarba/elisp-bug-hunter > bug hunter hasn't helped at all, maybe I've missed something, will have to try again later. I tried to profile the loop though: CPU (1 core is running at 100% for Emacs during the loop) 1671 83% - command-execute 1666 82% - call-interactively 1666 82% - funcall-interactively 1442 71% - org-set-tags-command 1442 71% - org-get-buffer-tags 1111 55% - org-element-cache-map 670 33% - org-element-at-point 124 6% - org-element--parse-to 8 0% org-element--cache-find 2 0% # 2 0% org-element--cache-active-p 4 0% org-element--cache-active-p 1 0% org-element--cache-verify-element 89 4% - org-element--parse-to 8 0% + org-element--cache-find 3 0% # 1 0% org-element--cache-active-p 138 6% - counsel-M-x 130 6% - ivy-read 25 1% + read-from-minibuffer 6 0% + ivy-call 4 0% + ivy--reset-state 8 0% counsel--M-x-externs 78 3% + org-capture 8 0% + org-capture-kill 4 0% autoload-do-load 301 14% - ... 301 14% Automatic GC 20 0% + vc-menu-map-filter 11 0% + timer-event-handler 1 0% and 1 0% + substitute-command-keys 1 0% + not 1 0% keymap-canonicalize 1 0% + redisplay_internal (C function) MEM 202,905,419 99% - command-execute 202,751,140 99% - call-interactively 202,751,140 99% - funcall-interactively 186,430,734 91% - org-set-tags-command 186,422,494 91% - org-get-buffer-tags 186,418,350 91% - org-element-cache-map 95,156,424 46% + org-element-at-point 63,785,615 31% - org-element--parse-to 15,743 0% make-closure 14,532 0% org-element--cache-active-p 14,532 0% buffer-base-buffer 14,532 0% plist-get 1,211 0% re-search-forward 1,048 0% # 7,216 0% + org-get-tags 1,024 0% + org-back-to-heading 6,698,223 3% - org-capture 5,982,622 2% + org-capture-place-template 503,607 0% + org-capture-fill-template 187,110 0% + org-capture-select-template 17,688 0% + org-capture-set-target-location 1,024 0% org-capture-set-plist 5,410,654 2% - counsel-M-x 5,337,470 2% - ivy-read 3,440,528 1% + ivy-call 1,620,889 0% + read-from-minibuffer 256,598 0% + ivy--reset-state 1,024 0% + ivy--update-prompt 73,184 0% + counsel--M-x-externs 4,211,529 2% - org-capture-kill 4,211,529 2% + org-capture-finalize 153,127 0% + autoload-do-load 622,776 0% + vc-menu-map-filter 372,645 0% + substitute-command-keys 116,585 0% + redisplay_internal (C function) 46,392 0% + timer-event-handler 12,300 0% + assq 9,208 0% + not 4,144 0% keymap-canonicalize 1,936 0% + org-at-timestamp-p 1,152 0% + org-at-table-p 1,024 0% kill-this-buffer-enabled-p 1,024 0% and 1,024 0% org-at-heading-p 1,024 0% + require 21 0% + # 0 0% ... I don't see much interaction with anything outside of org-mode. There's some ivy and counsel, but I uninstalled them and that didn't solve the problem. For comparison, here's with the element cache disabled: CPU 343 91% - command-execute 336 89% - call-interactively 336 89% - funcall-interactively 173 46% - counsel-M-x 165 43% - ivy-read 53 14% - read-from-minibuffer 14 3% - ivy--queue-exhibit 14 3% - ivy--exhibit 14 3% - ivy--update-minibuffer 7 1% + ivy--filter 7 1% + ivy--format 2 0% + substitute-command-keys 1 0% and 6 1% + ivy-call 2 0% + ivy--reset-state 8 2% counsel--M-x-externs 78 20% - org-capture 43 11% - org-capture-fill-template 38 10% - org-completing-read 38 10% - apply 38 10% - completing-read 38 10% - ivy-completing-read 38 10% - ivy-read 6 1% + read-from-minibuffer 2 0% + org-mode 31 8% + org-capture-select-template 2 0% + org-capture-set-target-location 2 0% + org-capture-place-template 45 11% - org-set-tags-command 40 10% - completing-read-multiple 14 3% - read-from-minibuffer 1 0% + timer-event-handler 1 0% org-get-buffer-tags 40 10% - org-capture-finalize 29 7% - save-buffer 29 7% - basic-save-buffer 29 7% - basic-save-buffer-1 29 7% - basic-save-buffer-2 28 7% - write-region 28 7% - select-safe-coding-system 27 7% find-coding-systems-region 1 0% auto-coding-alist-lookup 11 2% + org-capture-store-last-position 4 1% autoload-do-load 32 8% - ... 32 8% Automatic GC 1 0% + redisplay_internal (C function) MEM 97,045,311 99% - command-execute 96,891,032 99% - call-interactively 96,891,032 99% - funcall-interactively 84,247,208 86% - org-capture-finalize 79,980,939 82% - save-buffer 79,980,939 82% - basic-save-buffer 79,966,010 82% - basic-save-buffer-1 79,966,010 82% - basic-save-buffer-2 79,557,559 81% - write-region 79,557,559 81% - select-safe-coding-system 79,485,867 81% - find-coding-systems-region 3,456 0% + sort-coding-systems 395 0% copy-sequence 54,312 0% + find-auto-coding 17,380 0% auto-coding-alist-lookup 14,929 0% + vc-after-save 1,828,137 1% + kill-buffer 589,419 0% + org-capture-store-last-position 15,408 0% + org-update-parent-todo-statistics 1,024 0% + org-back-to-heading 1,024 0% org-update-checkbox-count 6,539,717 6% - org-capture 5,931,471 6% - org-capture-place-template 3,900,777 4% delete-other-windows 1,871,642 1% - org-switch-to-buffer-other-window 1,871,642 1% - apply 1,871,642 1% + switch-to-buffer-other-window 105,652 0% + org-capture-mode 43,240 0% + org-capture-place-entry 10,120 0% + org-fold-show-all 411,724 0% + org-capture-fill-template 172,710 0% + org-capture-select-template 20,760 0% + org-capture-set-target-location 1,024 0% org-capture-set-plist 5,853,892 6% + counsel-M-x 250,215 0% + org-set-tags-command 148,983 0% + autoload-do-load 174,845 0% + redisplay_internal (C function) 0 0% ... I appreciate your input and your time. Given that it works perfectly when I file the captured input under a level 1 heading I might just leave it at that. Regards, -Patrick