From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id +IfaIsTraGTWfwAASxT56A (envelope-from ) for ; Sat, 20 May 2023 17:48:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id IOHXIcTraGQCxgAAG6o9tA (envelope-from ) for ; Sat, 20 May 2023 17:48:20 +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 24C9C25F2A for ; Sat, 20 May 2023 17:48:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q0Oni-0003wX-Hl; Sat, 20 May 2023 11:47:22 -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 1q0One-0003wF-QY for Emacs-orgmode@gnu.org; Sat, 20 May 2023 11:47:20 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q0Onc-0003fP-H5 for Emacs-orgmode@gnu.org; Sat, 20 May 2023 11:47:18 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-510b56724caso3812196a12.1 for ; Sat, 20 May 2023 08:47:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684597634; x=1687189634; h=content-transfer-encoding:subject:from:content-language:to :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=5WQPI0AMnqtQJ/UUeAWFywxMR8AZBicA1GxkqCbOpBQ=; b=l+3v6dRov1g52VAsy1ERqbgVHTfeuroOTUX5bCev18YdHgCm4AiS6jwAC3nQPmXIOc zhImes1ISz2w2SDsc7hYNmR7TbdynQ53sNiNx52BhdhU2eEP59f1H/40XE16/VtBdQ+j ecsER2DXQyFpWoxojPteTY8PtGpdXiJhQ+oMq9JaqgvqyGXEgvFrVdD4yO5krZb1xTgt zULTiPehyKrlGIQusaiePV6hOGrjuPcGylYpwActOGxKHZ5NWL+Pzl+vnFu5RvU1HF6a GpfUZlON1Njy4SvmGe0j0yzEwX5KXuu3SIEgySdyJDq9liDtcBVinXSPJ27STMa0s8w4 GdSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684597634; x=1687189634; h=content-transfer-encoding:subject:from:content-language:to :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=5WQPI0AMnqtQJ/UUeAWFywxMR8AZBicA1GxkqCbOpBQ=; b=bgR/JL2vnm+ITCft5K/eaZgCkqNUmoEb8i4BoNXMvoNDgSUNBcSAqWpdGbn0iroKBl G3z4iDQi5STMiKrZ/tNvpH3/vuET6BonNWr4puOJjffSsNKBzcNXsnCmicZwXPaqnNvD GmTM3kkkSjPW+nQU/Cn/ddoiSI4nNop3itILvGhm+a4sSOXGOCGEyYoGXt8wi/9TuRdA xfX/DZdxmvvj1clH+3I0qOr5ARZZYHRj7g2d0Haf8eGCxQkDh92XSn/EQd7+52ZTDjis psjaMitpRhKjuGsJm++BUwmdqNxyDvm+sTMptk6McVbbh3pVhpbbvAztyPWj50YQzEMz CFeg== X-Gm-Message-State: AC+VfDwONZOBXj1rN6UY7Xlmfy+BjHuAXAfZgvmzP6l+Q14nrBcydSCX RtttUsz1upUXku9XZ7TLtB6RhxYhamLDvQ== X-Google-Smtp-Source: ACHHUZ52q5JLnxU/dRg1mW+bBLq2fTcZa9O6Ya6UUSe20khYgI2yfCSiIwzmZw9SwrbLBoJEZJETzg== X-Received: by 2002:a05:6402:11d1:b0:50d:bd2e:6fe3 with SMTP id j17-20020a05640211d100b0050dbd2e6fe3mr12839792edw.14.1684597634044; Sat, 20 May 2023 08:47:14 -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 x6-20020a1709065ac600b009663115c8f8sm910379ejs.152.2023.05.20.08.47.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 20 May 2023 08:47:13 -0700 (PDT) Message-ID: <003261a7-5860-6580-d1ad-5ffd6b36c028@gmail.com> Date: Sat, 20 May 2023 17:47:13 +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 To: Emacs-orgmode@gnu.org Content-Language: en-US From: Patrick Useldinger Subject: [BUG] org-capture, level-2 heading, org-set-tags-command [9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/)] Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=uselpa@gmail.com; helo=mail-ed1-x52b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1684597700; a=rsa-sha256; cv=none; b=hZzNRvE3FCln+AmO9L7YqJt3n6rCN49cahJQKbSiw17JBO0NATfrVzuC4iQJTSomnP073d 279KvFHO9DKkV5deEU8xigsUnYm13OL5YxaSNywMAKn26QUL8CVJrf5Doae7rYqQ7Yw+vp Bn0hJz5wW8YJ56WWtEJlLuV+/nNQwHmStc4ZCplHUPbqwWWubg35VAkoZIM+vRPBzGAq6Y YpA5w5Ze/DqyV9MR9Zv9tMPrZfMZ0QcUkrauBj1fh3LF4gVKGPPv3g1JdZqIcpNaHDdks6 sEXYgIwVf8YhoinlS0VSFjwfR/ngWtd3caTyQswxEgH3zI4iB7IMmwKNRs4cTw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=l+3v6dRo; 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=1684597700; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=5WQPI0AMnqtQJ/UUeAWFywxMR8AZBicA1GxkqCbOpBQ=; b=H6EFaCd08nW9daFwBJ9ROFnh2Df92e/bHlZJK8aKW9wrhq1ybyh4mzUSc9W+cbf46Kr2OF YHYFrzKKH58BwCc3tRZdd66BGSTI+lG8SwinaiaxZUQ3HprwXGZupjxdwuybkTxMRt+iu4 X/AK0R1N6A/ICOfLo5cBo7VTbQTv6O8bgHQu2NYefbe4BoB4h9tT0QPpD9YuD6gSfwkT12 iGYsPMWaTVhRO9lKi0/PsVsaAk+sT2fJnWDJwZ8Qe+oueWYT9uvgSzdo7Xwiw2s8aXplF/ kXl9GgNmy4fTjbzZJltDwbMOFb1mUco9XH/SR7NiAchPK4GQe40k+rJilxC+KQ== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=l+3v6dRo; 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-Migadu-Spam-Score: -4.85 X-Spam-Score: -4.85 X-Migadu-Queue-Id: 24C9C25F2A X-TUID: Kk8ZiFCveqM9 Hello I've come across what seems to be a bug in org-element-cache handling. To reproduce: 1) create a level 1 heading (in my case: "CAPTURE") and a level 2 heading (in my case: "CAPTURE-TEST") 2) create a similar template to file tasks under a level-2 heading: ("x" "Todo (test)" entry (file+olp "~/Workcloud/org/WORK.org" "CAPTURE" "CAPTURE-TEST") "* TODO %^{Task Description}" :prepend t) 3) create a task using this template (x) 4) while in the narrowed buffer, try to tag the task using C-c C-q (org-set-tags-command) This will hang. Pressing C-g helps you recover, the stack trace being Debugger entered--Lisp error: (quit) #f(compiled-function () #)() org-element--parse-to(77445) org-element-cache-map(#f(compiled-function (el) #)) org-get-buffer-tags() org-set-tags-command(nil) funcall-interactively(org-set-tags-command nil) call-interactively(org-set-tags-command nil nil) command-execute(org-set-tags-command) Disabling the cache with (setq org-element-use-cache nil) solves the problem. As does dropping "CAPTURE-TEST" in the template (i.e. putting the task under a level-1 heading instead of level-2). Relevant Reddit threat: https://www.reddit.com/r/orgmode/comments/13lwu2o/orgmode_starting_to_be_way_more_buggy/?s=8) HTH, -Patrick ------------------------------------------------------------------------ Emacs : GNU Emacs 28.2 (build 1, aarch64-apple-darwin22.4.0, NS appkit-2299.50 Version 13.3.1 (a) (Build 22E772610a)) of 2023-05-10 Package: Org mode version 9.6.6 ( @ /Users/pu/.emacs.d/elpa/org-9.6.6/) current state: ============== (setq org-link-elisp-confirm-function 'yes-or-no-p org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-agenda-custom-commands '(("q" . "PU's views") ("qq" "PU's view" ((todo "WAIT" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled)) (org-agenda-prefix-format '((todo . "")))) ) (todo "DELG" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled)) (org-agenda-prefix-format '((todo . "")))) ) (todo "TODO" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled)) (org-agenda-prefix-format '((todo . "")))) ) (agenda "" ((org-agenda-span 35) (org-agenda-prefix-format '((agenda . "")))) ) nil ("~/Workcloud/org/agenda.txt")) ) ) org-load-hook '((lambda nil (setq org-element-use-cache nil) (setq org-startup-with-inline-images t) (setq org-element--cache-self-verify-frequency 0.01) (setq org-hide-leading-stars t) (setq org-tags-sort-function 'org-string-collate-lessp) (setq org-priority-start-cycle-with-default nil) (setq org-refile-targets '((org-agenda-files :maxlevel . 9))) (setq org-outline-path-complete-in-steps nil) (setq org-log-into-drawer t) (setq org-reverse-note-order t) (setq org-return-follows-link t) (setq org-tags-column -90) (setq org-todo-keyword-faces '(("WAIT" :foreground "magenta") ("TODO" :foreground "red") ("DELG" :foreground "orange") ("DONE" :foreground "grey")) ) (setq calendar-week-start-day 1) (setq org-todo-fast-selection t) (setq org-ellipsis "……") (setq org-startup-indented nil) (setq org-adapt-indentation t) (setq org-deadline-warning-days 0) (setq org-todo-repeat-to-state "TODO") (if work (progn (define-key org-mode-map "a" 'org-agenda) (setq org-agenda-files '("~/Workcloud/org/WORK.org")) (setq org-agenda-skip-scheduled-if-done t) (setq org-agenda-skip-scheduled-if-deadline-is-shown t) (setq org-agenda-skip-scheduled-if-deadline-if-done t) (setq org-agenda-use-time-grid nil) (setq org-agenda-show-future-repeats nil) (setq org-agenda-start-with-follow-mode t) (add-hook 'org-agenda-mode-hook #'(lambda nil (define-key org-agenda-mode-map "\360" 'org-agenda-backward-block) (define-key org-agenda-mode-map "\356" 'org-agenda-forward-block)) ) (setq org-agenda-sorting-strategy '((agenda priority-down todo-state-up alpha-up) (todo priority-down todo-state-up category-keep) (tags priority-down category-keep) (search category-keep)) ) (setq org-agenda-custom-commands '(("q" . "PU's views") ("qq" "PU's view" ((todo "WAIT" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled)) (org-agenda-prefix-format '((todo . "")))) ) (todo "DELG" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled)) (org-agenda-prefix-format '((todo . "")))) ) (todo "TODO" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled)) (org-agenda-prefix-format '((todo . "")))) ) (agenda "" ((org-agenda-span 35) (org-agenda-prefix-format '((agenda . ""))))) nil ("~/Workcloud/org/agenda.txt")) ) ) ) (global-set-key (kbd "") 'org-capture) (setq org-capture-templates '(("t" "Todo (work)" entry (file+olp "~/Workcloud/org/WORK.org" "CAPTURE") "* TODO %^{Task Description}" :prepend t) ("n" "Note (work)" entry (file+olp "~/Workcloud/org/WORK.org" "CAPTURE") "* %^{Note Description}" :prepend t) ("x" "Todo (test)" entry (file+olp "~/Workcloud/org/WORK.org" "CAPTURE" "CAPTURE-TEST") "* TODO %^{Task Description}" :prepend t) ) ) ) ) ) ) org-log-into-drawer t org-agenda-skip-scheduled-if-done t org-agenda-files '("~/Workcloud/org/WORK.org") org-persist-after-read-hook '(org-element--cache-persist-after-read) org-refile-targets '((org-agenda-files :maxlevel . 9)) org-export-before-parsing-hook '(org-attach-expand-links) org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-archive-hook '(org-attach-archive-delete-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines org-cycle-optimize-window-after-visibility-change org-cycle-display-inline-images) org-persist-before-read-hook '(org-element--cache-persist-before-read) org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-fold-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-ellipsis "……" org-confirm-shell-link-function 'yes-or-no-p org-agenda-skip-scheduled-if-deadline-is-shown t org-adapt-indentation t outline-isearch-open-invisible-function 'outline-isearch-open-invisible org-tags-sort-function 'org-string-collate-lessp org-agenda-sorting-strategy '((agenda priority-down todo-state-up alpha-up) (todo priority-down todo-state-up category-keep) (tags priority-down category-keep) (search category-keep)) org-agenda-mode-hook '((lambda nil (define-key org-agenda-mode-map "\360" 'org-agenda-backward-block) (define-key org-agenda-mode-map "\356" 'org-agenda-forward-block)) ) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-elisp-link-function 'yes-or-no-p org-hide-leading-stars t org-deadline-warning-days 0 org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-fold-core-isearch-open-function 'org-fold-core--isearch-reveal org-persist-before-write-hook '(org-element--cache-persist-before-write) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-link-shell-confirm-function 'yes-or-no-p org-babel-pre-tangle-hook '(save-buffer) org-agenda-loop-over-headlines-in-active-region nil org-todo-keyword-faces '(("WAIT" :foreground "magenta") ("TODO" :foreground "red") ("DELG" :foreground "orange") ("DONE" :foreground "grey")) org-occur-hook '(org-first-headline-recenter) org-metadown-hook '(org-babel-pop-to-session-maybe) org-link-parameters '(("attachment" :follow org-attach-follow :complete org-attach-complete-link) ("id" :follow org-id-open) ("eww" :follow org-eww-open :store org-eww-store-link) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link :export org-irc-export) ("info" :follow org-info-open :export org-info-export :store org-info-store-link :insert-description org-info-description-as-command) ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("doi" :follow org-link-doi-open :export org-link-doi-export) ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell) ("news" :follow #[514 "\301\300\302Q\"\207" ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("mailto" :follow #[514 "\301\300\302Q\"\207" ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("https" :follow #[514 "\301\300\302Q\"\207" ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("http" :follow #[514 "\301\300\302Q\"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("ftp" :follow #[514 "\301\300\302Q\"\207" ["ftp" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("help" :follow org-link--open-help :store org-link--store-help) ("file" :complete org-link-complete-file) ("elisp" :follow org-link--open-elisp)) org-agenda-start-with-follow-mode t org-metaup-hook '(org-babel-load-in-session-maybe) org-todo-repeat-to-state "TODO" org-startup-with-inline-images t org-priority-start-cycle-with-default nil org-return-follows-link t org-outline-path-complete-in-steps nil org-tags-column -90 org-agenda-show-future-repeats nil org-reverse-note-order t org-agenda-use-time-grid nil )