In Emacs how can I use YASnippet to automatically add entry and Clock-in for this entry?

239 views Asked by At

I am trying to create an automation script such the following steps will happen:

  1. Automatically load my DailyPlan.org file.
  2. For current Date entry.
  3. Insert a new YASnippet subtask entry.
  4. If there is a task being clocked Pause it else ignore.
  5. Start the clock in process for the new task.

This such that I can track in coming calls from Recruiters and have an entry in my DailyPlan.org file and capture all the details from the call or right after the call. The next step after the call and entering all pertinent information is to clock out and switch back to what I was doing.

I am not sure how to go about creating this. If this should be done in elisp or can it be done just simple using yasnippet ?

Any help and ideas on how to complete this is appreciated!

Thanks!

1

There are 1 answers

0
drgeb On

I was able to get a little further using the following code:

# -*- mode: snippet -*-
# name: Incomming Phone Call
# binding: direct-keybinding
# key: phc
# --

`(org-clock-in)`**** Incomming Call
***** Recruiter Info:
- First Name: $1
- Last Name: $2
- Company: $3
- Email: $9
- Telephone Number: $8
- Account Manager Name:
***** Position Information:
- Title: $4
- Location:
- City: ${5:Austin}
- State: ${6:TX}
- Client Company Name: $7
- Rate: $8

But I am getting the following warning and not sure how to get rid of it:

Warning (yasnippet): ‘Incomming Phone Call’ modified buffer in a backquote expression. To hide this warning, add (yasnippet backquote-change) to ‘warning-suppress-types’.