emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas <n.goaziou@gmail.com>
To: Matt Lundin <mdl@imapmail.org>
Cc: emacs-orgmode@gnu.org, René <jlr_0@yahoo.com>
Subject: Re: Org minor mode in mail-mode
Date: Sun, 20 Mar 2011 15:59:27 +0100	[thread overview]
Message-ID: <87ipvd6do0.fsf@gmail.com> (raw)
In-Reply-To: <877hbtc2z5.fsf@fastmail.fm> (Matt Lundin's message of "Sun, 20 Mar 2011 09:53:50 -0400")

Hello,

Matt Lundin <mdl@imapmail.org> 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

  reply	other threads:[~2011-03-20 14:59 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
2011-03-20 14:59   ` Nicolas [this message]
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=87ipvd6do0.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jlr_0@yahoo.com \
    --cc=mdl@imapmail.org \
    /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).