From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id AHleKNjlO2Q/oQAASxT56A (envelope-from ) for ; Sun, 16 Apr 2023 14:11:04 +0200 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kO0dKNjlO2Sl7gAAauVa8A (envelope-from ) for ; Sun, 16 Apr 2023 14:11:04 +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 aspmx2.migadu.com (Postfix) with ESMTPS id CA7D839970 for ; Sun, 16 Apr 2023 14:11:03 +0200 (CEST) Authentication-Results: aspmx2.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=jAralDiP; spf=pass (aspmx2.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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681647064; 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=B+1a1Vi7yAZEOtxY/CjGYzRO7eogujNnnxTTV8u4wOc=; b=teH4/rbmfsf6tegB785csfiqevwpuU0qYvxQaeDWmICvnpfsPvb3Nb7IZSpMHSE/ql5EHS 72sRxtXBz8Dnv2r4Ys/8i9rvZF9ufO4Mdy1lRQbumqzOrCCvnmhS7X1OcEPU/VX91YLTNi TG3TJq0LuyW52Iuf/h92Vk7Ilsx6lvOtQLNLL6N8QhnfY8Ayaa8WlvGYYauri1vE1uprEz g8d3a1zGilpY9TuB7tUjqZDucZQpS+5bA/npbGH430sal9hceq/xvdjlfP6DVy797rTrzF G/Szi4dBOlvwfbHwmq7dnTursyP8GlBBRXcJ1RfOzVC9NMiXhXmUQLynItFWZw== ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=jAralDiP; spf=pass (aspmx2.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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1681647064; a=rsa-sha256; cv=none; b=JyOa3cVbb8fho1KTGKMV1gmFviOBk/sPJtEMMIZ5gNy7Cb36bQmB7tYrzs1RWEas9Sh+9n +aToqzwY4BoJ1LAw4KwTOkR0juSV4Q1Ltea8Ovje12CYsEFaQgmxYzQugOvU1ZwHtkN99H SHF+n4OCJ1ba2ClMNV9rLlIlICeVq86UXOQ6c194eY1N3KsfHUg5KnhBvkf8ZccsZxULzu nYzHsTX6IyEILCZMC7mn0anTwoqjuXy3LF2nklSVqXScdUPS7QxH4uYIvzp01lI5vlJEU0 oHJ4YosEhY/HNdYY3C8jJz50uwIUbpt71bU80BTv2KUfkSnUb+XyVrJquUwWPA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1po1Cn-0007rO-95; Sun, 16 Apr 2023 08:10:05 -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 1po1Cl-0007qz-1i for emacs-orgmode@gnu.org; Sun, 16 Apr 2023 08:10:03 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1po1Ci-0004ju-1k for emacs-orgmode@gnu.org; Sun, 16 Apr 2023 08:10:02 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B0031240168 for ; Sun, 16 Apr 2023 14:09:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1681646997; bh=RkeIcPOtDGdkRebbM2wt/sGzPcAnFRb2gSpTFLgR1Wc=; h=From:To:Cc:Subject:Date:From; b=jAralDiPacZ1kU94I74I2o3bzJhr/DVSuIJF4VxjIURk7SEcPVMgLaavXkKsvFgju QnHk4RRBHukFHy2+oT+dyzg0Ivu1JyT81UUSLXd97uFcGlGqgyyVr0xMBJPxZKbGZw QNj0oucUQs/DDaMQsJJgcaYwWuAWBmvQER0uvgdqpKgoqQoCKDN4r5b3LeUccMF77L PkpWDfJGZ44XVtwdK+QCWSrM58eX3oQaYFoS7MlR0Q3vm8gn+u386VBpqzi83l4eV2 i9KpWrzzWc60SQuC5V+ltMPQKObxqWj0nC+1ZhHXGgdvSq2vvEQYn1Tdko+pbkjVhl IJ53PeBLgjP1Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PzpsK1rb4z9rxG; Sun, 16 Apr 2023 14:09:57 +0200 (CEST) From: Ihor Radchenko To: Carlo Tambuatco Cc: Org-Mode Mailing List Subject: Re: [BUG] Org-9.6.x org templates hang on 'clipboard pasted as level 2 subtree'... In-Reply-To: References: <877cusauyq.fsf@localhost> <871ql0ar16.fsf@localhost> <230E1B66-880A-468E-BEB0-33A3C88858D1@gmail.com> <87y1n7ao17.fsf@localhost> Date: Sun, 16 Apr 2023 12:12:34 +0000 Message-ID: <87edokt499.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -6.20 X-Spam-Score: -6.20 X-Migadu-Queue-Id: CA7D839970 X-TUID: ZHc8NfjEObxi Carlo Tambuatco writes: > I restarted emacs with org 9.6.3 and reloaded it uncompiled and > did M-x toggle-debug-on-error to turn on backtrace on error. > > I have also attached a copy of what my org-capture-templates > variable looks like. > > Comparing these backtraces to my org-capture-templates, > you can see that only some of them fail (the ones corresponding to > 'd', 'e', 'r', 'Rr', 'Rg', and 'Cc') > > They all worked up until Org 9.6. They still work under Org 9.5.5, so > I don't know what changed. I tried your templates locally and I am not seeing any problem. May you try to reproduce starting from emacs -Q? Or, alternatively, try to use the following version of Org capture, use C-g to exit, and report the (hopefully) more detailed backtrace. (defun org-capture (&optional goto keys) "Capture something. \\ This will let you select a template from `org-capture-templates', and then file the newly captured information. The text is immediately inserted at the target location, and an indirect buffer is shown where you can edit it. Pressing `\\[org-capture-finalize]' brings you back to the \ previous state of Emacs, so that you can continue your work. When called interactively with a `\\[universal-argument]' prefix argument \ GOTO, don't capture anything, just go to the file/headline where the selected template stores its notes. With a `\\[universal-argument] \\[universal-argument]' prefix argument, go to \ the last note stored. When called with a `C-0' (zero) prefix, insert a template at point. When called with a `C-1' (one) prefix, force prompting for a date when a datetree entry is made. ELisp programs can set KEYS to a string associated with a template in `org-capture-templates'. In this case, interactive selection will be bypassed. If `org-capture-use-agenda-date' is non-nil, capturing from the agenda will use the date at point as the default date. Then, a `C-1' prefix will tell the capture process to use the HH:MM time of the day at point (if any) or the current HH:MM time." (interactive "P") (when (and org-capture-use-agenda-date (eq major-mode 'org-agenda-mode)) (setq org-overriding-default-time (org-get-cursor-date (equal goto 1)))) (cond ((equal goto '(4)) (org-capture-goto-target keys)) ((equal goto '(16)) (org-capture-goto-last-stored)) (t (let* ((orig-buf (current-buffer)) (annotation (if (and (boundp 'org-capture-link-is-already-stored) org-capture-link-is-already-stored) (plist-get org-store-link-plist :annotation) (ignore-errors (org-store-link nil)))) (entry (or org-capture-entry (org-capture-select-template keys))) initial) (setq initial (or org-capture-initial (and (org-region-active-p) (buffer-substring (point) (mark))))) (when (stringp initial) (remove-text-properties 0 (length initial) '(read-only t) initial)) (when (stringp annotation) (remove-text-properties 0 (length annotation) '(read-only t) annotation)) (cond ((equal entry "C") (customize-variable 'org-capture-templates)) ((equal entry "q") (user-error "Abort")) (t (org-capture-set-plist entry) (org-capture-get-template) (org-capture-put :original-buffer orig-buf :original-file (or (buffer-file-name orig-buf) (and (featurep 'dired) (car (rassq orig-buf dired-buffers)))) :original-file-nondirectory (and (buffer-file-name orig-buf) (file-name-nondirectory (buffer-file-name orig-buf))) :annotation annotation :initial initial :return-to-wconf (current-window-configuration) :default-time (or org-overriding-default-time (org-current-time))) (org-capture-set-target-location (and (equal goto 0) 'here)) (condition-case error (org-capture-put :template (org-capture-fill-template)) ((error quit) (if (get-buffer "*Capture*") (kill-buffer "*Capture*")) (error "Capture abort: %s" (error-message-string error)))) (setq org-capture-clock-keep (org-capture-get :clock-keep)) (org-capture-place-template (eq (car (org-capture-get :target)) 'function)) (when (and (derived-mode-p 'org-mode) (org-capture-get :clock-in)) (condition-case nil (progn (when (org-clock-is-active) (org-capture-put :interrupted-clock (copy-marker org-clock-marker))) (org-clock-in) (setq-local org-capture-clock-was-started (copy-marker org-clock-marker))) (error "Could not start the clock in this capture buffer"))) (when (org-capture-get :immediate-finish) (org-capture-finalize)))))))) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at