Re: [RFC] Rewrite org-(forward|backward)-paragraph

2020-06-13 Thread Nicolas Goaziou
Since there was no negative feedback, I pushed to master.

Thanks.



Re: [RFC] Rewrite org-(forward|backward)-paragraph

2020-06-08 Thread Nicolas Goaziou
Hello,

Kévin Le Gouguec  writes:

> I don't know how useful my feedback will be, since I'm not a heavy user
> of paragraph-based movement[1], but here goes!

Thank you!

> I've danced around ORG-NEWS to assess the changes; what I observed does
> feel closer to text-mode (point moves to the blank lines between
> paragraphs instead of to the paragraph starts), the other changes I
> could spot do not strike me as deal-breaking:
>
> - point now jumps over tight lists[2] instead of stopping at each
> item,

The idea is to avoid some trivial moves where C-n would be sufficient,
e.g., in tables, properties drawers. Also Text mode skip those, since it
doesn't understand such structures.

> - point stops a few more times within code blocks, acting like
>   #+begin_src and #+end_src are paragraphs of their own, instead of
>   jumping over the whole block; also, forward and backward movements are
>   now symmetric 
>
> Are there other situations where you think your changes could be
> controversial?

I don't think it's much controversial, but stop points are necessarily
opinionated. I hope they make sense.

Also, testing could unveil some bugs.

>> WDYT?e Also, what should be done with M-{ and M-}?
>
> FWIW, I think that reducing the distance between Org mode and The Rest
> of Emacs™ is a commendable goal, so I would vote for binding paragraph
> functions to M-{ and M-}, and moving element functions to C- and
> C-.  I realize that this might be too big a change for the sake of
> conformity though.

Honestly, I don't know if Sexp-based navigation is useful at all. Does
anyone use such navigation ?

> (And again: I don't use these functions very often, so my vote probably
> shouldn't carry too much weight.)

I don't either. I didn't notice there was a difference until recently.

Regards,

-- 
Nicolas Goaziou



Re: [RFC] Rewrite org-(forward|backward)-paragraph

2020-06-08 Thread Kévin Le Gouguec
Hi Nicolas!

I don't know how useful my feedback will be, since I'm not a heavy user
of paragraph-based movement[1], but here goes!

Nicolas Goaziou  writes:

> In any case, the purpose of this rewrite is to mimic more closely
> expected behaviour from `forward-paragraph' and `backward-paragraph'
> functions, as found, e.g., in Text mode. Unlike Text mode, navigation in
> Org mode is usually not linear, but both should feel the same, for
> example, when the document is indeed linear.

I've danced around ORG-NEWS to assess the changes; what I observed does
feel closer to text-mode (point moves to the blank lines between
paragraphs instead of to the paragraph starts), the other changes I
could spot do not strike me as deal-breaking:

- point now jumps over tight lists[2] instead of stopping at each item,

- point stops a few more times within code blocks, acting like
  #+begin_src and #+end_src are paragraphs of their own, instead of
  jumping over the whole block; also, forward and backward movements are
  now symmetric 

Are there other situations where you think your changes could be
controversial?

> WDYT? Also, what should be done with M-{ and M-}?

FWIW, I think that reducing the distance between Org mode and The Rest
of Emacs™ is a commendable goal, so I would vote for binding paragraph
functions to M-{ and M-}, and moving element functions to C- and
C-.  I realize that this might be too big a change for the sake of
conformity though.

(And again: I don't use these functions very often, so my vote probably
shouldn't carry too much weight.)


Thank you for working on this!


[1] Curly brackets are cumbersome with AZERTY, so I never took the habit
of moving by paragraphs outside org-mode.  Likewise with Org's
 bindings: my fingers are too lazy to reach for the arrow
keys for something as often-used as movement.

[2] I.e. lists without newlines between items.