From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Subject: Re: Org minor mode in mail-mode Date: Sun, 20 Mar 2011 15:59:27 +0100 Message-ID: <87ipvd6do0.fsf@gmail.com> References: <877hbtc2z5.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=45808 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q1K6N-00068v-Sx for emacs-orgmode@gnu.org; Sun, 20 Mar 2011 10:59:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q1K6M-0005RA-Lu for emacs-orgmode@gnu.org; Sun, 20 Mar 2011 10:59:31 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:60316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q1K6M-0005R6-GI for emacs-orgmode@gnu.org; Sun, 20 Mar 2011 10:59:30 -0400 Received: by fxm18 with SMTP id 18so5570027fxm.0 for ; Sun, 20 Mar 2011 07:59:29 -0700 (PDT) In-Reply-To: <877hbtc2z5.fsf@fastmail.fm> (Matt Lundin's message of "Sun, 20 Mar 2011 09:53:50 -0400") 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: Matt Lundin Cc: emacs-orgmode@gnu.org, =?utf-8?Q?Ren=C3=A9?= Hello, Matt Lundin writes: >> 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? > > 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. It will break list and tables filling. > A proper fix would probably add a test to org-fill-paragraph to see if > we are in message mode. Another idea would be to change `paragraph-start' and `paragraph-separate' values when turning on orgstruct and orgtbl. #+begin_src emacs-lisp (setq paragraph-start (concat (regexp-quote mail-header-separator) "$\\|" "-- $\\|" ; signature delimiter "---+$\\|" ; delimiters for forwarded messages page-delimiter "$\\|" ; spoiler warnings ".*wrote:$\\|" ; attribution lines message-cite-prefix-regexp "$\\|" ; empty lines in quoted text ; mml tags "<#!*/?\\(multipart\\|part\\|external\\|mml\\|secure\\)" paragraph-start)) (setq paragraph-separate paragraph-start) #+end_src Regards, -- Nicolas