From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
Received: from mp12.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 6IusJY2EbGQUWgEASxT56A
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Tue, 23 May 2023 11:17:01 +0200
Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp12.migadu.com with LMTPS
	id KDdsJY2EbGSyYQAAauVa8A
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Tue, 23 May 2023 11:17:01 +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 5B3C817AE6
	for <larch@yhetil.org>; Tue, 23 May 2023 11:17:01 +0200 (CEST)
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-orgmode-bounces@gnu.org>)
	id 1q1O7y-0002p7-UU; Tue, 23 May 2023 05:16:23 -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 <uselpa@gmail.com>) id 1q1O7x-0002mN-Dt
 for Emacs-orgmode@gnu.org; Tue, 23 May 2023 05:16:21 -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 <uselpa@gmail.com>) id 1q1O7v-000319-8q
 for Emacs-orgmode@gnu.org; Tue, 23 May 2023 05:16:21 -0400
Received: by mail-ed1-x532.google.com with SMTP id
 4fb4d7f45d1cf-510b56724caso1155333a12.1
 for <Emacs-orgmode@gnu.org>; Tue, 23 May 2023 02:16:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1684833377; x=1687425377;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=SfhYnw7whxrQ8giz9tOdXvtN0qXR32o/EYUBxX+6XyQ=;
 b=cBy0w/OpKSa4vK9Sy1dKxeMx9tJv9RDXqY7KpQL8eZUSGWNV/jQ1sC46hMiDbU8rAc
 jek8kZ9e1SH0xxQmS4R4/ktRH7Bz+00pNfz3t+YC48lnmA5Mgi9BPOTda/RDAJL3/HTP
 LTyhWBP+6LhI2QU7wajr5gXwWkvT6giMi2zmiCBpDmSaSN1vnGc/+0JYf4gzrp6Uqqqj
 OkDwKAKPtC3onSgow2SFuJcVTKH45BwJR1OiAY+T8LDFVAEvjjtUV8SE0c6he7CLiSvV
 BGnmw0AE0/ULP9TY7gnMWCQ4Km/aXcSu6rfkSch4+r+tzFtM6otr0QoWLYwoNZyVXcNk
 OkUw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1684833377; x=1687425377;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=SfhYnw7whxrQ8giz9tOdXvtN0qXR32o/EYUBxX+6XyQ=;
 b=glyitZkAq6bbyMaGthKSnV3DKlE8uMXeJC206XZDIvmXxl9Ar+U/ZMH3tVEjVn+a7U
 Sblu54uFR6bo7KvCv5KBiXILwsCguAPoow0QFgNc7RaSMq9Wt8KUIhWfQlxoFVQtq0T1
 OzL6tjFexgBUNN/N5jBfnDYhJGNzvdvIkgA8rid+RM+VSF3mOLH75POhTOGqsLt14mOw
 nfPwjSpbkZp0iSJFhWDAJtD9vLDiR95o5Mx+R3J7dPXfVTKr+g+t7hfVLbEGla4oWhnc
 hTzjZjNWu789RwZt89OxxTeitidNY4+uVCzHf4e0cN+zha0NxGgtQCJhYJAeTQYegN8/
 FmKA==
X-Gm-Message-State: AC+VfDxZWd9cxLHZQum5MtBY1WEL3rorAXjAs2Pa4fowKsbu6w37QVzX
 VvpeOksOwvIzrcHxKkU0uJNLYQsQJYu/5Uw1dHg=
X-Google-Smtp-Source: ACHHUZ4o5OEMjCYj+eYbFugLQTgwEq08lAeBy/YWfXQsfR82kbaP7w1vJRbrlif/G0+dyYuTa1zhhc6vogXs282QFGU=
X-Received: by 2002:a17:907:6e07:b0:96f:d04c:1d84 with SMTP id
 sd7-20020a1709076e0700b0096fd04c1d84mr6346376ejc.12.1684833377730; Tue, 23
 May 2023 02:16:17 -0700 (PDT)
MIME-Version: 1.0
References: <003261a7-5860-6580-d1ad-5ffd6b36c028@gmail.com>
 <87o7mfoup8.fsf@localhost> <5c5f8319-0fbf-ad3b-4d41-fea7ab922a4f@gmail.com>
 <87lehipyan.fsf@localhost>
