[Orgmode] Re: Alinea filling (hanlding of explicit line-breaks)

2011-02-16 Thread Stefan Monnier
 An important question here is: is it important for M-} to ignore those \\?
 I guess so, this is the current default Org behaviour anyhow.

Good.

 as far as I understand, it would be anyhow possible to move point on
 an alinea-by-alinea basis just by configuring the tailing \\ as
 anohter paragraph separator.

Actually, no, because paragraph-separate would cause the whole line that
ends with \\ to be treated as not being part of a paragraph, and
paragraph-start wouldn't be appropriate either.
Hence the good above :-(

 Of course fill-paragraph-function sucks because it only applies to
 fill-paragraph and not to fill-region.

 Do you mean that `fill-paragraph-function' is some kind of obsolete
 feature and that people should use another kind of hook, and if so
 which one?

Yes and no: there is no replacement for it.  There is
fill-forward-paragraph-function, which can handle some of the cases for
which fill-paragraph-function has been used, but there would need to be
something like a fill-region-as-paragraph-function and we don't have
that yet :-(


Stefan

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Alinea filling (hanlding of explicit line-breaks)

2011-02-15 Thread Stefan Monnier
 Maybe an example is better to explain what I need, imagine that I have
 the following two paragraphs:
[...]
 Where I assumed that alineas are separated by either an empty line or a
 tailing `\\' while paragraphs are separated by just an empty line.

An important question here is: is it important for M-} to ignore those \\?

 What you say (making distinct separation of paragraph for motion and of
 fillable-region) is more than what I needed, because I assumed that
 alineas and paragraphs are not completely separate things, as an alinea
 is always a subset of a paragraph.

Yes, that's usually the case.  But it's more trouble for the code to
enforce that fill-forward-paragraph-function only moves within the
current paragraph, so the extra power comes at no cost and you don't
have to use it.

 Concerning EUPP, after more thinking, I realized that alineas are not
 the good approach: actually I don't need any special filling but rather
 to disable filling in some occasions, and for that using the
 fill-paragraph-function is a better approach.

Of course fill-paragraph-function sucks because it only applies to
fill-paragraph and not to fill-region.

 So, for Org I will just install emacs-24 --- or at least the fill
 package, is it backward compatible with an emacs-23 ?

No idea.  It's likely, but I really can't guarantee it.


Stefan

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Alinea filling (hanlding of explicit line-breaks)

2011-02-15 Thread Vincent Belaïche
 Maybe an example is better to explain what I need, imagine that I have
 the following two paragraphs:
[...]
 Where I assumed that alineas are separated by either an empty line or a
 tailing `\\' while paragraphs are separated by just an empty line.
 
An important question here is: is it important for M-} to ignore those \\?
 

I guess so, this is the current default Org behaviour anyhow. as far as
I understand, it would be anyhow possible to move point on an
alinea-by-alinea basis just by configuring the tailing \\ as anohter
paragraph separator.

I usually use alinea as follows:

---
John Foo (2011-02-16T07:36:02) said:\\
blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah

Mikaël Bar (2011-02-15T16:28:16) said:\\
gronk gronk gronk gronk gronk gronk gronk gronk gronk gronk gronk gronk
gronk gronk gronk gronk
---

I don't want M-} to recognize alineas as separate paragraphs because
the first alinea of each paragraph is just one line.

[...]

 Of course fill-paragraph-function sucks because it only applies to
 fill-paragraph and not to fill-region.

Do you mean that `fill-paragraph-function' is some kind of obsolete
feature and that people should use another kind of hook, and if so which
one?

[...]
 
 
 
Stefan

  Vincent.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Alinea filling (hanlding of explicit line-breaks)

2011-02-14 Thread Stefan Monnier
 The proposal is to add, in addition to paragraph separator, an alinea
 separator. Accordingly there would be a forward-alinea function similar
 to forward-paragraph.

I'm not completely sure I understand the details, so let me try to
describe what I think you're suggesting: you're suggesting to
distinguish the notion of paragraph (as used by the paragraph-forward
movement command) from the notion of unit of text to fillm which you
call alinea.  And you also propose to complete this by adding
a corresponding forward-alinea command.

Is that right?

If that's the case, then I think we already have most of it in Emacs-24,
in the form of the fill-forward-paragraph-function, which decouples the
navigation command from the unit of text to fill.  You can see it in
action in ChangeLog files, where M-q will only refill the current
alinea starting with a function or variable name whereas M-} will jump
over the text of the whole file (which is made of several alineas, each
describe one (or sometimes a set of) variables or functions).


Stefan

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Alinea filling (hanlding of explicit line-breaks)

