emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] problem with org-capture


From: Mike McLean
Subject: Re: [O] problem with org-capture
Date: Thu, 3 Dec 2015 16:11:34 -0500

At the risk of piling on, I too am having problems with Org Capture templates that haven't changed in a long time. The sample below used to function like:
  1. I would call it from org-capture, select the “af” template
  2. I would get prompted for a date from file+datetree+prompt and I would select the date
  3. I would get prompted for the week number from the ~%^{prompt|%<%Y-W%V>}~ clause. This would default to the current week in ISO format (2015-W49). I would change it or not (usually not)
  4. The ISO week entered from that prompt would get substituted into the AR_DATE property in multiple places.
The two big differences with release_8.3.2-381-gb7ee96 are
  1. The substitution for %Y and %V does not happen before the prompt in step 3; I get a default value of [%<%Y-W%V>]
  2. Even if I manually type the ISO week string (2015-W09) it no longer gets substituted into the AR_DATE properties via %\1 
I maintain some of my more complex capture templates in standalone files and reference the file in org-capture-templates

(setq org-capture-templates (quote (
                                    ("a" "Templates for Agile Results")

                                    ("af" "Friday Afternoon Weekly Close / Reflection"
                                     entry
                                     (file+datetree+prompt "~/Documents/OrgMaster/org/Agile_Results.org")
                                     (file "~/.init/emacs/org-capture-templates/friday.reflection.org_template")
                                     :jump-to-captured t :immediate-finish t))))

The file "~/.init/emacs/org-capture-templates/friday.reflection.org_template" contains:

#+begin_example
  ,* Friday Reflection %^{prompt|%<%Y-W%V>}
  :PROPERTIES:
  :AR_DATE:  %\1
  :VISIBILITY: all
  :END:
  %u
  ,** Three Things Going Well
  + %?
  +
  +
  ,** Three Things to Improve
  +
  +
  +
  ,** Review Outcomes and Results Compared to the Monday Vision          :Weekly_Win_Review:
  :PROPERTIES:
  :AR_DATE:  %\1
  :VISIBILITY: all
  :END:
  %<[%Y-%m-%d %a %H:%M]>
  - What got in my way? How might I do it differently? Review each of my target Monday
    Vision Outcomes; What did I get done or did not get done?
     +
     +
     +
  ,** Delta File: What will I change immediately or when my role or influence changes :NOTE:Delta_File:
  %<[%Y-%m-%d %a %H:%M]>

#+end_example




On Thu, Dec 3, 2015 at 12:05 PM, Matt Lundin <address@hidden> wrote:
Nicolas Goaziou <address@hidden> writes:

> Hello,
>
> Eric S Fraga <address@hidden> writes:
>
>> However, it only partially fixed.  The system does now prompt as it
>> should but the mini-buffer input only allows single words.  Hitting
>> space bar attempts to do completion.  I believe the input should be free
>> form?
>
> Fixed (again). Thank you.

Thanks Nicolas. One more issue. In the past, non-interactive escapes
were expanded when the capture buffer was displayed, which enabled me to
see what I had just clipped while entering the interactive data. Now
non-interactive escapes are expanded at the end of the capture process.

Take the following template:

(setq org-capture-templates
      '(("a" "Appointment" entry
         (file "~/org/inbox.org")
         "* %^{Appt}\n %^t%?\n %U\n %a\n\n %i")))

In the past, if I called this from the org-mode website with a region of
text selected, I would get a buffer that looked like this before
completing the interactive prompts:

--8<---------------cut here---------------start------------->8---
*
 %^t%?
 [2015-12-03 Thu 11:02]
 [[http://orgmode.org/][Org mode for Emacs – Your Life in Plain Text]]

 Org mode is for keeping notes, maintaining TODO lists, planning
 projects, and authoring documents with a fast and effective plain-text
 system.
--8<---------------cut here---------------end--------------->8---

After the recent changes, the initial capture buffer looks like this:

--8<---------------cut here---------------start------------->8---
*
 %^t%?
 %U
 %a

 %i
 --8<---------------cut here---------------end--------------->8---

Thanks,
Matt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]