emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Aborting org-capture can alter target file [9.3 (release_9.3 @ /usr/local/share/emacs/28.0.50/lisp/org/)]
@ 2021-07-06  3:27 Robert Davidson
  2021-07-23 14:39 ` Timothy
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Davidson @ 2021-07-06  3:27 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 9610 bytes --]

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"
 )

[-- Attachment #2: Type: text/html, Size: 125710 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-23 14:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-06  3:27 Bug: Aborting org-capture can alter target file [9.3 (release_9.3 @ /usr/local/share/emacs/28.0.50/lisp/org/)] Robert Davidson
2021-07-23 14:39 ` Timothy

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).