2011-02-14 Thread Samuel Wales
Vincent, examples?

-- 
The Kafka Pandemic:
http://thekafkapandemic.blogspot.com/2010/12/welcome-to-kafka-pandemic-two-forces_9182.html
I support the Whittemore-Peterson Institute (WPI)
===
I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MLV paper.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Alinea filling (hanlding of explicit line-breaks)

2011-02-14 Thread Vincent Belaïche
Hi,

Good to see that I am not the only one needing that sort of things.

Maybe an example is better to explain what I need, imagine that I have
the following two paragraphs:

---
aaa a aaa a aaa a  a   a  aaa a aa a aaa  
aaa aa  a a a aa  a  a  aaa  a aa a 
a aa a aaa aa aa aaa a aa a   aaa   a aaa aaa a 
 aaa a  a aaa aaa  a a  a aa a aaa aa a  
aaa a a aaa  a a a a  a aa aaa   aaa aa a a 
a aaa aaa a aa a aa aaa a a\\
bbb b bbb b bbb b  b   b  bbb b bb b bbb  
bbb bb  b b b bb  b  b  bbb  b bb b 
b bb b bbb bb bb bbb b bb b   bbb   b bbb bbb b 
 bbb b  b bbb bbb  b b  b bb b bbb bb b  
bbb b b bbb  b b b b  b bb bbb   bbb bb b b 
b bbb bbb b bb b bb bbb b b

ccc c ccc c ccc c  c   c  ccc c cc c ccc  
ccc cc  c c c cc  c  c  ccc  c cc c 
c cc c ccc cc cc ccc c cc c   ccc   c ccc ccc c 
 ccc c  c ccc ccc  c c  c cc c ccc cc c  
ccc c c ccc  c c c c  c cc ccc   ccc cc c c 
c ccc ccc c cc c cc ccc c c\\
ddd d ddd d ddd d  d   d  ddd d dd d ddd  
ddd dd  d d d dd  d  d  ddd  d dd d 
d dd d ddd dd dd ddd d dd d   ddd   d ddd ddd d 
 ddd d  d ddd ddd  d d  d dd d ddd dd d  
ddd d d ddd  d d d d  d dd ddd   ddd dd d d 
d ddd ddd d dd d dd ddd d d
---

after filling I wish that it would become

---
aaa a aaa a aaa a  a   a  aaa a aa a aaa
 aaa aa  a a a aa  a  a  aaa 
a aa a a aa a aaa aa aa aaa a aa a   aaa 
 a aaa aaa a  aaa a  a aaa aaa  a a 
a aa a aaa aa a  aaa a a aaa  a a a a  a
aa aaa   aaa aa a a a aaa aaa a aa a aa aaa
a a\\
bbb b bbb b bbb b  b   b  bbb b bb b bbb
 bbb bb  b b b bb  b  b  bbb 
b bb b b bb b bbb bb bb bbb b bb b   bbb 
 b bbb bbb b  bbb b  b bbb bbb  b b 
b bb b bbb bb b  bbb b b bbb  b b b b  b
bb bbb   bbb bb b b b bbb bbb b bb b bb bbb
b b


ccc c ccc c ccc c  c   c  ccc c cc c ccc
 ccc cc  c c c cc  c  c  ccc 
c cc c c cc c ccc cc cc ccc c cc c   ccc 
 c ccc ccc c  ccc c  c ccc ccc  c c 
c cc c ccc cc c  ccc c c ccc  c c c c  c
cc ccc   ccc cc c c c ccc ccc c cc c cc ccc
c c\\
ddd d ddd d ddd d  d   d  ddd d dd d ddd
 ddd dd  d d d dd  d  d  ddd 
d dd d d dd d ddd dd dd ddd d dd d   ddd 
 d ddd ddd d  ddd d  d ddd ddd  d d 
d dd d ddd dd d  ddd d d ddd  d d d d  d
dd ddd   ddd dd d d d ddd ddd d dd d dd ddd
d d
---

Where I assumed that alineas are separated by either an empty line or a
tailing `\\' while paragraphs are separated by just an empty line.

What you say (making distinct separation of paragraph for motion and of
fillable-region) is more than what I needed, because I assumed that
alineas and paragraphs are not completely separate things, as an alinea
is always a subset of a paragraph.

Concerning EUPP, after more thinking, I realized that alineas are not
the good approach: actually I don't need any special filling but rather
to disable filling in some occasions, and for that using the
fill-paragraph-function is a better approach.

So, for Org I will just install emacs-24 --- or at least the fill
package, is it backward compatible with an emacs-23 ?

Thanks for the feedback,
   Vincent.




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.