From: "Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: Outline cycling does not preserve point's position
Date: Mon, 09 Sep 2013 19:42:37 +0200 [thread overview]
Message-ID: <86y575nb76.fsf@somewhere.org> (raw)
In-Reply-To: 87d2oi57fg.fsf@gmail.com
Hello Nicolas,
Nicolas Goaziou wrote:
> Carsten Dominik <carsten.dominik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
>> It is extremely predictable if you know about the structure of an Org
>> document and if you think in elements.
>
> It's a Sexp motion.
>
>> It is unexpected for a user who is used to C-arrow doing paragraph
>> motion. In Org, org-backward-element climbs out if a hierarchy. This
>> is not what happens in other modes with this command. That is what
>> I mean with unexpected.
>
> OK. Do you want it to return an error if there's no element at the same
> level above (or below for the forward counterpart)?
>
>> Don't get me wrong. I love the element motion stuff. But I am
>> satisfied for it to be available on M-{ and M-}.
>>
>> I like your proposal to introduce a variable for special src behavior.
>> I personally would also like a variable that allows me to keep the
>> paragraph commands on C-arrow (because I have almost equally
>> convenient bindings with M-{}) - but maybe that is just me?
>
> But `org-forward-element'/`org-backward-element' are the paragraph
> commands for Org. Unlike to Text mode, contents in Org have a depth. So
> it's not just about stopping at blank lines. Even stopping at blank
> lines is not satisfying:
>
> XParagraph
> | a | table |
>
> Another paragraph
>
> A decent forward paragraph command should stop at the table here. On the
> other hand, it doesn't make much sense to stop at the blank line below:
>
> X#+begin_src emacs-lisp
> ;; line 1
>
> ;; line 2
> #+end_src
> Another paragraph
>
> When depth isn't involved, I think that `org-forward-element' is as good
> as it can get as a paragraph motion command, and far better than
> `forward-paragraph' from "paragraphs.el".
I think everybody would be happy if what you proposed at 13:32 can be
implemented:
>>> From: Nicolas Goaziou <n.goaziou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>> Date: Mon, 09 Sep 2013 13:30:33 +0200 (6 hours, 7 minutes, 27 seconds ago)
>>>
>>> Hello,
>>>
>>> Carsten Dominik <carsten.dominik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>>
>>>> This might be difficult, but not impossible.
>>>> I think this might be a question for Nicolas to answer?
>>>
>>> It boils down to something like:
>>>
>>> (if (eq (org-element-type (org-element-at-point)) 'src-block)
>>> ;; Do forward-paragraph according to language.
>>> ...
>>> (org-forward-element))
>>>
>>> Though, I suggest to introduce a variable similar to
>>> `org-src-tab-acts-natively', or group both features in the same variable
>>> like `org-act-natively-on-src-block'.
That way, one has `org-forward-element' for moving inside most elements of the
documents, but, inside code blocks, the behavior is similar to the one we
would get if we were editing the code in an indirect buffer.
Eventually, this behavior can be controlled, as you suggested, by a variable.
I guess this is very good, and would content most, if not all, of us!
Best regards,
Seb
--
Sebastien Vauban
next prev parent reply other threads:[~2013-09-09 17:42 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-07 12:11 Outline cycling does not preserve point's position Sebastien Vauban
2013-09-07 14:17 ` Carsten Dominik
[not found] ` <BED1FBAA-8BB5-45D6-8328-11C0BB2DF015-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-09-07 19:28 ` Sebastien Vauban
2013-09-08 6:16 ` Carsten Dominik
2013-09-09 7:57 ` Sebastien Vauban
2013-09-08 11:03 ` Eric Schulte
2013-09-09 8:39 ` Sebastien Vauban
2013-09-08 16:23 ` Carsten Dominik
2013-09-09 8:11 ` Sebastien Vauban
2013-09-09 8:13 ` Carsten Dominik
2013-09-09 8:23 ` Sebastien Vauban
2013-09-09 8:27 ` Carsten Dominik
2013-09-09 8:33 ` Sebastien Vauban
2013-09-09 8:38 ` Bastien
2013-09-09 9:05 ` Carsten Dominik
2013-09-09 11:32 ` Nicolas Goaziou
2013-09-09 11:49 ` Bastien
2013-09-09 15:27 ` Nicolas Goaziou
2013-09-09 14:23 ` Carsten Dominik
2013-09-09 15:16 ` Jambunathan K
2013-09-09 15:41 ` Nicolas Goaziou
2013-09-09 17:42 ` Sebastien Vauban [this message]
2013-09-10 3:47 ` Carsten Dominik
2013-09-10 6:03 ` Carsten Dominik
2013-09-10 6:48 ` Eric Abrahamsen
2013-09-10 7:32 ` Suvayu Ali
2013-09-10 7:53 ` Suvayu Ali
2013-09-10 7:58 ` Carsten Dominik
2013-09-10 8:16 ` Carsten Dominik
2013-09-10 8:50 ` Suvayu Ali
2013-09-10 9:02 ` Carsten Dominik
2013-09-10 9:50 ` Suvayu Ali
2013-09-10 16:33 ` Nicolas Goaziou
2013-09-10 18:35 ` Jambunathan K
2013-09-10 18:39 ` Nicolas Goaziou
2013-09-10 19:22 ` Jambunathan K
2013-09-10 19:40 ` Jambunathan K
2013-09-10 19:52 ` Nicolas Goaziou
2013-09-10 18:58 ` Suvayu Ali
2013-09-10 19:07 ` Suvayu Ali
2013-09-10 19:48 ` Nicolas Goaziou
2013-09-10 20:13 ` Suvayu Ali
2013-09-10 20:29 ` Nicolas Goaziou
2013-09-10 21:08 ` Carsten Dominik
2013-09-11 12:24 ` Suvayu Ali
2013-09-12 6:54 ` Jambunathan K
2013-09-12 9:11 ` Nicolas Goaziou
2013-09-12 9:28 ` Jambunathan K
2013-09-12 9:47 ` Suvayu Ali
2013-09-11 2:49 ` Jambunathan K
2013-09-11 11:09 ` Nicolas Goaziou
2013-09-11 11:34 ` Jambunathan K
2013-09-11 15:19 ` Nicolas Goaziou
2013-09-11 15:40 ` Jambunathan K
2013-09-11 15:31 ` Jambunathan K
2013-09-11 15:40 ` Nicolas Goaziou
2013-09-11 16:14 ` Jambunathan K
2013-09-11 20:01 ` Nicolas Goaziou
2013-09-11 22:11 ` Suvayu Ali
2013-09-12 6:43 ` Jambunathan K
2013-09-12 9:07 ` Nicolas Goaziou
2013-09-12 10:12 ` Jambunathan K
2013-09-12 7:17 ` Sebastien Vauban
2013-09-13 10:57 ` Carsten Dominik
2013-09-13 22:29 ` Nicolas Goaziou
2013-09-14 5:33 ` Carsten Dominik
2013-09-14 17:16 ` Suvayu Ali
2013-09-15 4:39 ` Carsten Dominik
2013-09-10 20:16 ` Samuel Wales
2013-09-10 5:06 ` Jambunathan K
2013-09-11 3:57 ` Jambunathan K
2013-09-11 15:47 ` Nicolas Goaziou
2013-09-09 8:38 ` Carsten Dominik
2013-09-09 11:30 ` Nicolas Goaziou
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86y575nb76.fsf@somewhere.org \
--to=sva-news-d0wtavr13harg/idocfnwg@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.