From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: Outline cycling does not preserve point's position Date: Wed, 11 Sep 2013 08:19:22 +0530 Message-ID: <8761u8m5sd.fsf@gmail.com> References: <7CB7B681-DD2E-446C-AE45-DDCA204EE95C@gmail.com> <5855E8E1-9730-4A29-89FF-E35C64E54EDD@gmail.com> <20130910073257.GO20690@kuru.dyndns-at-home.com> <20130910075345.GP20690@kuru.dyndns-at-home.com> <25A21DB7-B2E5-47BB-8A64-594A15CB24B8@gmail.com> <20130910085057.GQ20690@kuru.dyndns-at-home.com> <4ED2509E-8A2E-4ED2-BFCF-CB7B27F1D2B4@gmail.com> <20130910095043.GR20690@kuru.dyndns-at-home.com> <87a9jk8wmr.fsf@gmail.com> <20130910185843.GA20690@kuru.dyndns-at-home.com> <871u4w8nkq.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJaSX-0002kT-KE for emacs-orgmode@gnu.org; Tue, 10 Sep 2013 22:47:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJaSP-0001Ix-4u for emacs-orgmode@gnu.org; Tue, 10 Sep 2013 22:47:13 -0400 Received: from mail-pd0-x22b.google.com ([2607:f8b0:400e:c02::22b]:47370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJaSO-0001Ir-PJ for emacs-orgmode@gnu.org; Tue, 10 Sep 2013 22:47:05 -0400 Received: by mail-pd0-f171.google.com with SMTP id g10so8474442pdj.2 for ; Tue, 10 Sep 2013 19:47:03 -0700 (PDT) In-Reply-To: <871u4w8nkq.fsf@gmail.com> (Nicolas Goaziou's message of "Tue, 10 Sep 2013 21:48:53 +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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org, Carsten Dominik --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Some suggestions: 1. Give a better name. Say "pre-order" traversal of element in the parse tree. [1] 2. Now if I=20 M-h, C-x C-x and Deactivate mark,=20 I essentially short-circuit the traversal of whole subtree rooted at point. There should be a convenient binding for it. Same as forward-sexp? 3. When you say "Shouldn't be here", it means that point is NOT at the canonical C-down position. But you do seem to "adjust" it to the canonical position down below. May be you want to remove it or say something more positive like - In the middle of nowhere. Trying to get to the assembly point. > New version: Couple of issues. 1. Visit the attached file. Make sure everything is visible. 2. M-< 3. C-down gives a stacktrace. See below. ---------------------------------------------------------------- Within the same file,=20 1. Move to bol of the empty line that is in <<>> section. = That is not an empty line but has spaces. 2. C-down 3. Cursor does NOT do a stop over at "References" headline but skips past to References to Fuzzy Target ---------------------------------------------------------------- Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) =3D(2 nil) (or (eobp) (=3D (point) end)) (cond ((or (eobp) (=3D (point) end))) ((eq type (quote table-row)) (goto-= char (org-element-property :end (org-element-property :parent element)))) (= (and post-affiliated (< (point) post-affiliated)) (goto-char post-affiliate= d)) ((eq type (quote table)) (goto-char end)) ((not contents-begin) (goto-c= har end)) ((< (point) contents-begin) (if (not (memq type (quote (footnote-= definition item)))) (goto-char contents-begin) (end-of-line) (org-forward-l= inear-element))) ((>=3D (point) contents-end) (goto-char end)) ((eq type (q= uote paragraph)) (goto-char end)) ((eq type (quote plain-list)) (end-of-lin= e) (org-forward-linear-element)) ((eq type (quote verse-block)) (or (re-sea= rch-forward "^[ ]*$" contents-end t) (goto-char end))) (t (error "This sho= uldn't happen"))) (let* ((origin (point)) (element (org-element-at-point)) (type (org-eleme= nt-type element)) (post-affiliated (org-element-property :post-affiliated e= lement)) (contents-begin (org-element-property :contents-begin element)) (c= ontents-end (org-element-property :contents-end element)) (end (let ((end (= org-element-property :end element)) (parent element)) (while (and (setq par= ent (org-element-property :parent parent)) (=3D (org-element-property :cont= ents-end parent) end)) (setq end (org-element-property :end parent))) end))= ) (skip-chars-forward " \n") (or (eobp) (goto-char (max (line-beginning-po= sition) origin))) (cond ((or (eobp) (=3D (point) end))) ((eq type (quote ta= ble-row)) (goto-char (org-element-property :end (org-element-property :pare= nt element)))) ((and post-affiliated (< (point) post-affiliated)) (goto-cha= r post-affiliated)) ((eq type (quote table)) (goto-char end)) ((not content= s-begin) (goto-char end)) ((< (point) contents-begin) (if (not (memq type (= quote (footnote-definition item)))) (goto-char contents-begin) (end-of-line= ) (org-forward-linear-element))) ((>=3D (point) contents-end) (goto-char en= d)) ((eq type (quote paragraph)) (goto-char end)) ((eq type (quote plain-li= st)) (end-of-line) (org-forward-linear-element)) ((eq type (quote verse-blo= ck)) (or (re-search-forward "^[ ]*$" contents-end t) (goto-char end))) (t = (error "This shouldn't happen"))) (if (memq (org-invisible-p2) (quote (org-= hide-block outline))) (progn (goto-char end)))) org-forward-linear-element() call-interactively(org-forward-linear-element nil nil) command-execute(org-forward-linear-element) --=-=-= Content-Type: text/x-org Content-Disposition: attachment; filename=cdown.org **** <<>> *** References **** References to Fuzzy Target This is a link to [[Fuzzy Target]]. --=-=-=--