Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-08 Thread Bastien
Hi Eric,

Eric S Fraga e.fr...@ucl.ac.uk writes:

 If you're certain you're loading Org correctly, please try the attached
 patch and just tell me if the error disappears.

 The patch works!

I'm still resisting applying this patch, because I don't understand why
the infinite recursion occurs.

Can you help me again by trying to give me a minimal setup where this
infinite recursion occurs with latest Org?

We're nearly there...  thanks a lot!

-- 
 Bastien



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-08 Thread Eric S Fraga
Bastien b...@gnu.org writes:

 Hi Eric,

 Eric S Fraga e.fr...@ucl.ac.uk writes:

 If you're certain you're loading Org correctly, please try the
 attached patch and just tell me if the error disappears.

 The patch works!

 I'm still resisting applying this patch, because I don't understand why
 the infinite recursion occurs.

 Can you help me again by trying to give me a minimal setup where this
 infinite recursion occurs with latest Org?

 We're nearly there...  thanks a lot!

Strange.  With orgstruct++-mode now enabled (manually, not through a
hook), without your patch and without most of my org customisations, I
cannot seem to get the infinite recursion happening.

This is with org from git as of a few minutes ago.  However, I cannot
guarantee that some bits of org as shipped with emacs 24.1.50.1 haven't
been loaded before I manually load the latest version.  The problem is
that I cannot get gnus to startup properly with emacs -Q.  My gnus
configuration is just too confused... :(

Argg.

In any case, given that it seems to work just fine without my
customisations, there is something in my normal configuration (and
Nicolas's, I guess) that would seem to be triggering the infinite
recursion.  I will start bisecting my org configuration to track this
down but this could take some time!

I would definitely suggest not applying that patch as it doesn't appear
necessary in normal circumstances.

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-544-g505cc7




Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-06 Thread Bastien
Hi Nicolas,

Nicolas Goaziou n.goaz...@gmail.com writes:

 ((adaptive-fill-function (quote nil)) (adaptive-fill-regexp (quote \(\([

[...]

This looks good.

 It's the same as the previous bug: when I try to debug
 `org-indent-line-function', the problem disappears.

I pushed another fix: I now rely on the existing org-let
function, which safely evaluate let constructs.

-- 
 Bastien



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-06 Thread Eric Fraga
Bastien b...@gnu.org writes:

 Hi Nicolas,

 Nicolas Goaziou n.goaz...@gmail.com writes:

 ((adaptive-fill-function (quote nil)) (adaptive-fill-regexp (quote \(\([

 [...]

 This looks good.

 It's the same as the previous bug: when I try to debug
 `org-indent-line-function', the problem disappears.

 I pushed another fix: I now rely on the existing org-let
 function, which safely evaluate let constructs.

Bastien,

unfortunately, I still have problems.  I am using org completely up to
date (a few minutes ago).  I do not turn orgstruct++-mode on
automatically at all any more but instead turn it on manually by

  M-x orgstruct++-mode RET

once I'm in a Message buffer.

I tried it just now, replying to your email as my test.  Turned on the
mode, tried to fill the quoted text and it all got mixed up.  Undid
that.  Then went to the bottom and tried to insert a new line and got:

  org-indent-line-function: Lisp nesting exceeds `max-lisp-eval-depth'

Turned off orgstruct++-mode (by M-x ... RET again) and filling of quoted
text works fine as does normal writing.

I will try (tomorrow) to isolate this with emacs -Q but my problem is
that my gnus configuration is really really messy and difficult to
isolate.

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-489-g541288




Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-06 Thread Thorsten Jolitz

Eric Fraga e.fr...@ucl.ac.uk writes:

 unfortunately, I still have problems.  I am using org completely up to
 date (a few minutes ago). 

me too, I just posted on the gnus.user list ... 
-- 
cheers,
Thorsten




Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-06 Thread Bastien
Hi Eric,

Eric Fraga e.fr...@ucl.ac.uk writes:

 unfortunately, I still have problems.  I am using org completely up to
 date (a few minutes ago).  I do not turn orgstruct++-mode on
 automatically at all any more but instead turn it on manually by

   M-x orgstruct++-mode RET

 once I'm in a Message buffer.

 I tried it just now, replying to your email as my test.  Turned on the
 mode, tried to fill the quoted text and it all got mixed up.  

You are using the exact same version of Gnus and Emacs than I do.
Unless you forgot to reload the correct (uncompiled?) version of
Org -- I barely dare suggesting this :) -- then this comes from 
something in your configuration.

But no matter where it comes from, we should fix it!

 Undid that.  Then went to the bottom and tried to insert a new line
 and got:

   org-indent-line-function: Lisp nesting exceeds `max-lisp-eval-depth'

If you're certain you're loading Org correctly, please try the attached
patch and just tell me if the error disappears.

One possibility I can think of is that perhaps you turn on both
orgstruct-mode and orgstruct++-mode. In that case when orgstruct++-mode
will save the fill*/indent* variables from the _previous_ mode, it will
suppose they are the ones from message-mode, which will not be true and
will perhaps cause a loop.  The attached patch prevents such a loop.

 Turned off orgstruct++-mode (by M-x ... RET again) and filling of quoted
 text works fine as does normal writing.

This is already a progress against orgstruct++-mode as it worked before
... somewhat recomforting.

 I will try (tomorrow) to isolate this with emacs -Q but my problem is
 that my gnus configuration is really really messy and difficult to
 isolate.

We just need this:

C-x C-f ~/.gnus.el
M-x occur RET message*hook

Also check in your Emacs customization file.

HTH,

diff --git a/lisp/org.el b/lisp/org.el
index e7c42db..17a5bc2 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -20534,7 +20534,8 @@ If point is in an inline task, mark that task instead.
 (org-move-to-column column)
 (when (and orgstruct-is-++ (eq pos (point)))
   (org-let org-fb-vars
-	'(indent-according-to-mode)
+	'(or (eq indent-line-function 'org-indent-line-function)
+	 (indent-according-to-mode))
 
 (defun org-indent-drawer ()
   Indent the drawer at point.

-- 
 Bastien


Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-06 Thread Eric S Fraga
Bastien b...@gnu.org writes:

 Hi Eric,

Hello Bastien!

[...]

 You are using the exact same version of Gnus and Emacs than I do.
 Unless you forgot to reload the correct (uncompiled?) version of
 Org -- I barely dare suggesting this :) -- then this comes from 
 something in your configuration.

Definitely using the latest org!  And don't worry about asking: I have
done sillier things in the past :-(

 Undid that.  Then went to the bottom and tried to insert a new line
 and got:

   org-indent-line-function: Lisp nesting exceeds `max-lisp-eval-depth'

 If you're certain you're loading Org correctly, please try the attached
 patch and just tell me if the error disappears.

The patch works!

I have manually make orgstruct++-mode active: filling of paragraphs,
including quoted ones, seems to work and there is no longer any infinite
recursion.

[...]

 We just need this:

 C-x C-f ~/.gnus.el
 M-x occur RET message*hook

For completeness, I have no version of orgstruct++-mode or
orgstruct-mode automatically turned on by any hook!

Thanks again,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-529-g035ab3.dirty




Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-05 Thread Bastien
Hi Nicolas,

Nicolas Goaziou n.goaz...@gmail.com writes:

 Further, with orgstuct++-mode, trying to add a new line (i.e. my
 response), I get the following error message:

 ,
 | org-indent-line-function: Lisp nesting exceeds `max-lisp-eval-depth' [3 
 times]
 `

 I confirm the problem with latest Org (Org-mode version 7.8.09
 (release_7.8.09-483-g01d83d)) and GNU Emacs 24.0.95.1.

I pushed a fix -- can you test and confirm?

Thanks,

-- 
 Bastien



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-05 Thread Nicolas Goaziou
Hello,

Bastien b...@gnu.org writes:

 I pushed a fix -- can you test and confirm?

I get the following error every time I try to indent:

  org-between-regexps-p: Variable binding depth exceeds max-specpdl-size


Regards,

-- 
Nicolas Goaziou



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-05 Thread Bastien
Hi Nicolas,

Nicolas Goaziou n.goaz...@gmail.com writes:

 I pushed a fix -- can you test and confirm?

 I get the following error every time I try to indent:

In org-mode or in message-mode?

   org-between-regexps-p: Variable binding depth exceeds
   max-specpdl-size

Does (setq max-specpdl-size 1) help in any way?

-- 
 Bastien



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-05 Thread Bastien
Nicolas Goaziou n.goaz...@gmail.com writes:

 Bastien b...@gnu.org writes:

 I pushed a fix -- can you test and confirm?

 I get the following error every time I try to indent:

   org-between-regexps-p: Variable binding depth exceeds
   max-specpdl-size

If you are in message-mode, please also provide the value of
`org-fb-vars' and try to debug `org-indent-line-function' to make sure
it stops at the first call of `org-between-regexps-p' (not at the ones
that may be called inside the `orgstruct++-with-major-mode-filling'
macro...)

Thanks!

-- 
 Bastien



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-05 Thread Nicolas Goaziou
Bastien b...@gnu.org writes:

 Nicolas Goaziou n.goaz...@gmail.com writes:

 I get the following error every time I try to indent:

 In org-mode or in message-mode?

I meant in Message mode.

   org-between-regexps-p: Variable binding depth exceeds
   max-specpdl-size

 Does (setq max-specpdl-size 1) help in any way?

Not at all.

After increasing `max-specpdl-size', I have to increase
`max-lisp-eval-depth' and it still fails. I just have to wait longer.


Regards,

-- 
Nicolas Goaziou




Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-05 Thread Nicolas Goaziou
Bastien b...@gnu.org writes:

 Nicolas Goaziou n.goaz...@gmail.com writes:

 Bastien b...@gnu.org writes:

 I pushed a fix -- can you test and confirm?

 I get the following error every time I try to indent:

   org-between-regexps-p: Variable binding depth exceeds
   max-specpdl-size


 If you are in message-mode, please also provide the value of
 `org-fb-vars'

((adaptive-fill-function (quote nil)) (adaptive-fill-regexp (quote \(\([
]*[_.[:word:]]++\|[]*[]|]\)+\)[   ]*\|[   ]*\([-–!|#%;*·•‣⁃◦]+[  ]*\)*)) 
(fill-paragraph-function (quote message-fill-paragraph)) (paragraph-separate 
(quote --text follows this line--$\|[  ]*$\|-- $\|---+$\|^
$\|.*wrote:$\|\(\([ ]*[_.[:word:]]++\|[]*[]|]\)+\)[   
]*$\|#!*/?\(multipart\|part\|external\|mml\|secure\))) 
(auto-fill-inhibit-regexp (quote [  
]*\(|\|#\+\(tblfm\|orgtbl\|tblname\):\))) (paragraph-start (quote --text 
follows this line--$\|[]*$\|-- $\|---+$\|^$\|.*wrote:$\|\(\([ 
]*[_.[:word:]]++\|[]*[]|]\)+\)[   
]*$\|#!*/?\(multipart\|part\|external\|mml\|secure\))) (indent-line-function 
(quote indent-relative)) (auto-fill-function (quote message-do-auto-fill)))

 and try to debug `org-indent-line-function' to make sure
 it stops at the first call of `org-between-regexps-p' (not at the ones
 that may be called inside the `orgstruct++-with-major-mode-filling'
 macro...)

It's the same as the previous bug: when I try to debug
`org-indent-line-function', the problem disappears.


Regards,

-- 
Nicolas Goaziou



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-03 Thread Eric Fraga
Bastien b...@gnu.org writes:

 Hi Christopher,

 I've now fixed orgstuct++-mode so that you can turn it on and off
 safely.  Some Org filling functions fall back on the major-mode
 filling functions through a new defmacro.

 Please test and report any problem.

 Thanks!

Ummm, doesn't work well for me at all.  If I try to fill your main
paragraph above, the whole quoted text is filled into one
mess.  Without orgstuct++-mode, it works.

Further, with orgstuct++-mode, trying to add a new line (i.e. my
response), I get the following error message:

,
| org-indent-line-function: Lisp nesting exceeds `max-lisp-eval-depth' [3 times]
`

with the following backtrace:

,
| Debugger entered--Lisp error: (error Lisp nesting exceeds 
`max-lisp-eval-depth')
|   org-indent-line-function()
|   org-indent-line-function()
|   org-indent-line-function()
|   ... repeated ad infinitum ...
`

thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-482-gf47915




Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-03 Thread Bastien
Hi Eric,

Eric Fraga e.fr...@ucl.ac.uk writes:

 Ummm, doesn't work well for me at all.  If I try to fill your main
 paragraph above, the whole quoted text is filled into one
 mess.  Without orgstuct++-mode, it works.

 Further, with orgstuct++-mode, trying to add a new line (i.e. my
 response), I get the following error message:

 ,
 | org-indent-line-function: Lisp nesting exceeds `max-lisp-eval-depth' [3 
 times]
 `

 with the following backtrace:

 ,
 | Debugger entered--Lisp error: (error Lisp nesting exceeds 
 `max-lisp-eval-depth')
 |   org-indent-line-function()
 |   org-indent-line-function()
 |   org-indent-line-function()
 |   ... repeated ad infinitum ...
 `

Mh.. do you confirm this is from latest git?  More precisely,
please make sure you have this commit in your git log:

  http://orgmode.org/w/?p=org-mode.git;a=commit;h=a8c312

I don't see how the Emacs version could interfere here, but
please give it too -- along with the way you call orgstuct++-mode
for messages.  I do this:

(add-hook 'message-mode-hook 'turn-on-orgstruct++)

It works fine here.

Best,

-- 
 Bastien



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-03 Thread Nicolas Goaziou
Hello,

  Eric Fraga e.fr...@ucl.ac.uk writes:

 Further, with orgstuct++-mode, trying to add a new line (i.e. my
 response), I get the following error message:

 ,
 | org-indent-line-function: Lisp nesting exceeds `max-lisp-eval-depth' [3 
 times]
 `

I confirm the problem with latest Org (Org-mode version 7.8.09
(release_7.8.09-483-g01d83d)) and GNU Emacs 24.0.95.1.

I also use orgstruct++-mode.


Regards,

-- 
Nicolas Goaziou



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-03 Thread Bastien
Hi Nicolas,

Nicolas Goaziou n.goaz...@gmail.com writes:

 I confirm the problem with latest Org (Org-mode version 7.8.09
 (release_7.8.09-483-g01d83d)) and GNU Emacs 24.0.95.1.

 I also use orgstruct++-mode.

I can reproduce the problem with 

  (add-hook 'message-setup-hook 'turn-on-orgstruct++)

I cannot reproduce it with

  (add-hook 'message-mode-hook 'turn-on-orgstruct++)

Can you confirm this is the same for you?

(The manual advertizes using `message-mode-hook'.)

Thanks,

-- 
 Bastien



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-03 Thread Nicolas Goaziou
Hello,

Bastien b...@altern.org writes:

 Nicolas Goaziou n.goaz...@gmail.com writes:

 I can reproduce the problem with 

   (add-hook 'message-setup-hook 'turn-on-orgstruct++)

 I cannot reproduce it with

   (add-hook 'message-mode-hook 'turn-on-orgstruct++)

 Can you confirm this is the same for you?

No, it happens with `message-mode-hook'. Here is the relevant part of my
configuration:

#+begin_src elisp
(defun ngz-message-mode-hook-handler ()
  (turn-on-flyspell)
  (turn-on-orgtbl)
  (turn-on-orgstruct++)
  (set (make-local-variable 'org-footnote-tag-for-non-org-mode-files) nil)
  (local-set-key (kbd C-c C-x f) 'org-footnote-action))

(add-hook 'message-mode-hook 'ngz-message-mode-hook-handler)
#+end_src


Regards,

-- 
Nicolas Goaziou



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-03 Thread Bastien
Nicolas Goaziou n.goaz...@gmail.com writes:

 No, it happens with `message-mode-hook'. Here is the relevant part of my
 configuration:

I can't reproduce this with a bare emacs-24.0.94 -Q (this is the oldest
Emacs I can test with.)

Can you detail the steps to reproduce?  

Sorry this is boring, but I don't want to let such a serious but in the
wild. 

Thanks!

-- 
 Bastien



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-03 Thread Nicolas Goaziou
Bastien b...@altern.org writes:

 Nicolas Goaziou n.goaz...@gmail.com writes:

 No, it happens with `message-mode-hook'. Here is the relevant part of my
 configuration:

 I can't reproduce this with a bare emacs-24.0.94 -Q (this is the oldest
 Emacs I can test with.)

 Can you detail the steps to reproduce?  

I cannot reproduce it with -Q (though indentation is strange at the
beginning).

I'm not sure where it comes from, though. It looks like an eisenbug to
me. Debugging `org-indent-line-function' didn't help.


Regards,

-- 
Nicolas Goaziou



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-01 Thread Bastien
Hi Christopher,

I've now fixed orgstuct++-mode so that you can turn it on and off
safely.  Some Org filling functions fall back on the major-mode 
filling functions through a new defmacro.

Please test and report any problem.

Thanks!

-- 
 Bastien



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-04-29 Thread Eric Fraga
Bastien b...@gnu.org writes:

 Hi Eric,

 Eric Fraga e.fr...@ucl.ac.uk writes:

 Thanks for this.  This behaviour has annoyed me for years now.  

 Me too...

 I've
 never gotten around to figuring out why I got this behaviour because I
 get caught up with writing the email and forget by the time I finish...

 I hope somebody can indeed fix this as it sounds quite straightforward
 (for better elisp programmers than I...).

 This should be fixed now in master.

 Can you confirm?

 There is one remaining use-case I didn't fix: the case where you use M-q
 on the first line of the message (things are messed up then.)  I don't
 know how to fix this, but this is a rather border-line case, as simply
 typing and using auto-fill does the right thing.

 Thanks for insisting on this!

Bastian,

Filling seems to work much better now but I don't know whether any of
this is org or gnus.  However, I am not sure what is happening
here.  With the following line in my configuration:

(add-hook 'message-setup-hook 'turn-on-orgstruct++)

all my emails end up indented strangely.  Specifically, if this email
had been composed with that hook entry, all my lines would have been
indented 2 spaces.  See my previous message to this list if you can find
such easily...

I commented out that line in my configuration and restarted Emacs to
compose this reply.  No indenting is happening (which is a good thing).

Very strange.  I do not understand why turning on orgstuct++ would cause
a default indentation of all text.

I am happy to explore this further if you give me some hint as to what
to try.

I am using gnus and org up to date as of yesterday (Australia time).  I
haven't updated today yet.

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-414-gb3e8a8




Re: [O] orgstuct++ does not lurk silently in the shadow

2012-04-29 Thread Eric Fraga

Eric Fraga e.fr...@ucl.ac.uk writes:


[...]

 Bastian,

 Filling seems to work much better now but I don't know whether any of
 this is org or gnus.  

Actually, I just noticed from my modeline that OrgTbl is
active.  However, I have searched everything in my configuration and
cannot see where I turn this on!  I am perturbed :(

The point being that orgstruct++-mode does cause problems with
indentation and filling in email messages but without it, but with
OrgTbl maybe, filling is working very nicely now.

Thanks again,
eric


-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-414-gb3e8a8




Re: [O] orgstuct++ does not lurk silently in the shadow

2012-04-29 Thread Bastien
Hi Eric,

Eric Fraga e.fr...@ucl.ac.uk writes:

 (add-hook 'message-setup-hook 'turn-on-orgstruct++)

Try this instead, as advertized in the manual:

(add-hook 'message-mode-hook 'turn-on-orgstruct++)
   

HTH,

-- 
 Bastien



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-04-29 Thread Christopher Schmidt
Bastien b...@gnu.org writes:

 This should be fixed now in master.

Thank you so much for fixing this.

There is still one major issue, though.  Consider this text:

,
|  rms
|  foo
| 
|  org-mode
`

Place the point somewhere in the first or second line and do a M-q.
Vanilla message-mode correctly recognises the paragraph prefix whereas
an use of Org's enhancements breaks this.

Other than that, disabling orgstruct++-mode after enabling it breaks
everything.  I get tons of Lisp nesting exceeds `max-lisp-eval-depth',
even when doing simple things like moving around the buffer or trying to
execute and extended command.

For the record, I use Gnus and Org master (b5f4b52).  This is how my
integration is set up:

#+begin_src emacs-lisp
(add-hook 'gnus-message-setup-hook
  (lambda ()
(turn-on-orgtbl)
(turn-on-orgstruct++)
(set (make-local-variable 'org-footnote-auto-label) 'plain)
(set
 (make-local-variable 'org-footnote-tag-for-non-org-mode-files)
 nil)))

(define-key message-mode-map (kbd C-c f)
  (lambda ()
(interactive)
(save-restriction
  (my-message-narrow-to-body)
  (org-footnote-action

(add-hook 'message-send-hook
  (lambda ()
(save-restriction
  (my-message-narrow-to-body)
  (org-footnote-normalize
#+end-src

Christopher



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-04-29 Thread Christopher Schmidt
Christopher Schmidt christop...@ch.ristopher.com writes:

 There is still one major issue, though.  Consider this text:

 ,
 |  rms
 |  foo
 | 
 |  org-mode
 `

 Place the point somewhere in the first or second line and do a M-q.
 Vanilla message-mode correctly recognises the paragraph prefix whereas
 an use of Org's enhancements breaks this.

It all boils down to orgstruct++-mode setting non-org-vars like
paragraph-start or paragraph-separate to the org values.  This is fine,
even the doc string says so.

,[ C-h f orgstruct++-mode RET ]
| Toggle `orgstruct-mode', the enhanced version of it.
| In addition to setting orgstruct-mode, this also exports all indentation
| and autofilling variables from org-mode into the buffer.  It will also
| recognize item context in multiline items.
`

This does not work with message-mode and any other mode that imposes a
special document structure, though.  I think the docstring and the
manual should note that explicitly, and the line promoting the use of
turn-on-orgstruct++ in message-mode-hook in (info (org)Orgstruct mode)
should be removed.

Christopher



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-04-26 Thread Bastien
Hi Eric,

Eric Fraga e.fr...@ucl.ac.uk writes:

 Thanks for this.  This behaviour has annoyed me for years now.  

Me too...

 I've
 never gotten around to figuring out why I got this behaviour because I
 get caught up with writing the email and forget by the time I finish...

 I hope somebody can indeed fix this as it sounds quite straightforward
 (for better elisp programmers than I...).

This should be fixed now in master.

Can you confirm?

There is one remaining use-case I didn't fix: the case where you use M-q
on the first line of the message (things are messed up then.)  I don't
know how to fix this, but this is a rather border-line case, as simply
typing and using auto-fill does the right thing.

Thanks for insisting on this!

-- 
 Bastien



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-04-25 Thread Eric Fraga
Christopher Schmidt christop...@ch.ristopher.com writes:

 Hi gurus,

 I have a problem with Org-mode version 7.8.03
 (release_7.8.03.351.g47eb3) on GNU Emacs 24.0.94.1
 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.9) of 2012-03-08.

 (info (org)Orgstruct mode) says that one is allowed to use orgtbl-mode
 in message-mode.  Unfortunately this does not work as expected.

 Recipe:

 emacs -q
 C-x m
 M-q # fill-paragraph ignores the message header
 eval: (add-hook 'message-mode-hook 'turn-on-orgstruct++)
 C-x m
 M-q # fill-paragraph does ignore the message header

 The bug is caused by fill-paragraph-function not being set back to
 message-fill-paragraph when orgstruct-hijacker-command-22 falls back to
 fill-paragraph.

 Christopher

Thanks for this.  This behaviour has annoyed me for years now.  I've
never gotten around to figuring out why I got this behaviour because I
get caught up with writing the email and forget by the time I finish...

I hope somebody can indeed fix this as it sounds quite straightforward
(for better elisp programmers than I...).

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org-mode version 7.8.06 (release_7.8.06.181.g67694.dirty)




[O] orgstuct++ does not lurk silently in the shadow

2012-03-08 Thread Christopher Schmidt
Hi gurus,

I have a problem with Org-mode version 7.8.03
(release_7.8.03.351.g47eb3) on GNU Emacs 24.0.94.1
(x86_64-unknown-linux-gnu, GTK+ Version 2.24.9) of 2012-03-08.

(info (org)Orgstruct mode) says that one is allowed to use orgtbl-mode
in message-mode.  Unfortunately this does not work as expected.

Recipe:

emacs -q
C-x m
M-q # fill-paragraph ignores the message header
eval: (add-hook 'message-mode-hook 'turn-on-orgstruct++)
C-x m
M-q # fill-paragraph does ignore the message header

The bug is caused by fill-paragraph-function not being set back to
message-fill-paragraph when orgstruct-hijacker-command-22 falls back to
fill-paragraph.

Christopher