From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: Outline cycling does not preserve point's position Date: Tue, 10 Sep 2013 14:48:22 +0800 Message-ID: <87ioy92mvd.fsf@ericabrahamsen.net> References: <868uz8sufg.fsf@somewhere.org> <86vc2cqvnb.fsf@somewhere.org> <86y57676t1.fsf@somewhere.org> <89E7FDB6-0F5A-4362-959C-C4B9844A235C@gmail.com> <86txhu7696.fsf@somewhere.org> <0A62C6DE-B3AD-458A-9AB4-92B61A6D3D63@gmail.com> <86ppsi75st.fsf@somewhere.org> <87eh8yo0el.fsf@bzg.ath.cx> <87li365ixg.fsf@gmail.com> <87d2oi57fg.fsf@gmail.com> <7CB7B681-DD2E-446C-AE45-DDCA204EE95C@gmail.com> <5855E8E1-9730-4A29-89FF-E35C64E54EDD@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJHjr-0007Zm-V9 for emacs-orgmode@gnu.org; Tue, 10 Sep 2013 02:47:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJHjk-00058q-L8 for emacs-orgmode@gnu.org; Tue, 10 Sep 2013 02:47:51 -0400 Received: from plane.gmane.org ([80.91.229.3]:40404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJHjk-00058W-Ek for emacs-orgmode@gnu.org; Tue, 10 Sep 2013 02:47:44 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VJHji-0001yu-0H for emacs-orgmode@gnu.org; Tue, 10 Sep 2013 08:47:42 +0200 Received: from 114.252.246.40 ([114.252.246.40]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Sep 2013 08:47:42 +0200 Received: from eric by 114.252.246.40 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Sep 2013 08:47:42 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Carsten Dominik writes: > On 10.9.2013, at 05:47, Carsten Dominik wrote: > >> >> On 9.9.2013, at 17:41, Nicolas Goaziou wrote: >> >>> Carsten Dominik 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)? >> >> No, I guess not. Lets just leave it the way it is, but implement >> alternative behavior in source code blocks. I agree with the arguments you make below. > > One more thought: What if the paragraph motion commands did use elements, but > ignored the hierarchy. So they jump to the next headline, paragraph, table, src block, item? > > I think this would feel similar to what paragraph motion does in text mode. > > - Carsten I once got halfway through implementing a pair of functions, org-next-element and org-previous-element, that would do just that (and for this very reason -- I still feel like the present behavior of "M-}" and "M-{" is surprising and inconvenient). org-next-element sort of went: 1. Check if org-element-at-point has a :contents-begin, and if it does, and we're not there yet, then go to it (then skip over property drawers). 2. If it doesn't, or we're already there, call org-forward-element. I can't remember why I didn't finish it. I think there were weird edge cases, and org-previous-element turned out to be more complicated, and I got distracted. I do think these would be better options for M-{ and M-}, though... E