From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Org minor mode in mail-mode Date: Sun, 20 Mar 2011 09:53:50 -0400 Message-ID: <877hbtc2z5.fsf@fastmail.fm> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=39577 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q1J4s-0002Yb-W0 for emacs-orgmode@gnu.org; Sun, 20 Mar 2011 09:53:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q1J4r-0003ym-LD for emacs-orgmode@gnu.org; Sun, 20 Mar 2011 09:53:54 -0400 Received: from out3.smtp.messagingengine.com ([66.111.4.27]:42494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q1J4r-0003yd-HS for emacs-orgmode@gnu.org; Sun, 20 Mar 2011 09:53:53 -0400 In-Reply-To: (=?utf-8?Q?=22Ren?= =?utf-8?Q?=C3=A9=22's?= message of "Wed, 9 Mar 2011 13:56:00 +0000 (UTC)") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?utf-8?Q?Ren=C3=A9?= Cc: emacs-orgmode@gnu.org Ren=C3=A9 writes: > Here is the the configuration I run > > (defun turn-on-full-org-mailing () > (turn-on-orgstruct++) > (turn-on-orgtbl) > (load "org-html-mail")) > > (add-hook 'mail-mode-hook 'turn-on-full-org-mailing) > > Unfortunately with this, calling M-q (fill-paragraph) right after the > header separator ("--text follows this line--") leads to filling the > header along with the first paragraph of my mail. > [...] > > Any idea on how to make use of org minor mode in mail-mode and still > be able to fill-paragraph without impacting mail headers?=20 The org minor modes set the local value of fill-paragraph-function to org-fill-paragraph. You can override this by adding a line to your hook function: (defun turn-on-full-org-mailing () (turn-on-orgstruct++) (turn-on-orgtbl) (load "org-html-mail") (setq fill-paragraph-function 'message-fill-paragraph)) I'm not sure how this will affect calling fill on lists or tables, however. A proper fix would probably add a test to org-fill-paragraph to see if we are in message mode. Best, Matt