1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
|
#+TITLE: Edit Calendar Event Workflow
#+AUTHOR: Craig Jennings & Claude
#+DATE: 2026-02-01
* Overview
Workflow for editing existing calendar events via gcalcli.
*Note:* gcalcli's edit command is interactive. This workflow uses a delete-and-recreate approach for non-interactive editing.
* Triggers
- "edit the meeting"
- "change my appointment"
- "reschedule"
- "update the event"
- "move my appointment"
* Prerequisites
- gcalcli installed and authenticated
- Event must exist on calendar
* CRITICAL: Check All Calendars Before Rescheduling
When rescheduling an event, ALWAYS check for conflicts at the new time across ALL calendars:
#+begin_src bash
grep "TARGET_DATE" ~/.emacs.d/data/gcal.org # Google calendar
grep "TARGET_DATE" ~/.emacs.d/data/dcal.org # DeepSat work calendar
grep "TARGET_DATE" ~/.emacs.d/data/pcal.org # Proton calendar
#+end_src
gcalcli only sees Google calendars — verify the new time is free across all three files before rescheduling.
* Workflow Steps
** 1. Parse User Request
Extract:
- Which event (title, partial match, or date hint)
- What to change (if mentioned)
Examples:
- "Edit the dentist appointment" → search for "dentist"
- "Reschedule tomorrow's meeting" → search tomorrow's events
- "Change the 3pm call to 4pm" → search by time
** 2. Search for Event
#+begin_src bash
# Search by title
gcalcli --calendar "Calendar Name" search "event title"
# Or list events for a date
gcalcli --calendar "Calendar Name" agenda "date" "date 11:59pm"
#+end_src
** 3. Handle Multiple Matches
If search returns multiple events:
#+begin_example
Found 3 events matching "meeting":
1. Team Meeting - Feb 3, 2026 at 9:00 AM
2. Project Meeting - Feb 4, 2026 at 2:00 PM
3. Client Meeting - Feb 5, 2026 at 10:00 AM
Which event do you want to edit? (1-3)
#+end_example
** 4. Display Full Event Details
Show the current event state:
#+begin_example
Event: Team Meeting
When: Monday, Feb 3, 2026 at 9:00 AM
Duration: 1 hour
Location: Conference Room A
Description: Weekly sync
Reminders: 5 min, 0 min
Calendar: Craig
#+end_example
** 5. Ask What to Change
Options:
- Title
- Date/Time
- Duration
- Location
- Description
- Reminders
Can change one or multiple fields.
** 6. Show Updated Summary
Before applying changes:
#+begin_example
Updated Event:
Event: Team Standup (was: Team Meeting)
When: Monday, Feb 3, 2026 at 9:30 AM (was: 9:00 AM)
Duration: 30 minutes (was: 1 hour)
Location: Conference Room A
Description: Weekly sync
Reminders: 5 min, 0 min
Calendar: Craig
Apply these changes? (yes/no)
#+end_example
** 7. Explicit Confirmation
*Do NOT apply changes until user confirms.*
** 8. Execute Edit (Delete + Recreate)
Since gcalcli edit is interactive, use delete + add:
#+begin_src bash
# Delete original
gcalcli --calendar "Calendar Name" delete "Event Title" --iamaexpert
# Recreate with updated fields
gcalcli --calendar "Calendar Name" add \
--title "Updated Title" \
--when "new date/time" \
--duration NEW_MINUTES \
--where "Location" \
--description "Description" \
--reminder 5 \
--reminder 0 \
--noprompt
#+end_src
** 9. Verify
Confirm the updated event exists:
#+begin_src bash
gcalcli --calendar "Calendar Name" search "Updated Title"
#+end_src
Report success or failure.
* Common Edit Scenarios
** Reschedule (Change Time)
#+begin_example
User: "Move my dentist appointment to 3pm"
1. Search for "dentist"
2. Show current time
3. Confirm new time: 3pm
4. Delete + recreate at new time
#+end_example
** Change Duration
#+begin_example
User: "Make the meeting 2 hours instead of 1"
1. Find the meeting
2. Show current duration
3. Confirm new duration: 2 hours
4. Delete + recreate with new duration
#+end_example
** Update Location
#+begin_example
User: "Change the meeting location to Room B"
1. Find the meeting
2. Show current location
3. Confirm new location
4. Delete + recreate with new location
#+end_example
** Move to Different Day
#+begin_example
User: "Move Friday's review to Monday"
1. Find event on Friday
2. Show full details
3. Confirm new date (Monday) and time
4. Delete + recreate on new day
#+end_example
* gcalcli Command Reference
** Search
#+begin_src bash
gcalcli search "event title"
gcalcli --calendar "Craig" search "meeting"
#+end_src
** Delete (for edit workflow)
#+begin_src bash
gcalcli --calendar "Calendar" delete "Event Title" --iamaexpert
#+end_src
** Add (recreate with edits)
#+begin_src bash
gcalcli --calendar "Calendar" add \
--title "Title" \
--when "date time" \
--duration MINUTES \
--where "Location" \
--description "Notes" \
--reminder 5 \
--reminder 0 \
--noprompt
#+end_src
* Handling Recurring Events
*Warning:* The delete+recreate approach deletes ALL instances of a recurring event.
For recurring events:
1. Warn the user this will affect all instances
2. Consider using gcalcli's interactive edit mode
3. Or create a new single event and delete the series
* Error Handling
** Event Not Found
- Verify spelling
- Try partial match
- Check date range
** Multiple Matches
- Show all matches
- Ask user to select one
- Use more specific search terms
** Delete Failed
- Event may already be deleted
- Check calendar permissions
* Related
- [[file:add-calendar-event.org][Add Calendar Event]] - create events
- [[file:read-calendar-events.org][Read Calendar Events]] - view events
- [[file:delete-calendar-event.org][Delete Calendar Event]] - remove events
- [[file:../calendar-api-research.org][Calendar API Research]] - gcalcli reference
|