Scheduling appointments with capture template from org-agenda view

I've been frustrated by my inability to schedule appointments directly from the org-agenda view, for quite some time, but I think I've found a way.

If like me you're using org-mode to manage your appointments, you're probably using SCHEDULED TODO items that can be entered in your system using org-capture templates.

A typical scenario is I'm asked by a colleague (face to face or on the phone) when I'm available to schedule a meeting or some other activity. I'm then firing an agenda view, and browse through the dates available... then agreeing on an empty slot, I'm capturing the meeting... but then I have to C-c C-s to add the SCHEDULED marker and set the correct date, although I was previously on that exact date in the org-agenda view :-/

The solution seems to be with the 'k c' command, i.e. the capture org-agenda-action in the agenda view. From the docs :

k runs the command org-agenda-action, which is an interactive compiled
c     Call `org-capture' with cursor date as the default date

Exactly what I need : it will prompt me for a capture template, which I just have to set to a template containing "SCHEDULED: %t".

Excerpt from my .emacs :

'(org-capture-templates (quote (("t" "Todo" entry (file+headline "~/org/" "TACHES") "* TODO %^{Brief description} %^g
    Added: %U
%a") ("n" "Notes" entry (file+datetree "~/org/") "* %^{topic} %T %^g
%a") ("d" "Scheduled appointment" entry (file+headline "~/org/" "TACHES") "* TODO %^{Brief description} %^g

Tadaaa ! it works :-)


1. Le mercredi, janvier 16 2013, 17:11 par YoungFrog

Pour info, depuis le commit 916c300 (en septembre 2012), org-agenda-action a été enlevé. Désormais 'k' lance la fonction org-agenda-capture, ce qui réduit d'une unité le nombre de touches à presser.

2. Le mercredi, janvier 16 2013, 19:38 par Mem

Version 7.9.2:
"The set of commands starting with =k ...= has been deleted... You can now use =k= to capture the marked entry and use the date at point as an overriding date for the capture template."

Ajouter un commentaire

Le code HTML est affiché comme du texte et les adresses web sont automatiquement transformées.

La discussion continue ailleurs

URL de rétrolien :

Fil des commentaires de ce billet