Can Emacs be used to modify Google Drive documents?

I’m curious if there’s a way to use Emacs for editing text files stored in Google Drive. It would be great if changes made in Emacs could sync back to the original Google Doc.

I’ve heard about some command-line tools and Emacs packages that might help, but they seem to be designed for Linux or Windows. I’m using Aquamacs on macOS, so I’m not sure if they’ll work for me.

Has anyone figured out how to do this on a Mac? Is it even possible? I’d love to hear about any solutions or workarounds that might let me use my favorite text editor with Google Drive documents.

(defun google-drive-edit ()
  (interactive)
  (message "This function would edit Google Drive docs if it existed!"))

(global-set-key (kbd "C-c g") 'google-drive-edit)

Any tips or suggestions would be really helpful. Thanks!

hey tom, emacs on mac can work with google drive via ‘google-drive-mode’. it lets you browse and edit files, though syncing might be a bit unreliable. give it a try to see if it suits your needs.

As an Emacs enthusiast who’s grappled with this exact problem, I can share some insights. While there’s no perfect solution, I’ve found a workaround using the ‘insync’ app on macOS. It syncs Google Drive to a local folder, allowing Emacs to access and modify files directly.

The setup process is straightforward: install insync, connect your Google account, and choose which folders to sync. Once done, you can open and edit files in Emacs as if they were local. Changes automatically sync back to Google Drive.

One caveat: this method works best with plain text files. For Google Docs, you’ll need to convert them to a compatible format first. It’s not ideal, but it’s been a game-changer for my workflow.

Remember to regularly check for syncing conflicts, especially if you’re editing files from multiple devices. It’s not foolproof, but it’s the most reliable method I’ve found for using Emacs with Google Drive on a Mac.

I’ve experimented with integrating Emacs and Google Drive on macOS, and while it’s not seamless, there are workable solutions. One approach I’ve found effective is using the ‘rclone’ tool to mount Google Drive as a local filesystem. Once mounted, you can access and edit files directly in Emacs.

To set this up, install rclone via Homebrew, configure it for Google Drive, then mount your drive. After that, you can open and edit files in Emacs as if they were local. Changes sync automatically when you save.

Keep in mind this method works best with plain text files. For Google Docs, you’ll need to export to a compatible format first. It’s not perfect, but it’s the closest I’ve come to a smooth Emacs-Google Drive workflow on Mac.