From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id Yu9vC87U+mCofQEAgWs5BA (envelope-from ) for ; Fri, 23 Jul 2021 16:40:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id oDd8Bs7U+mBmCwAAbx9fmQ (envelope-from ) for ; Fri, 23 Jul 2021 14:40:14 +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 54AF8C627 for ; Fri, 23 Jul 2021 16:40:13 +0200 (CEST) Received: from localhost ([::1]:51056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6wLU-0005GG-AU for larch@yhetil.org; Fri, 23 Jul 2021 10:40:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52024) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6wKn-0005G7-7L for emacs-orgmode@gnu.org; Fri, 23 Jul 2021 10:39:29 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:38796) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m6wKl-0002Vz-5u for emacs-orgmode@gnu.org; Fri, 23 Jul 2021 10:39:29 -0400 Received: by mail-pl1-x62f.google.com with SMTP id a14so3476452plh.5 for ; Fri, 23 Jul 2021 07:39:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:message-id :date:mime-version; bh=nrttZ2EoGup6uc7wSU4g6RE8tXQsawLF7LGYQmNJI9w=; b=Sa136fCaVQLRBrlfWhQqqNhXZg3r47H78erTThPETCSif5DSm/BY2LLJccihhJpJvc fSVKCQXF9OatcEH0ICrLrQDKTLIDbpLVXcgw/3M8j7B0Dza9u/WL2XD90bP8TAxcgQ79 ka6Gs0lrjvuhTJJvQZ1Bg+FpcNXBEn+3S+xUycCNM+Z+7PCiCAplpCE5snaaJhyglvGk emD6aIRpVis/E/xWNz3mUEL0nKAXQ7oySObTBn0dNK2byewAQ7rGyvF2rsFRqj7vmBqQ YVmzRgyh86Lyknzuhh3nn4nxyFVoXfjje9vFlGnKA5zUhUk+vUwCAESAi3ETFdC8a3Oq qWYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version; bh=nrttZ2EoGup6uc7wSU4g6RE8tXQsawLF7LGYQmNJI9w=; b=qg8ts5yPTGN+PpqTUu+dtLMk/2MuKWBRkkFkoTXdSBLcHFwIRfPo/1XojaY8SWfgct hTpfOAHmiwpDIYAG7qukMx0bzFMQljwQQlJFM9rbCPWHDwCqvlrffX3V74IzkUNSntcs vzoy+/mmZbH7oQhfsYZDJu7rLKusw9X3CzCPxN4kMzFxgXwv0wu9oUk/6w1I+CCYHQ8e qqWGuE0H5tRIkAt32m+1LevhltfIGMnRHlreA3I5mpna72n8lktKQxseStIYfvrpzQfA iEf2Y4IjRf5nmLOlVwM/MvXomkwkINfTAYt2rvDCI/nD9uhMz87W0QsMtA/qM3Bamfnd WNjw== X-Gm-Message-State: AOAM532GvYREqx1LhV9bCcQEP+YlG+SpWXYvNXbTus+KzOfC0Tektm1N Mkav2TZ7qPRcCWffWpmeeOA= X-Google-Smtp-Source: ABdhPJzT9opebtJi8EwY88SNrv6gUnfkX9gQ0iW8Uh8UXYvsK0JN0aX8gCplUvJOazSvDD3ShLnt7A== X-Received: by 2002:a17:902:9006:b029:107:394a:387 with SMTP id a6-20020a1709029006b0290107394a0387mr4317729plp.35.1627051165294; Fri, 23 Jul 2021 07:39:25 -0700 (PDT) Received: from localhost (180-150-91-8.b4965b.per.nbn.aussiebb.net. [180.150.91.8]) by smtp.gmail.com with ESMTPSA id k8sm24738600pfu.116.2021.07.23.07.39.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jul 2021 07:39:25 -0700 (PDT) References: User-agent: mu4e 1.4.15; emacs 28.0.50 From: Timothy To: Robert Davidson Subject: Re: Bug: Aborting org-capture can alter target file [9.3 (release_9.3 @ /usr/local/share/emacs/28.0.50/lisp/org/)] In-reply-to: Message-ID: <87mtqdjdra.fsf@gmail.com> Date: Fri, 23 Jul 2021 22:39:21 +0800 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=tecosaur@gmail.com; helo=mail-pl1-x62f.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1627051213; 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=nrttZ2EoGup6uc7wSU4g6RE8tXQsawLF7LGYQmNJI9w=; b=JAQANS8LsAr6YQVPu3Vpq9ooWXJRGzTFVX7hWqSlC9TAweiypP2pFAOBtZuy2V3cvOc/F8 vyPonBKYSvzE/nPcfSIi4A1EB51HWcf+C+Zad+ive+x8zUcT/ZPY3sFSwVoDFo/pKAPmrW JhSZJT1IzrzHvNlH7bgU5cZ+6aHqbESP/0PkSO354RTiLW+rUD7XFETl2NZ8eBeL9E7TeH w+zgSvYDFtEzTxk082M/d4mmgnQots+69FoszZi3EjffrH2lOMm50g6rqaNyrCqTgVI4q6 i1Fw4lW63jpNE5yc2McHmTcGxjeHTHotDAz8ttammJUFmDdQfNpRrArmYXtnkA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627051213; a=rsa-sha256; cv=none; b=sVpiABJ1oxsPJHgcQOw2hpv14BZd17WJfffJVOlG+CQ6H/Wwda43z7bYrGby1eLmsHGb5g YLQ9wegCZ/akR7oMKbqrQvngb8j7x0yppJi3OvlgB607gtReQieHxIhHiHiP+eGp9TAck/ Nio9/0hdsaTmw9ZzThO3kyn/uHZ7tIeqNS3EcMfpwLzQnTGGJHMEz1LjKdTBhfy2xNNoM0 TznSlSiIRgBud4qo6m0MqM96JKLcrhOdnP/Gd8aN5dmDT69dyHE7dU8Ys07bYNvdT5F8qP Mc8mQb/UqOUnTy5jXqoYYv6KgQ4OTpnyynoev90oajtY4E//G1q5Gb6zYcaCGg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=Sa136fCa; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=Sa136fCa; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 54AF8C627 X-Spam-Score: -3.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: nXzSOI/VsMXS Hi Robert, There seem to be a strange number of newlines in your bug report, which makes it a bit harder to read. Am I correct in summarising your bug report as?: When targeting a headline with an empty next line, the subsequent headline is moved down a level. -- Timothy Robert Davidson writes: > My template targets ~/org/zettel.org under the "Items" header. The file > looks like this (including the empty line): > * Items > > * foo > > I then start and abort capture by running (org-capture nil "z"). > The file is changed to become thus: > * Items > ** foo > > When I do this without the newline, the file is unchanged, as expected. So it seems to be purely a problem when there's an empty line after the target. > > (I doubt the autogenerated part of this email is readable but I didn't > want to alter it in case there's some reason it has so much whitespace.) > > Emacs : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) > of 2020-10-06 > Package: Org mode version 9.3 (release_9.3 @ /usr/local/share/emacs/28.0.50/lisp/org/) > > current state: > ============== > (setq > org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) > org-link-shell-confirm-function 'yes-or-no-p > org-insert-heading-respect-content t > org-metadown-hook '(org-babel-pop-to-session-maybe) > org-clock-out-hook '(org-clock-remove-empty-clock-drawer) > org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function > org-odt-format-headline-function 'org-odt-format-headline-default-function > org-agenda-files '("~/org/") > org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default > org-reveal-start-hook '(org-decrypt-entry) > org-mode-hook '(#[0 "\301\211 \207" [imenu-create-index-function org-imenu-get-tree] 2] > #[0 > "\305 \306 >\203 \0\307\n\310\311#\210\307 \312\313#\210\307 \314\315#\210\306 >\203,\0\307\n\316\317#\210\307\n\320\321#\210\322 >>\203>\0\307 \323\324#\210\307 \325\324#\210\326 >\203P\0\307\n\327\317#\210\307\n\330\321#\210\331 >>\203_\0\332\311\f\333BC\334#\210\335 >\203k\0\332\311\336\334#\210\337 >>\203w\0\332\311\340\334#\210\341\342\343\344\311$\210\345\342\311\"\210\342\207" > [org-mouse-context-menu-function > > org-mouse-features > > org-mouse-map > > org-mode-map > > org-outline-regexp > > org-mouse-context-menu > > context-menu > > org-defkey > > [mouse-3] > > nil > > [mouse-3] > > org-mouse-show-context-menu > > [down-mouse-1] > > org-mouse-down-mouse > > [C-drag-mouse-1] > > org-mouse-move-tree > > [C-down-mouse-1] > > org-mouse-move-tree-start > > yank-link > > [S-mouse-2] > > org-mouse-yank-link > > [drag-mouse-3] > > move-tree > > [drag-mouse-3] > > [down-mouse-3] > > activate-stars > > font-lock-add-keywords > > (0 > > > > `(face org-link mouse-face highlight keymap ,org-mouse-map) > > > > > > 'prepend) > > t > > activate-bullets > > (("^[ ]*\\([-+*]\\|[0-9]+[.)]\\) +" > > > > (1 > > > > > > > > `(face org-link keymap ,org-mouse-map mouse-face highlight) > > > > > > > > 'prepend) > > > > > ) > > > > ) > > activate-checkboxes > > (("^[ ]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ X]\\]\\)" > > > (2 > > > > > > `(face bold keymap ,org-mouse-map mouse-face highlight) > > > > > > t) > > > > ) > > > ) > > ad-add-advice > > org-open-at-point > > (org-mouse-open-at-point > > > > nil > > > > t > > > > (advice > > > > > > > > > > > > > > lambda > > > > > > > > > > > > > > nil > > > > > > > > > > > > > > (let > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ((context > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > (org-context) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > (cond > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ((assq :headline-stars context) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > (org-cycle) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ((assq :checkbox context) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > (org-toggle-checkbox) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ((assq :item-bullet context) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > (let > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ((org-cycle-include-plain-lists t) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > (org-cycle) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ((org-footnote-at-reference-p) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > nil) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > (t ad-do-it) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ) > > > > > > > > > > > > > > ) > > > > ) > > around ad-activate] > 5] > #[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-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] > org-archive-hook '(org-attach-archive-delete-maybe) > org-confirm-elisp-link-function 'yes-or-no-p > org-agenda-before-write-hook '(org-agenda-add-entry-text) > org-metaup-hook '(org-babel-load-in-session-maybe) > org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"] > org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"] > org-babel-pre-tangle-hook '(save-buffer) > org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) > org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"] > org-occur-hook '(org-first-headline-recenter) > org-agenda-mode-hook '(#[0 > "\302 \303 \304\305#\210\303 \306\307#\210\303 \310\311#\210\303 \312\313#\210\303 \314\315#\207" > [org-mouse-context-menu-function > > org-agenda-mode-map > > org-mouse-agenda-context-menu > > org-defkey > > [mouse-3] > > org-mouse-show-context-menu > > [down-mouse-3] > > org-mouse-move-tree-start > > [C-mouse-4] > > org-agenda-earlier > > [C-mouse-5] > > org-agenda-later > > [drag-mouse-3] > > #[257 > > "\300 !\211\301\267\202 \0\302\303!\202 \0\304\303!\202 \0\305\207" > > [org-mouse-get-gesture > > > > > #s > > > > > (hash-table > > > > > > > > > > > > > > size > > > > > > > > > > > > > > 2 > > > > > > > > > > > > > > test > > > > > > > > > > > > > > eq > > > > > > > > > > > > > > rehash-size > > > > > > > > > > > > > > 1.5 > > > > > > > > > > > > > > rehash-threshold > > > > > > > > > > > > > > 0.8125 > > > > > > > > > > > > > > purecopy > > > > > > > > > > > > > > t > > > > > > > > > > > > > > data > > > > > > > > > > > > > > (:left 9 :right 15) > > > > > > > > > > > > > > ) > > > > > > org-agenda-earlier 1 org-agenda-later nil] > > 4 "\n\n(fn EVENT)" "e"] > > ] > 4] > ) > org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines org-optimize-window-after-visibility-change) > org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) > org-M-RET-may-split-line nil > org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function > org-confirm-shell-link-function 'yes-or-no-p > org-link-parameters '(("attachment" :follow org-attach-open-link :export org-attach-export-link :complete > org-attach-complete-link) > ("id" :follow org-id-open) ("eww" :follow eww :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) ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell) > ("news" :follow #[257 "\301\300\302 Q!\207" ["news" browse-url ":"] 5 "\n\n(fn URL)"]) > ("mailto" :follow #[257 "\301\300\302 Q!\207" ["mailto" browse-url ":"] 5 "\n\n(fn URL)"]) > ("https" :follow #[257 "\301\300\302 Q!\207" ["https" browse-url ":"] 5 "\n\n(fn URL)"]) > ("http" :follow #[257 "\301\300\302 Q!\207" ["http" browse-url ":"] 5 "\n\n(fn URL)"]) > ("ftp" :follow #[257 "\301\300\302 Q!\207" ["ftp" browse-url ":"] 5 "\n\n(fn URL)"]) > ("help" :follow org-link--open-help) ("file" :complete org-link-complete-file) > ("elisp" :follow org-link--open-elisp) ("doi" :follow org-link--open-doi)) > org-latex-format-headline-function 'org-latex-format-headline-default-function > org-capture-templates '(("z" "Zettel" entry (file+headline "zettel.org" "Items") > "* %?\n :PROPERTIES:\n :ID: %(uuidgen-4)\n :created: %U\n :END:\n%i") > ("Z" "" entry (file+headline "zettel.org" "Items") #'org-zettel-template)) > org-link-elisp-confirm-function 'yes-or-no-p > org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function > org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] > org-html-format-headline-function 'org-html-format-headline-default-function > org-default-notes-file "~/org/zettel.org" > ) -- Timothy