emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Unexpected behaviour from capture-template
       [not found] <mailman.105.1517245218.25353.emacs-orgmode@gnu.org>
@ 2018-01-29 22:56 ` Brian J Hoskins
  2018-01-29 23:08   ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Brian J Hoskins @ 2018-01-29 22:56 UTC (permalink / raw)
  To: emacs-orgmode

I have set up a capture template as follows (shortened for sake of brevity):

("h" "Health" entry (file+datetree "~/health.org")
 "* %? %^g\n%U\n** SYMPTOMS\n%^{SYMPTOMS}\n%^{SEVERITY}p\n")


This capture template (should) do the following according to my
understanding:

* Make a journal entry
* Prompt for tags
* Insert an inactive timestamp on a new line
* Prompt for symptoms, insert on new line heading 2
* Prompt for severity property, insert on new line
* Put the cursor back on the heading 1 line.


Everything works except for the property, which for some reason gets
inserted above the symptom line, even though it is prompted for last.
This is what the capture template looks like after finishing:

----------

* Test Health Journal    :HEADACHE:
  [2018-01-29 Mon 22:52]
** SYMPTOMS
:PROPERTIES:
:SEVERITY: 2
:END:
My symptoms...

----------


Am I doing something wrong or is there a bug here?

Many thanks in advance, fellow org-moders!

Cheers,

Brian.

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

* Re: Unexpected behaviour from capture-template
  2018-01-29 22:56 ` Unexpected behaviour from capture-template Brian J Hoskins
@ 2018-01-29 23:08   ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2018-01-29 23:08 UTC (permalink / raw)
  To: Brian J Hoskins; +Cc: emacs-orgmode

Hello,

Brian J Hoskins <brian@hoskins.eu> writes:

> Everything works except for the property, which for some reason gets
> inserted above the symptom line, even though it is prompted for last.
> This is what the capture template looks like after finishing:
>
> ----------
>
> * Test Health Journal    :HEADACHE:
>   [2018-01-29 Mon 22:52]
> ** SYMPTOMS
> :PROPERTIES:
> :SEVERITY: 2
> :END:
> My symptoms...
>
> ----------
>
>
> Am I doing something wrong or is there a bug here?

The properties drawer must be located right below the headline, barring
some planning info line. So the output looks perfectly valid.

Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2018-01-29 23:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.105.1517245218.25353.emacs-orgmode@gnu.org>
2018-01-29 22:56 ` Unexpected behaviour from capture-template Brian J Hoskins
2018-01-29 23:08   ` Nicolas Goaziou

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