Re: [O] Org minor mode in mail-mode

2011-09-14 Thread Rene
Eric Abrahamsen eric at ericabrahamsen.net writes:

 
 Thanks for this hint! I had been advising fill-paragraph, this seems
 like a more comprehensive solution.

What is strange though is that (turn-on-orgstruct++) messes up with the header
separator (--text follows this line--) when calling M-q (fill-paragraph);
whereas (turn-on-orgstruct) doesn't pose any problem.

Why such a different behavior between turn-on-orgstruct++ and turn-on-orgstruct?

Is that a feature or a bug?

--
Rene




Re: [O] Org minor mode in mail-mode

2011-09-09 Thread Rene
René jlr_0 at 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)
 
 in order make use of Org minor mode (struct, tbl) within mail-mode.
 
 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.

I found the right solution.  I just needed to toggle Filladapt minor mode.
This way `auto-fill-mode' and the `fill-paragraph' command are both smarter
about guessing a proper fill-prefix and finding paragraph boundaries when
indented lines and paragraphs are used.

  (require 'filladapt)
  (setq-default filladapt-mode t)

--
Rene




Re: [O] Org minor mode in mail-mode

2011-09-09 Thread Eric Abrahamsen
On Sat, Sep 10 2011, Rene wrote:

 René jlr_0 at 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)
 
 in order make use of Org minor mode (struct, tbl) within mail-mode.
 
 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.

 I found the right solution.  I just needed to toggle Filladapt minor mode.
 This way `auto-fill-mode' and the `fill-paragraph' command are both smarter
 about guessing a proper fill-prefix and finding paragraph boundaries when
 indented lines and paragraphs are used.

   (require 'filladapt)
   (setq-default filladapt-mode t)

Thanks for this hint! I had been advising fill-paragraph, this seems
like a more comprehensive solution.




Re: [O] Org minor mode in mail-mode

2011-05-02 Thread Rene
  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.

As matter of fact, the trouble comes from `turn-on-orgstruct++'.  

Using `turn-on-orgstruct' instead is alright.  When called `fill-paragraph'
operates without interfering with the mail header.

 Another idea would be to change `paragraph-start' and
 `paragraph-separate' values when turning on orgstruct and orgtbl.

Does not seem to work for me.

--
Rene





[O] Org minor mode in mail-mode

2011-03-09 Thread René
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)

in order make use of Org minor mode (struct, tbl) within mail-mode.

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.

It turns out that the org minor mode rebinds M-q to
`orgstruct-hijacker-command-22' :

,
| M-q runs the command orgstruct-hijacker-command-22, which is an
| interactive Lisp function.
|
| It is bound to M-q.
|
| (orgstruct-hijacker-command-22 arg)
|
| In Structure, run `fill-paragraph'.
| Outside of structure, run the binding of `\361'.
`

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? 

--
René