From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: emails written in Org Mode Date: Thu, 10 Jul 2014 06:41:59 -0400 Message-ID: References: <87r41uwdiy.fsf@andrew.cmu.edu> <877g3mxpu3.fsf@alphaville.bos.redhat.com> <87pphd39e7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5Bt9-0004Tj-IV for emacs-orgmode@gnu.org; Thu, 10 Jul 2014 06:47:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5Bt2-0008KR-LR for emacs-orgmode@gnu.org; Thu, 10 Jul 2014 06:47:42 -0400 Received: from mail-qg0-x233.google.com ([2607:f8b0:400d:c04::233]:61569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5Bt2-0008KN-IW for emacs-orgmode@gnu.org; Thu, 10 Jul 2014 06:47:36 -0400 Received: by mail-qg0-f51.google.com with SMTP id z60so7441244qgd.10 for ; Thu, 10 Jul 2014 03:47:36 -0700 (PDT) In-reply-to: <87pphd39e7.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Thorsten Jolitz Cc: emacs-orgmode@gnu.org Hi Thorsten and others, Thanks to your help I have it set up well. Here is my setup, based on the idea from John Kitchin to just switch major modes: 1. I've set mu4e so that the reply line starts with "*" (an Org section) like this: #+BEGIN_SRC emacs-lisp (setq message-citation-line-format "* On %Y-%m-%d at %R, %f wrote:") #+END_SRC Now, the quoted part of the email is its own section. 2. I've added a function to switch between org-mode and mu4e-compose-mode, and bound it to C-@, so I can easily swap modes: #+BEGIN_SRC emacs-lisp (defun kdm-mu4e-org-compose () "Switch to/from mu4e-compose-mode and org-mode" (interactive) (if (eq 'mu4e-compose-mode (buffer-local-value 'major-mode (current-buffer))) (org-mode) (mu4e-compose-mode))) (global-set-key "\M-@" 'kdm-mu4e-org-compose) #+END_SRC With this, I read emails in mu4e. When I hit reply, I reply normally. If I want to drop into Org mode for the reply, I do so with M-@, use Org, and then M-@ back to mu4e before sending. I've just set this up. We'll see how well it works. mu4e used to support Org and I'm sure it will in the future, and then things might be better integrated, but I think this will work for now. -k. * On 2014-07-10 at 04:28, Thorsten Jolitz wrote: > Ken Mankoff writes: > > Hi Ken, > >> orgstruct++-mode and orgtbl-mode help a lot. It would be nice to be able >> to execute code too. > > they are both nice but not the "real thing" > >> I have an email in to the mu4e group about just switching to org-mode >> and then back to message-mode. Since mu4e isn't gnus, and doesn't use >> plain message-mode as the major mode, I need to switch back to the mu4e >> compose mode, but it lists as "m4e:compose" in the modeline, and that >> isn't a major mode I can figure out how to switch to. > > When you start writing an email in mu4e, could you just: > > 1. do > > ,---- > | M-: major-mode > `---- > > 2. do M-x mark-whole-buffer & M-x kill-ring-save, i.e. > > ,---- > | C-x h > | M-w > `---- > > and post the results? > > And maybe figure out if in the mu4e world there exists a customizable > variable like: > > ,----[ C-h v mail-header-separator RET ] > | mail-header-separator is a variable defined in `sendmail.el'. > | Its value is "--text follows this line--" > | > | Documentation: > | Line used to separate headers from text in messages being composed. > | You can customize this variable. > `---- > > This would probably give me all the info I need to adapt outorg. > >> On 2014-07-09 at 16:03, Nick Dokos wrote: > >>> John Kitchin writes: >>> >>>> Can't you just change your buffer mode to org-mode, compose, change back >>>> to message-mode and send? Did you want to do more than that? >>>> >>> >>> ... or, depending on what one wants to do, adding one of the minor modes >>> (orgstruct-mode, orgstruct++-mode, orgtbl-mode) to message-mode buffers >>> may be enough.