From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cHndEOBJr2E/+gAAgWs5BA (envelope-from ) for ; Tue, 07 Dec 2021 12:47:44 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id uFi6DOBJr2EzMAAA1q6Kng (envelope-from ) for ; Tue, 07 Dec 2021 11:47:44 +0000 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 905133F200 for ; Tue, 7 Dec 2021 12:47:43 +0100 (CET) Received: from localhost ([::1]:40174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muYwf-0003UR-Ib for larch@yhetil.org; Tue, 07 Dec 2021 06:47:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muYwD-0003U1-DZ for emacs-orgmode@gnu.org; Tue, 07 Dec 2021 06:47:13 -0500 Received: from mout02.posteo.de ([185.67.36.66]:36671) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muYwA-0002JT-CW for emacs-orgmode@gnu.org; Tue, 07 Dec 2021 06:47:13 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 81C26240101 for ; Tue, 7 Dec 2021 12:47:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1638877626; bh=r9e+ssDTu4TbyXvBGu/K/BSZIXjp3fimOheLKlGDles=; h=From:To:Subject:Date:Autocrypt:OpenPGP:From; b=Rb4DIidInEAYJAVID2hpDa4ftU+K5HrONBciTofMBqBVsJ3EccFqHZh/Lvc8jV7CE qoydvH55PSRai61GhwllTizc0bE356lk/+VrR0sDdn0sOa/iUJleQ9yx9TpxUYInd9 8/KnAuCRm/2UeER3cQPIOcA74kcE0EDbcAKSyufAGMUP+6nD93vwmAd0VPi2BSkYlg iRB+5RjIw8SEsXHDvCDg1YkjAHpZM9BwPsx+k/U++fpuPEO5QX2tSMrmchzPcK1LhX vwL1KKOwR4bah6xesisfjO56F9cQvid+9u9+uL0MfnqjUuKbeSgsGFsJyK375VRZBz /OYS76pshoQwA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4J7dnP6fGHz9rxP for ; Tue, 7 Dec 2021 12:47:05 +0100 (CET) From: Michael Eliachevitch To: emacs-orgmode@gnu.org Subject: [BUG] Plain capture template clocks into following headline instead of given olp [9.5.1 (release_9.5.1-15-gdb4805 @ /usr/share/emacs/29.0.50/lisp/org/)] Date: Tue, 07 Dec 2021 11:12:04 +0000 Message-ID: <87tufktz5z.fsf@posteo.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Autocrypt: addr=m.eliachevitch@posteo.de; keydata=xsBNBFHFxZABCADAAv2siayhA7Etl85WcwcyMPBD2bt/6Wh3A8a12AURV5J4tprzgbdlxC0w1LofvklG7ls25NERAY931hvQW+f5GEI0pwoNNFXEkKDa8/J4SxhrqXx8CJA85owPq1g4cFeO1ooQJ32BewlRGsnhd+taYExZ76oaMnFtx6jYjf6mPbjDyiLhC+Og3MBpOqAnmX7mhStgJl0uru1ZGEB17tzzVuQ4ljDv/MvUagVFymQBhmlbzvze5eLeDn90Ot0DjWHy3HzCFMEnVqQy8rmEA8N9GOANwyMY79KVymsPakeNwacPRFzYXCZvolC5jtY6I/1AL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F1adaccBAiHWKUTRIN5m74+xc/ZsTMCDdxaplklfeYUwwtnJ6HfW2Ia91s+4RuhdGd42kidf+3a7cTGHVn8aKKXLlteTFBeOZGnWl48dSQBC09rpq6DUOJPkmSPo3tMCYFSUyNZe7ebKNfU3P4PNreZoG4rDVkWBqNKu986WQOoYc2O0OspbC7JXrk0wiGMQKWWOW3Gw OpenPGP: url=https://posteo.de/keys/m.eliachevitch@posteo.de.asc Received-SPF: pass client-ip=185.67.36.66; envelope-from=m.eliachevitch@posteo.de; 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 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1638877663; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature:openpgp:openpgp:autocrypt:autocrypt; bh=2TovNPGhzO+TO9V7kbuG9K/xAMsbEYoq8RH3jwGotN8=; b=J/S9xnkBprfbiNu9O6MD5Ht7MvJJTxDHdikEtC2pT7ydSdU4dQSESXYII79ONF+G3/3OGJ SBFEaIh0+Yqy/CqO0vQyrlGOd4qwmKzZ5Pi0Goyygus3cJIqAoGk7eRRNvZNhieR7RB7CZ kvDgKZ2WpZ9yNTtUCX9jo6ze+NM5O9piGYzJtLXHMZlIdZkgf4hKjTNoB0FcnZICFW8yHh Fm7Y9myc23O4WQaP9PZfozep7BB72I6gRkxsosAEJcmRgtQsx7A5SXHmM1KqKWhtIa53OM +2r+ss2iGEBoKsu0nx6v31R8b7CMpDRZd5Mz8Nak1urJoZ+HZydFnUli/+cOkw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638877663; a=rsa-sha256; cv=none; b=gZtWMj7ZcTQFNDpIAiuM6Mx1WLokfo1CGV/GNnjluUquFN3pS5qgczSUruMZXJub1coXcP tc8Jef3NNZ7SKCtMXOb5CabllT3qbA1gHfsmFEHfv8igHJp3l2eC8280rA82myOb05jcmV KhJ6Bf2s3KJ+goYgznkDuS8T0p+KNSiPV+uSyvarE6FSgr3sf/eW/laEDbNZM+SGN4uSCy aafCxyrH2UIGiAurE9zaRPxAj4zRcSPCA9q+3VkENndx+Tw3NB6Z7qpXlEQ/ly04thtRuu 3cb9N2hd/VX1S6LEorPJLUAwziopYnWFN32WFPAZa3ZbZ86OlAWz3aTvZI9zTA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.de header.s=2017 header.b=Rb4DIidI; dmarc=pass (policy=none) header.from=posteo.de; 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: -7.44 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.de header.s=2017 header.b=Rb4DIidI; dmarc=pass (policy=none) header.from=posteo.de; 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-Queue-Id: 905133F200 X-Spam-Score: -7.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: uYkki9GiseGb --=-=-= Content-Type: text/plain; format=flowed Hello, I found a potential bug in org which I can reproduce with a minimal configuration. I added some org-capture templates purely for clocking into tasks via the capture-menu. These capture templates are for things I want to time-track but don't want to create a special entry for (like eating and breaks), so I used the `plain' type with an empty `""' template hoping it would clock into the given olp: (setq org-capture-templates '(( "c" "clock into") ("cu" "Unintended" plain (file+olp "~/org/clock_test.org" "Time sinks" "Unintended") "" :clock-in t :clock-keep t :immediate-finish t) ("ce" "Eating" plain (file+olp "~/org/clock_test.org" "Time sinks" "Eating") "" :clock-in t :clock-keep t :immediate-finish t))) My `clock_test.org' has the following headings: * Time sinks ** Unintended ** Eating *The BUG:* When I then run `org-capture' with "cu" to clock into "Unintended", emacs actually clocks into "Eating". I get the same with an file+headline configuration. I can reproduce it with `emacs -q' where I just load the capture-template above. My assumption is that the clock-in function expects that a new entry is created with the capture template and then it automatically clocks into the entry, but maybe clocking into the the parent olp of an empty plain entry is not the intended purpose. In any way, even if I didn't use it according to the intended purpose, I still think it's a bug that it clocks into the following heading. I would suggest that if in the scope of the captured entry there is nothing to clock into, either clock into the parent or just give a warning that there is nothing to clock into. By the way, unrelated to the bug, but if you have alternative ideas how I should achieve my goal of easily clocking into non-tasks I would be happy about suggestings. Maybe I could do something like a hydra menu with some small elisp-code, but I just thought using the existing capture-functionality should be simplest. Below is my emacs and org configuration from `org-submit-bug-report' from my `emacs -q' session. I recently compiled the latest version of the feature/pgtk branch and have native compilation enabled, which I used to compile the latest version of org, but I think the behavior that I observed. Cheers, Michael Eliachevitch ------------------------------------------------------------------------ Emacs : GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.17.4) of 2021-12-06 Package: Org mode version 9.5.1 (release_9.5.1-15-gdb4805 @ /usr/share/emacs/29.0.50/lisp/org/) 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-capture-templates '(("c" "clock into") ("cu" "Unintended" plain (file+olp "~/org/clock_test.org" "Time sinks" "Unintended") "" :clock-in t :clock-keep t :immediate-finish t) ("ce" "Eating" plain (file+olp "~/org/clock_test.org" "Time sinks" "Eating") "" :clock-in t :clock-keep t :immediate-finish t) ) org-export-before-parsing-hook '(org-attach-expand-links) org-archive-hook '(org-attach-archive-delete-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-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-confirm-shell-link-function 'yes-or-no-p outline-isearch-open-invisible-function 'outline-isearch-open-invisible 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-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) 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-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) ("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-metaup-hook '(org-babel-load-in-session-maybe) ) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFNBAEBCAA3FiEEVGkIx4I4OtDn2JTsG4+VyBJdzjEFAmGvSbgZHG0uZWxpYWNo ZXZpdGNoQHBvc3Rlby5kZQAKCRAbj5XIEl3OMTulB/sEvyYiMsZ53H25VezaMHRG yFUNCO+AxRmT0kfo7M4n/o5XNFVJ5kwgx2cSicrOUVklyzANZ0pk9xKyFv7rHpxv WNIN8MaYBhAhR7mw8Gl5QvdoPYbnLXd9gVHBDYz4Yku2iQEKly06kghgl2xPyt7w XbVAGyXgoNZIDMsdSoL6rtXpIOcmAyqUDNRcMuBlxUlk6w064hIlfkxxuTmBX94o /+nr+ZsDxxEsUFozz7A2lsTZgnp6lxpxMPMAQVUADre7PSS6mT9b47OMDzsVKF7x m8KCZl3MpDjXkqwMOZTnR0reW91M5VeLLRueFY1VrjLrqY5IAeRm7jW8OD9pkv4v =fy9F -----END PGP SIGNATURE----- --=-=-=--