emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Capturing an entry without final endline modifies heading structure [9.1.14 (9.1.14-dist @ /usr/share/emacs/25.2/site-lisp/elpa/org-9.1.11/)]
@ 2018-09-02 11:14 Christoph Groth
  0 siblings, 0 replies; only message in thread
From: Christoph Groth @ 2018-09-02 11:14 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I'm using org's capture functionality to file new entries for my agenda.
I noticed a problem when capturing entries to be placed in the middle of
a file (for example, I have a subtree for "notes" that comes before
"miscellaneous"): when the captured text ends without a trailing endline
character, it will be inserted as such into the org file and thus modify
the overall heading structure.  For example, inserting a note may lead
to the following situation:

** Note without trailing endline
[2018-09-02 Sun 13:10]
example text* miscellaneous

IMHO this qualifies as a bug, because it's easy to accidentally corrupt
the heading structure of a file.

Cheers,
Christoph

Emacs  : GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-07-11, modified by Debian
Package: Org mode version 9.1.14 (9.1.14-dist @ /usr/share/emacs/25.2/site-lisp/elpa/org-9.1.11/)

current state (relevant excerpt):
================================
(setq
 org-capture-templates '(("u" "unscheduled" entry
                          (file+headline "" "miscellaneous") "* TODO %?\n%U")
                         ("U" "" entry (file+headline "" "miscellaneous")
                          "* TODO %?\n%a\n%U")
                         ("s" "scheduled" entry
                          (file+headline "" "miscellaneous")
                          "* TODO %?\nSCHEDULED: %^t\n%U")
                         ("S" "" entry (file+headline "" "miscellaneous")
                          "* TODO %?\nSCHEDULED: %^t\n%a\n%U")
                         ("m" "maybe" entry (file+headline "" "miscellaneous")
                          "* MAYBE %?\n%U")
                         ("M" "" entry (file+headline "" "miscellaneous")
                          "* MAYBE %?\n%a\n%U")
                         ("d" "deadline" entry
                          (file+headline "" "miscellaneous")
                          "* TODO %?\nDEADLINE: %^t\n%U")
                         ("D" "" entry (file+headline "" "miscellaneous")
                          "* TODO %?\nDEADLINE: %^t\n%a\n%U")
                         ("a" "appointment" entry
                          (file+headline "" "miscellaneous") "* %?\n%^t\n%U")
                         ("A" "" entry (file+headline "" "miscellaneous")
                          "* %?\n%^t\n%a\n%U")
                         ("r" "reply" entry (file+headline "" "miscellaneous")
                          "* TODO Reply to %:fromname%?\nSCHEDULED: %^t\n%a\n%U")
                         ("n" "note" entry (file+headline "" "notes")
                          "* %?\n%U")
                         ("i" "interruption" entry
                          (file+headline "" "interruptions") "* %? :work:\n%U"
                          :clock-in t :clock-resume t)
                         )
 )

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-09-02 11:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-02 11:14 Bug: Capturing an entry without final endline modifies heading structure [9.1.14 (9.1.14-dist @ /usr/share/emacs/25.2/site-lisp/elpa/org-9.1.11/)] Christoph Groth

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