mc 0.3.1
No change to the package’s functions. This release exists so the package has a citable, archived version.
-
Citation. The maintainer is the author, and New Graph Environment Ltd. the copyright holder and funder (
cph,fndinAuthors@R) and the publisher inCITATION.cff.citation("mc")andknitr::write_bib()give the entry the stable keymc. -
CITATION.cffis regenerated from DESCRIPTION by theupdate-citation-cffworkflow and is kept out of the build tarball. - The build excludes a git worktree’s
.gitfile.
mc 0.3.0
Breaking changes
-
mc_send()no longer drafts. Delivery is split by function name:mc_draft()can only create a Gmail draft andmc_send()can only send. The frontmatter pair splits the same way —mc_md_draft()andmc_md_send(). Thedraftargument is gone from all of them, with no deprecated alias (#39).Previously a single boolean selected between a reversible act and an irreversible one, so one character separated them. That produced a real incident: a message reached nine external recipients when a draft was intended. Sending is now named rather than configured, and nothing passed to
mc_draft()can send. testis renamedto_self. The old name implied a dry run and never was one — it rewrites the recipients so the message reaches only the sender, but withdraft = FALSEit still sent.to_selfsays what it does. Usemc_draft()when you want nothing delivered.mc_draft()rejectssend_atandschedulerwith an error namingmc_send(). A scheduled message is by definition one that gets sent.overrideinmc_md_draft()/mc_md_send()rejectsdraftandtestkeys, naming the replacement.overrideis a back door into the dispatch arguments, so removing the formals did not close the path on its own.
Migration
mc_send(..., draft = TRUE) # -> mc_draft(...)
mc_send(..., draft = FALSE) # -> mc_send(...)
mc_send(..., draft = FALSE, test = TRUE) # -> mc_send(..., to_self = TRUE)
mc_md_send(path) # -> mc_md_draft(path)
mc_md_send(path, override = list(draft = FALSE)) # -> mc_md_send(path)Calls passing draft or test error rather than changing behaviour silently.
mc 0.2.10
-
mc_send()gains aschedulerargument selecting the backend for scheduled sends —"callr"(default, for backward compatibility),"auto"(resolves to OS-native:launchdon macOS,aton Linux), or an explicit"launchd"/"at". OS-native backends own their own job lifecycle independent of the originating R session — fixes the silent-drop failure mode where acallr::r_bgchild got cleaned up when its parentRscriptinvocation exited (#36). -
Behavior change: using
scheduler = "callr"now emits awarning()flagging the unreliable lifecycle in some call contexts (Rscriptone-shot, RStudio sessions that exit, CI). Steers users towardscheduler = "auto". The default is still"callr"for back-compat — passscheduler = "auto"(or set in YAML override) to silence the warning and use the OS-native backend. -
send_atnow writes heartbeat log entries to~/.mc/send_log.txtso missed fires are auditable from the log alone:SCHEDULEDat submission with the target time,STARTEDat fire, plus the existingSENT/SKIPPED/FAILEDentries. ASCHEDULEDline with no follow-upSTARTEDmeans the bg process died before firing (#36). - Internal: scheduled-send HTML is now pre-rendered before backend dispatch so the body travels with the serialized args — avoids fire-time filesystem dependency on the original draft and fixes a potential silent failure for
path-based scheduled sends. - Internal: new
R/mc_schedule.Rhouses the dispatcher, backends, and therun_scheduled_sendfire-time entry point used by the OS-native backends. Triple-colon access pattern matches existing internal helpers. - Internal: launchd cleanup unlinks plist + args JSON without calling
launchctl unloadfrom inside the running job —unloadSIGTERMs the job’s process group, killing the cleanup mid-flight (caught by live test). Stalelaunchctl listentry persists until next reboot but the dormantStartCalendarInterval(set to a single past minute) never re-fires.
mc 0.2.9
- Add
mc_label_ensure(label_names)— primitive that creates missing Gmail user labels and no-ops for existing ones. System labels (INBOX, STARRED, etc.) are skipped via case-insensitive match (#33). -
mc_thread_modify()gainscreate_missing = FALSE(opt-in). WhenTRUE, callsmc_label_ensure(add)before resolving names so new labels inaddare auto-created. Default preserves the existing typo-guard behavior (#33). -
mc_send()gainslabels_create = TRUE(default on). The YAML- driven workflow (mc_md_send()) now creates new project tags on first use — no need to pre-create labels viagmailr::gm_create_label(). SetFALSEfor strict typo-guard. Threaded through scheduled-send recursion (#33). - Internal:
resolve_label_names()now matches system labels case- insensitively and normalizes returned IDs to uppercase, fixing a cross-function inconsistency wheremc_label_ensureskipped"inbox"as system butmc_thread_modifythen erred trying to resolve it. Side benefit: callers can pass mixed-case system labels (“Inbox”, “Starred”) and get correct resolution.
mc 0.2.8
-
mc_send()accepts alabelsargument (character vector of Gmail label names) and applies them to the resulting thread viamc_thread_modify()on both the draft and sent paths. Drafts get tagged so they’re findable in Drafts under the project label and so the label rides through when the user sends from the Gmail UI (Gmail typically keeps the same thread). Unknown label names raise the existingmc_thread_modify()error listing available user labels (#31). -
mc_md_send()readslabels:from YAML frontmatter (character vector) and passes through tomc_send(). Project tags can live in the.mddraft alongsideto,subject,cc,thread_id, etc. (#31). -
mc_send()now returns the Gmail thread ID of the resulting draft or sent message invisibly (wasinvisible(NULL)). Lets callers chain follow-on operations likemc_thread_modify()cleanly (#31).
mc 0.2.7
- Add
mc_thread_modify()— adds and/or removes labels on a Gmail thread in one call. Accepts user label names or Gmail system labels (INBOX, STARRED, UNREAD, IMPORTANT, TRASH, SPAM, SENT, DRAFT), so the same verb covers archive (remove = "INBOX"), star (add = "STARRED"), trash, mark-read, and project-label workflows (#28). - Bypasses a body-encoding bug in
gmailr::gm_modify_thread()(3.0.0) by POSTing directly tousers.threads.modify.httradded to Imports.
mc 0.2.6
- Startup quote ritual:
library(mc)prints a random fact-checked quote from 25 voices on attach. Italic quote, grey attribution, clickable bluesourcehyperlink. Suppress viaoptions(mc.quote_show_source = FALSE). - 99 shipped entries from MLK, JFK, Bob Marley, Kurt Cobain, Chris Cornell, Robert Plant, James Hetfield, Tupac, Eminem, Ice-T, Ice Cube, RZA, ODB, Method Man, DJ Premier, Vince Staples, Logic, Mike Tyson, Jim Carrey, John Candy, Ronny Chieng, Jon Stewart, Stephen King, Quentin Tarantino, Paul Thomas Anderson.
- Curated via the soul
/quotes-enableskill: parallel research agents, independent fact-check pass, user review. -
cliadded to Imports for OSC 8 hyperlinks and styling inR/zzz.R.
mc 0.2.5
-
mc_preview()now accepts a.mdpath in addition to an HTML string. When given a path, renders the frontmatter envelope (To / Cc / Subject / Thread / Attach) as a header above the body so recipient or subject mistakes are visible locally (#25).
mc 0.2.4
- Add YAML frontmatter support for one-file email drafts (#23).
- Add
mc_md_meta()to read frontmatter as a named list. - Add
mc_md_send()to dispatch tomc_send()from frontmatter, with anoverridearg for call-time tweaks. - Add
mc_md_index()to scan a directory tree of drafts and return a searchable dataframe (path,date,to,cc,subject,thread_id,has_attachments).
mc 0.2.3
-
mc_preview()now writes to a stable path undertools::R_user_dir("mc","cache")instead oftempfile()so the preview survives non-interactiveRscriptsessions.opennow defaults toTRUEandpathis configurable (#22).
mc 0.2.2
- Add
mc_message_find()for message-level Gmail search. - Add
mc_thread_body_latest()— latest thread reply with quoted history stripped. - Add
mc_preview()— preview composed HTML in a browser before sending. - Add
after/beforedate filters tomc_thread_find().
mc 0.2.1
- Add
draftsparameter tomc_thread_read()— includes draft messages with astatuscolumn ("sent"/"draft").
mc 0.2.0
- Add
attachmentsparameter tomc_send()for file attachments. - Remove hardcoded fallback email from
default_from()— now errors ifoptions(mc.from)andMC_FROMenv var are both unset. - Update CLAUDE.md with latest soul conventions.
mc 0.1.0
- First stable release: compose, draft, and send emails from markdown via Gmail API.
- Core functions:
mc_send(),mc_compose(),mc_md_render(),mc_scroll(),mc_sig(). - Thread support:
mc_thread_find(),mc_thread_read(). - Scheduled send with
send_atand macOScaffeinateintegration. - Test mode redirects to sender for safe previewing.
