[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Re: Org minor mode in mail-mode
From: |
Matt Lundin |
Subject: |
[O] Re: Org minor mode in mail-mode |
Date: |
Sun, 20 Mar 2011 09:53:50 -0400 |
User-agent: |
Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) |
René <address@hidden> 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?
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