In-Reply-To: <87lehipyan.fsf@localhost>
From: Patrick Useldinger <uselpa@gmail.com>
Date: Tue, 23 May 2023 11:15:51 +0200
Message-ID: <CANv=RK4+2Qd+ugX9mQdgsQo=_TGqOqczoAqKPTV7Y1Byf_c8oQ@mail.gmail.com>
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 <yantar92@posteo.net>
Cc: Emacs-orgmode@gnu.org
Content-Type: text/plain; charset="UTF-8"
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: -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." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=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=1684833421; a=rsa-sha256; cv=none;
	b=XXvo3HaBlJKva77p0acZL7eO1is8MBVav7bKZssZJAm6I6d5D5nKh58gk5RVuKWyWzKwdn
	B+1XuLyiVg2+irBYYJZzyqDD90dauA3tvdP3wBr8IMjN6HAali/pa7Kch5+2U8YPgKvCrN
	5PIfYV2p6/QOvDzMsA49W2RzI39rYLqgfJLb8ykOLiq+EGBv0fVVhzsG/wo05oyi6VGSKM
	0vyO4/Y2EflQelcyYQQ4najvAhw5p5ZSma0PmvWcnO3ELjoqdwNJV0sdy+QamlbrgH12ZK
	hlW/VktecOyiECuxe0aYOD4PI1EOJ/pDbE/7cvY2qb8FXqHAObmgj2NpgC6s0g==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=pass header.d=gmail.com header.s=20221208 header.b="cBy0w/Op";
	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=1684833421;
	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=SfhYnw7whxrQ8giz9tOdXvtN0qXR32o/EYUBxX+6XyQ=;
	b=cIg9t9/v7cxJOtqUpPi+e7L0wi1NS3BRRXDogwMH3j6kttcLDI2KJbR2LuOnTh6CPwwvTG
	zeuCzyLPWYzth0O5UOzyUpoBIYWJMIUlS3yYx4JgIxHPZMWvZi/FVsg2aHk5vWE+CH4b7F
	8Kw31liqq608DpzPLjgEVEaem9tJHevurJRLYzG8hr/+IFV1qx8/5LA39ZfnQnQ1KIVwea
	4NdFAjDU/BJk+nnv/SJ9TUr45NvmqFEDwa5fStoyr1V/DvnWZnpl2VryGAeBwpNMYmmgjx
	a3MgYNMHTMc3MTSVK1VIMYUM/1rQ5MrpbTPjphKdaJF2E9mPfYHEeQJVJsIMJw==
X-Migadu-Spam-Score: -8.13
X-Spam-Score: -8.13
X-Migadu-Queue-Id: 5B3C817AE6
X-Migadu-Scanner: scn0.migadu.com
Authentication-Results: aspmx1.migadu.com;
	dkim=pass header.d=gmail.com header.s=20221208 header.b="cBy0w/Op";
	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: zy/opzO+37n5

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

I have been able to create a minimal set of init.el and WORK.org which
allows me to reproduce the problem

1) start Emacs
2) F6 (shortcut for capture)
3) create a task in the capture buffer
4) press C-c C-q and enjoy the loop
5) C-g breaks the loop



--- WORK.org

;; -*- coding: utf-8 -*-
#+TODO: WAIT(w) TODO(t) DELG(d) | DONE(x)
#+STARTUP: show2levels hidestars nologrepeat
#+ARCHIVE: %s_archive::
* CAPTURE
** Regulars
*** TODO [#C] -- Empty CAP.org/CAPTURE
     SCHEDULED: <2023-05-26 Fri ++1w>
** Cap-X
** WAIT hello
            :test:
** DONE read "acceptable use"
    DEADLINE: <2023-05-19 Fri>

--- init.el


;; custom variables
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
  '(org-capture-templates
    '(("x" "Todo (test)" entry
       (file+olp "/Users/pu/Workcloud/org/WORK.org" "CAPTURE" "Cap-X")
       "* TODO %^{Task Description}" :prepend t)
      ("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))))

;; system-specific
(when (eq system-type 'darwin)
   (setq ns-alternate-modifier 'meta)
   (setq ns-right-alternate-modifier nil))

;; package: org
(add-hook
  'org-load-hook
  (lambda ()
    (define-key org-mode-map "\C-ca" 'org-agenda)
    (add-hook
     'org-agenda-load-hook
     (lambda ()
       (define-key org-agenda-mode-map "\M-p" 'org-agenda-backward-block)
       (define-key org-agenda-mode-map "\M-n" 'org-agenda-forward-block)))
    (global-set-key (kbd "<f6>") 'org-capture)))

(defun pu/options ()
   (interactive)
   (pu/option-org))
(add-hook 'window-setup-hook 'pu/options)

(defun pu/option-org ()
   (find-file "~/Workcloud/org/WORK.org"))