emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Lundin <mdl@imapmail.org>
To: René <jlr_0@yahoo.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Org minor mode in mail-mode
Date: Sun, 20 Mar 2011 09:53:50 -0400	[thread overview]
Message-ID: <877hbtc2z5.fsf@fastmail.fm> (raw)
In-Reply-To: <loom.20110309T143507-758@post.gmane.org> ("René"'s message of "Wed, 9 Mar 2011 13:56:00 +0000 (UTC)")

René <jlr_0@yahoo.com> 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

  reply	other threads:[~2011-03-20 13:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-09 13:56 Org minor mode in mail-mode René
2011-03-20 13:53 ` Matt Lundin [this message]
2011-03-20 14:59   ` Nicolas
2011-05-02 13:33     ` Rene
2011-09-10  2:12 ` Rene
2011-09-10  5:03   ` Eric Abrahamsen
2011-09-14 11:07     ` Rene

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877hbtc2z5.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=jlr_0@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).