From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jorge <1gato0a@gmail.com> Newsgroups: gmane.emacs.help Subject: Re: Use Emacs to compose emails for Gmail web interface Date: Wed, 18 Sep 2013 21:03:48 -0300 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1379549040 24057 80.91.229.3 (19 Sep 2013 00:04:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Sep 2013 00:04:00 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Jorge <1gato0a@gmail.com> Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 19 02:04:03 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VMRj0-00035H-IH for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Sep 2013 02:04:02 +0200 Original-Received: from localhost ([::1]:49078 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMRj0-0004Gx-1g for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Sep 2013 20:04:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMRip-0004G0-7n for help-gnu-emacs@gnu.org; Wed, 18 Sep 2013 20:03:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMRin-0003d6-EQ for help-gnu-emacs@gnu.org; Wed, 18 Sep 2013 20:03:51 -0400 Original-Received: from mail-qe0-x229.google.com ([2607:f8b0:400d:c02::229]:33851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMRin-0003d1-9F for help-gnu-emacs@gnu.org; Wed, 18 Sep 2013 20:03:49 -0400 Original-Received: by mail-qe0-f41.google.com with SMTP id 1so853951qee.28 for ; Wed, 18 Sep 2013 17:03:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=bRPp5z7CX6PhslUt6gEdx964Qy/D9QsYvLFrqNw7Mf4=; b=HMUTCJrgG23MC1XQzC0BAnf1btJeLdNq26Guwx3WIo0bMF1gXPoC2UDeq4K7SykswI IRHRBbSxai5f85HafVS9RPQ/Q/sywmNTATYuiYXS9oI1ylLapUeww6A0dwbk4HfEk8hL MVVbHMaSs+HHhSxiPCtfkNODjQ5CGvJ+H0RAEUHiHcJSR2hfcdhFszNF2w7TebF/sWoh pah/ctWYBURYUQDAeMZUVmnuEIwuY7mXUTlWzrkvvaJZVNUNauT6JkZmy+/Af7lA8lsD aIHO1IhYmrZiAXduM9tQgGw7HMltSgFiwLldO6RwMNqbML795xsc4NF7io2RDZLkm+lz is0Q== X-Received: by 10.49.39.161 with SMTP id q1mr28035870qek.66.1379549028556; Wed, 18 Sep 2013 17:03:48 -0700 (PDT) Original-Received: by 10.49.82.11 with HTTP; Wed, 18 Sep 2013 17:03:48 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: ppTGjkBr9G_NWDmL47d9Go5m34Q X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c02::229 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:93452 Archived-At: On Wed, Sep 18, 2013 at 1:57 PM, Jorge <1gato0a@gmail.com> wrote: > [...] every time I compose an email, I type `c' in Gmail (to open compose), > then C-a (to select all), C-c , change focus to Emacs, C-M-y (which I have > bound to clipboard-yank), M-x delete-trailing-whitespace, edit the email, > C-x h, C-M-w (which I have bound to clipboard-kill-ring-save), change focus > to gmail, C-v. I have eased the problem with some Emacs Lisp. The following is in my .emacs: (global-set-key "\C-x\C-g" 'gmail) (setq gmail-temp-file (make-temp-file "gmail")) (defun gmail-enter () "Visit gmail-temp-file, delete all text in it, yank the X clipboard, delete trailing whitespace, go to beginning of buffer." (interactive) (find-file gmail-temp-file) (delete-region (point-min) (point-max)) (clipboard-yank) (delete-trailing-whitespace) (goto-char (point-min))) (defun gmail-leave () "Copy the whole buffer to the X clipboard, kill it." (interactive) (clipboard-kill-ring-save (point-min) (point-max)) (save-buffer) (kill-buffer)) (defun gmail (prefix) "Without prefix argument: call gmail-enter. With prefix argument: call gmail-leave" (interactive "P") (if prefix (gmail-leave) (gmail-enter))) Did I do anything wrong? Regards