emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 24.0.95; (org) outline-style cycling + outline-mode
@ 2012-04-03  5:51 Jambunathan K
  2012-04-09 18:54 ` Bastien
       [not found] ` <handler.11160.B.133343233325083.ack@debbugs.gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Jambunathan K @ 2012-04-03  5:51 UTC (permalink / raw)
  To: bug-gnu-emacs, Orgmode

1. Install the following hook

     (add-hook 'outline-mode-hook
       (lambda ()
         (define-key outline-mode-map [(tab)] 'org-cycle)
         (define-key outline-mode-map [(shift tab)] 'org-global-cycle)))

2. (setq debug-on-error t)
3. Visit NEWS file with C-h n
4. Place the cursor at the end of the line as shown below.

,---- ^^^^^ is where the cursor is.
|      ---^^^^^^
|      ** Emacs can be compiled with SELinux support.^^^^^^
|      This happens by default if a suitably recent version of the library is
|      found at build time.  To prevent this, use the configure option^^^^^^^^
|      `--without-selinux'.  See below for SELinux features.
| 
|    
`----

5. Press S-TAB. The following error is reported.  I would expect some
   sort of cycling to happen.
       let: Wrong type argument: stringp, nil

6. This doesn't happen if I am in the middle of a paragraph/line.

7. Here is the sequence of calls.

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  looking-at(nil)
  (let ((case-fold-search nil)) (looking-at org-todo-line-regexp))
  (save-excursion (beginning-of-line 1) (let ((case-fold-search nil)) (looking-at org-todo-line-regexp)))
  (and (looking-at "[ 	]*$") (save-excursion (beginning-of-line 1) (let ((case-fold-search nil)) (looking-at org-todo-line-regexp))) (string= (match-string 3) ""))
  org-point-at-end-of-empty-headline()
  (if (org-point-at-end-of-empty-headline) (progn (setq this-command (quote org-cycle-level)) (let ((cur-level (org-current-level)) (prev-level (org-get-previous-line-level))) (cond ((= prev-level 0) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= prev-level cur-level) (org-do-demote)) ((= prev-level 1) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= cur-level 1) (loop repeat (/ (- prev-level 1) (org-level-increment)) do (org-do-demote))) ((< cur-level prev-level) (org-do-promote)) ((> cur-level prev-level) (loop repeat (+ 1 (/ ... ...)) do (org-do-promote)))) t)))
  (when (org-point-at-end-of-empty-headline) (setq this-command (quote org-cycle-level)) (let ((cur-level (org-current-level)) (prev-level (org-get-previous-line-level))) (cond ((= prev-level 0) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= prev-level cur-level) (org-do-demote)) ((= prev-level 1) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= cur-level 1) (loop repeat (/ (- prev-level 1) (org-level-increment)) do (org-do-demote))) ((< cur-level prev-level) (org-do-promote)) ((> cur-level prev-level) (loop repeat (+ 1 (/ (- cur-level prev-level) (org-level-increment))) do (org-do-promote)))) t))
  (let ((org-adapt-indentation nil)) (when (org-point-at-end-of-empty-headline) (setq this-command (quote org-cycle-level)) (let ((cur-level (org-current-level)) (prev-level (org-get-previous-line-level))) (cond ((= prev-level 0) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= prev-level cur-level) (org-do-demote)) ((= prev-level 1) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= cur-level 1) (loop repeat (/ (- prev-level 1) (org-level-increment)) do (org-do-demote))) ((< cur-level prev-level) (org-do-promote)) ((> cur-level prev-level) (loop repeat (+ 1 (/ ... ...)) do (org-do-promote)))) t)))
  org-cycle-level()
  (or (org-cycle-level) (org-cycle-item-indentation))
  (and org-cycle-level-after-item/entry-creation (or (org-cycle-level) (org-cycle-item-indentation)))
  (or (run-hook-with-args-until-success (quote org-tab-first-hook)) (and org-cycle-level-after-item/entry-creation (or (org-cycle-level) (org-cycle-item-indentation))))
  (if (or (run-hook-with-args-until-success (quote org-tab-first-hook)) (and org-cycle-level-after-item/entry-creation (or (org-cycle-level) (org-cycle-item-indentation)))) nil (let* ((limit-level (or org-cycle-max-level (and (boundp (quote org-inlinetask-min-level)) org-inlinetask-min-level (1- org-inlinetask-min-level)))) (nstars (and limit-level (if org-odd-levels-only (and limit-level (1- ...)) limit-level))) (org-outline-regexp (if (not (eq major-mode (quote org-mode))) outline-regexp (concat "\\*" (if nstars (format "\\{1,%d\\} " nstars) "+ ")))) (bob-special (and org-cycle-global-at-bob (not arg) (bobp) (not (looking-at org-outline-regexp)))) (org-cycle-hook (if bob-special (delq (quote org-optimize-window-after-visibility-change) (copy-sequence org-cycle-hook)) org-cycle-hook)) (pos (point))) (if (or bob-special (equal arg (quote (4)))) (setq arg t)) (cond ((equal arg (quote (16))) (setq last-command (quote dummy)) (org-set-startup-visibility) (message "Startup visibility, plus VISIBILITY properties")) ((equal arg (quote (64))) (show-all) (message "Entire buffer visible, including drawers")) ((org-at-table-p (quote any)) (if (org-at-table\.el-p) (message "Use C-c ' to edit table.el tables") (if arg (org-table-edit-field t) (org-table-justify-field-maybe) (call-interactively (quote org-table-next-field))))) ((run-hook-with-args-until-success (quote org-tab-after-check-for-table-hook))) ((eq arg t) (org-cycle-internal-global)) ((and org-drawers org-drawer-regexp (save-excursion (beginning-of-line 1) (looking-at org-drawer-regexp))) (org-flag-drawer (not (get-char-property (match-end 0) (quote invisible))))) ((integerp arg) (save-excursion (org-back-to-heading) (outline-up-heading (if (< arg 0) (- arg) (- ... arg))) (org-show-subtree))) ((and (featurep (quote org-inlinetask)) (org-inlinetask-at-task-p) (or (bolp) (not (eq org-cycle-emulate-tab ...)))) (org-inlinetask-toggle-visibility)) ((org-try-cdlatex-tab)) ((and (or (and org-cycle-include-plain-lists (org-at-item-p)) (save-excursion (beginning-of-line 1) (looking-at org-outline-regexp))) (or (bolp) (not (eq org-cycle-emulate-tab ...)))) (org-cycle-internal-local)) (buffer-read-only (org-back-to-heading)) ((run-hook-with-args-until-success (quote org-tab-after-check-for-cycling-hook))) ((org-try-structure-completion)) ((run-hook-with-args-until-success (quote org-tab-before-tab-emulation-hook))) ((and (eq org-cycle-emulate-tab (quote exc-hl-bol)) (or (not (bolp)) (not (looking-at org-outline-regexp)))) (call-interactively (global-key-binding "	"))) ((if (and (memq org-cycle-emulate-tab (quote ...)) (save-excursion (beginning-of-line 1) (looking-at "[ 	]*")) (or (and ... ...) (and ... ...))) t (eq org-cycle-emulate-tab t)) (call-interactively (global-key-binding "	"))) (t (save-excursion (org-back-to-heading) (org-cycle))))))
  (unless (or (run-hook-with-args-until-success (quote org-tab-first-hook)) (and org-cycle-level-after-item/entry-creation (or (org-cycle-level) (org-cycle-item-indentation)))) (let* ((limit-level (or org-cycle-max-level (and (boundp (quote org-inlinetask-min-level)) org-inlinetask-min-level (1- org-inlinetask-min-level)))) (nstars (and limit-level (if org-odd-levels-only (and limit-level (1- ...)) limit-level))) (org-outline-regexp (if (not (eq major-mode (quote org-mode))) outline-regexp (concat "\\*" (if nstars (format "\\{1,%d\\} " nstars) "+ ")))) (bob-special (and org-cycle-global-at-bob (not arg) (bobp) (not (looking-at org-outline-regexp)))) (org-cycle-hook (if bob-special (delq (quote org-optimize-window-after-visibility-change) (copy-sequence org-cycle-hook)) org-cycle-hook)) (pos (point))) (if (or bob-special (equal arg (quote (4)))) (setq arg t)) (cond ((equal arg (quote (16))) (setq last-command (quote dummy)) (org-set-startup-visibility) (message "Startup visibility, plus VISIBILITY properties")) ((equal arg (quote (64))) (show-all) (message "Entire buffer visible, including drawers")) ((org-at-table-p (quote any)) (if (org-at-table\.el-p) (message "Use C-c ' to edit table.el tables") (if arg (org-table-edit-field t) (org-table-justify-field-maybe) (call-interactively (quote org-table-next-field))))) ((run-hook-with-args-until-success (quote org-tab-after-check-for-table-hook))) ((eq arg t) (org-cycle-internal-global)) ((and org-drawers org-drawer-regexp (save-excursion (beginning-of-line 1) (looking-at org-drawer-regexp))) (org-flag-drawer (not (get-char-property (match-end 0) (quote invisible))))) ((integerp arg) (save-excursion (org-back-to-heading) (outline-up-heading (if (< arg 0) (- arg) (- ... arg))) (org-show-subtree))) ((and (featurep (quote org-inlinetask)) (org-inlinetask-at-task-p) (or (bolp) (not (eq org-cycle-emulate-tab ...)))) (org-inlinetask-toggle-visibility)) ((org-try-cdlatex-tab)) ((and (or (and org-cycle-include-plain-lists (org-at-item-p)) (save-excursion (beginning-of-line 1) (looking-at org-outline-regexp))) (or (bolp) (not (eq org-cycle-emulate-tab ...)))) (org-cycle-internal-local)) (buffer-read-only (org-back-to-heading)) ((run-hook-with-args-until-success (quote org-tab-after-check-for-cycling-hook))) ((org-try-structure-completion)) ((run-hook-with-args-until-success (quote org-tab-before-tab-emulation-hook))) ((and (eq org-cycle-emulate-tab (quote exc-hl-bol)) (or (not (bolp)) (not (looking-at org-outline-regexp)))) (call-interactively (global-key-binding "	"))) ((if (and (memq org-cycle-emulate-tab (quote ...)) (save-excursion (beginning-of-line 1) (looking-at "[ 	]*")) (or (and ... ...) (and ... ...))) t (eq org-cycle-emulate-tab t)) (call-interactively (global-key-binding "	"))) (t (save-excursion (org-back-to-heading) (org-cycle))))))
  org-cycle((4))
  (cond ((integerp arg) (show-all) (hide-sublevels arg) (setq org-cycle-global-status (quote contents))) ((equal arg (quote (4))) (org-set-startup-visibility) (message "Startup visibility, plus VISIBILITY properties.")) (t (org-cycle (quote (4)))))
  (let ((org-cycle-include-plain-lists (if (eq major-mode (quote org-mode)) org-cycle-include-plain-lists nil))) (cond ((integerp arg) (show-all) (hide-sublevels arg) (setq org-cycle-global-status (quote contents))) ((equal arg (quote (4))) (org-set-startup-visibility) (message "Startup visibility, plus VISIBILITY properties.")) (t (org-cycle (quote (4))))))
  org-global-cycle(nil)
  call-interactively(org-global-cycle nil nil)
  recursive-edit()
  debug(error (wrong-type-argument stringp nil))
  looking-at(nil)
  (let ((case-fold-search nil)) (looking-at org-todo-line-regexp))
  (save-excursion (beginning-of-line 1) (let ((case-fold-search nil)) (looking-at org-todo-line-regexp)))
  (and (looking-at "[ 	]*$") (save-excursion (beginning-of-line 1) (let ((case-fold-search nil)) (looking-at org-todo-line-regexp))) (string= (match-string 3) ""))
  org-point-at-end-of-empty-headline()
  (if (org-point-at-end-of-empty-headline) (progn (setq this-command (quote org-cycle-level)) (let ((cur-level (org-current-level)) (prev-level (org-get-previous-line-level))) (cond ((= prev-level 0) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= prev-level cur-level) (org-do-demote)) ((= prev-level 1) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= cur-level 1) (loop repeat (/ (- prev-level 1) (org-level-increment)) do (org-do-demote))) ((< cur-level prev-level) (org-do-promote)) ((> cur-level prev-level) (loop repeat (+ 1 (/ ... ...)) do (org-do-promote)))) t)))
  (when (org-point-at-end-of-empty-headline) (setq this-command (quote org-cycle-level)) (let ((cur-level (org-current-level)) (prev-level (org-get-previous-line-level))) (cond ((= prev-level 0) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= prev-level cur-level) (org-do-demote)) ((= prev-level 1) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= cur-level 1) (loop repeat (/ (- prev-level 1) (org-level-increment)) do (org-do-demote))) ((< cur-level prev-level) (org-do-promote)) ((> cur-level prev-level) (loop repeat (+ 1 (/ (- cur-level prev-level) (org-level-increment))) do (org-do-promote)))) t))
  (let ((org-adapt-indentation nil)) (when (org-point-at-end-of-empty-headline) (setq this-command (quote org-cycle-level)) (let ((cur-level (org-current-level)) (prev-level (org-get-previous-line-level))) (cond ((= prev-level 0) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= prev-level cur-level) (org-do-demote)) ((= prev-level 1) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= cur-level 1) (loop repeat (/ (- prev-level 1) (org-level-increment)) do (org-do-demote))) ((< cur-level prev-level) (org-do-promote)) ((> cur-level prev-level) (loop repeat (+ 1 (/ ... ...)) do (org-do-promote)))) t)))
  org-cycle-level()
  (or (org-cycle-level) (org-cycle-item-indentation))
  (and org-cycle-level-after-item/entry-creation (or (org-cycle-level) (org-cycle-item-indentation)))
  (or (run-hook-with-args-until-success (quote org-tab-first-hook)) (and org-cycle-level-after-item/entry-creation (or (org-cycle-level) (org-cycle-item-indentation))))
  (if (or (run-hook-with-args-until-success (quote org-tab-first-hook)) (and org-cycle-level-after-item/entry-creation (or (org-cycle-level) (org-cycle-item-indentation)))) nil (let* ((limit-level (or org-cycle-max-level (and (boundp (quote org-inlinetask-min-level)) org-inlinetask-min-level (1- org-inlinetask-min-level)))) (nstars (and limit-level (if org-odd-levels-only (and limit-level (1- ...)) limit-level))) (org-outline-regexp (if (not (eq major-mode (quote org-mode))) outline-regexp (concat "\\*" (if nstars (format "\\{1,%d\\} " nstars) "+ ")))) (bob-special (and org-cycle-global-at-bob (not arg) (bobp) (not (looking-at org-outline-regexp)))) (org-cycle-hook (if bob-special (delq (quote org-optimize-window-after-visibility-change) (copy-sequence org-cycle-hook)) org-cycle-hook)) (pos (point))) (if (or bob-special (equal arg (quote (4)))) (setq arg t)) (cond ((equal arg (quote (16))) (setq last-command (quote dummy)) (org-set-startup-visibility) (message "Startup visibility, plus VISIBILITY properties")) ((equal arg (quote (64))) (show-all) (message "Entire buffer visible, including drawers")) ((org-at-table-p (quote any)) (if (org-at-table\.el-p) (message "Use C-c ' to edit table.el tables") (if arg (org-table-edit-field t) (org-table-justify-field-maybe) (call-interactively (quote org-table-next-field))))) ((run-hook-with-args-until-success (quote org-tab-after-check-for-table-hook))) ((eq arg t) (org-cycle-internal-global)) ((and org-drawers org-drawer-regexp (save-excursion (beginning-of-line 1) (looking-at org-drawer-regexp))) (org-flag-drawer (not (get-char-property (match-end 0) (quote invisible))))) ((integerp arg) (save-excursion (org-back-to-heading) (outline-up-heading (if (< arg 0) (- arg) (- ... arg))) (org-show-subtree))) ((and (featurep (quote org-inlinetask)) (org-inlinetask-at-task-p) (or (bolp) (not (eq org-cycle-emulate-tab ...)))) (org-inlinetask-toggle-visibility)) ((org-try-cdlatex-tab)) ((and (or (and org-cycle-include-plain-lists (org-at-item-p)) (save-excursion (beginning-of-line 1) (looking-at org-outline-regexp))) (or (bolp) (not (eq org-cycle-emulate-tab ...)))) (org-cycle-internal-local)) (buffer-read-only (org-back-to-heading)) ((run-hook-with-args-until-success (quote org-tab-after-check-for-cycling-hook))) ((org-try-structure-completion)) ((run-hook-with-args-until-success (quote org-tab-before-tab-emulation-hook))) ((and (eq org-cycle-emulate-tab (quote exc-hl-bol)) (or (not (bolp)) (not (looking-at org-outline-regexp)))) (call-interactively (global-key-binding "	"))) ((if (and (memq org-cycle-emulate-tab (quote ...)) (save-excursion (beginning-of-line 1) (looking-at "[ 	]*")) (or (and ... ...) (and ... ...))) t (eq org-cycle-emulate-tab t)) (call-interactively (global-key-binding "	"))) (t (save-excursion (org-back-to-heading) (org-cycle))))))
  (unless (or (run-hook-with-args-until-success (quote org-tab-first-hook)) (and org-cycle-level-after-item/entry-creation (or (org-cycle-level) (org-cycle-item-indentation)))) (let* ((limit-level (or org-cycle-max-level (and (boundp (quote org-inlinetask-min-level)) org-inlinetask-min-level (1- org-inlinetask-min-level)))) (nstars (and limit-level (if org-odd-levels-only (and limit-level (1- ...)) limit-level))) (org-outline-regexp (if (not (eq major-mode (quote org-mode))) outline-regexp (concat "\\*" (if nstars (format "\\{1,%d\\} " nstars) "+ ")))) (bob-special (and org-cycle-global-at-bob (not arg) (bobp) (not (looking-at org-outline-regexp)))) (org-cycle-hook (if bob-special (delq (quote org-optimize-window-after-visibility-change) (copy-sequence org-cycle-hook)) org-cycle-hook)) (pos (point))) (if (or bob-special (equal arg (quote (4)))) (setq arg t)) (cond ((equal arg (quote (16))) (setq last-command (quote dummy)) (org-set-startup-visibility) (message "Startup visibility, plus VISIBILITY properties")) ((equal arg (quote (64))) (show-all) (message "Entire buffer visible, including drawers")) ((org-at-table-p (quote any)) (if (org-at-table\.el-p) (message "Use C-c ' to edit table.el tables") (if arg (org-table-edit-field t) (org-table-justify-field-maybe) (call-interactively (quote org-table-next-field))))) ((run-hook-with-args-until-success (quote org-tab-after-check-for-table-hook))) ((eq arg t) (org-cycle-internal-global)) ((and org-drawers org-drawer-regexp (save-excursion (beginning-of-line 1) (looking-at org-drawer-regexp))) (org-flag-drawer (not (get-char-property (match-end 0) (quote invisible))))) ((integerp arg) (save-excursion (org-back-to-heading) (outline-up-heading (if (< arg 0) (- arg) (- ... arg))) (org-show-subtree))) ((and (featurep (quote org-inlinetask)) (org-inlinetask-at-task-p) (or (bolp) (not (eq org-cycle-emulate-tab ...)))) (org-inlinetask-toggle-visibility)) ((org-try-cdlatex-tab)) ((and (or (and org-cycle-include-plain-lists (org-at-item-p)) (save-excursion (beginning-of-line 1) (looking-at org-outline-regexp))) (or (bolp) (not (eq org-cycle-emulate-tab ...)))) (org-cycle-internal-local)) (buffer-read-only (org-back-to-heading)) ((run-hook-with-args-until-success (quote org-tab-after-check-for-cycling-hook))) ((org-try-structure-completion)) ((run-hook-with-args-until-success (quote org-tab-before-tab-emulation-hook))) ((and (eq org-cycle-emulate-tab (quote exc-hl-bol)) (or (not (bolp)) (not (looking-at org-outline-regexp)))) (call-interactively (global-key-binding "	"))) ((if (and (memq org-cycle-emulate-tab (quote ...)) (save-excursion (beginning-of-line 1) (looking-at "[ 	]*")) (or (and ... ...) (and ... ...))) t (eq org-cycle-emulate-tab t)) (call-interactively (global-key-binding "	"))) (t (save-excursion (org-back-to-heading) (org-cycle))))))
  org-cycle((4))
  (cond ((integerp arg) (show-all) (hide-sublevels arg) (setq org-cycle-global-status (quote contents))) ((equal arg (quote (4))) (org-set-startup-visibility) (message "Startup visibility, plus VISIBILITY properties.")) (t (org-cycle (quote (4)))))
  (let ((org-cycle-include-plain-lists (if (eq major-mode (quote org-mode)) org-cycle-include-plain-lists nil))) (cond ((integerp arg) (show-all) (hide-sublevels arg) (setq org-cycle-global-status (quote contents))) ((equal arg (quote (4))) (org-set-startup-visibility) (message "Startup visibility, plus VISIBILITY properties.")) (t (org-cycle (quote (4))))))
  org-global-cycle(nil)
  call-interactively(org-global-cycle nil nil)
  recursive-edit()
  debug(error (wrong-type-argument stringp nil))
  looking-at(nil)
  (let ((case-fold-search nil)) (looking-at org-todo-line-regexp))
  (save-excursion (beginning-of-line 1) (let ((case-fold-search nil)) (looking-at org-todo-line-regexp)))
  (and (looking-at "[ 	]*$") (save-excursion (beginning-of-line 1) (let ((case-fold-search nil)) (looking-at org-todo-line-regexp))) (string= (match-string 3) ""))
  org-point-at-end-of-empty-headline()
  (if (org-point-at-end-of-empty-headline) (progn (setq this-command (quote org-cycle-level)) (let ((cur-level (org-current-level)) (prev-level (org-get-previous-line-level))) (cond ((= prev-level 0) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= prev-level cur-level) (org-do-demote)) ((= prev-level 1) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= cur-level 1) (loop repeat (/ (- prev-level 1) (org-level-increment)) do (org-do-demote))) ((< cur-level prev-level) (org-do-promote)) ((> cur-level prev-level) (loop repeat (+ 1 (/ ... ...)) do (org-do-promote)))) t)))
  (when (org-point-at-end-of-empty-headline) (setq this-command (quote org-cycle-level)) (let ((cur-level (org-current-level)) (prev-level (org-get-previous-line-level))) (cond ((= prev-level 0) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= prev-level cur-level) (org-do-demote)) ((= prev-level 1) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= cur-level 1) (loop repeat (/ (- prev-level 1) (org-level-increment)) do (org-do-demote))) ((< cur-level prev-level) (org-do-promote)) ((> cur-level prev-level) (loop repeat (+ 1 (/ (- cur-level prev-level) (org-level-increment))) do (org-do-promote)))) t))
  (let ((org-adapt-indentation nil)) (when (org-point-at-end-of-empty-headline) (setq this-command (quote org-cycle-level)) (let ((cur-level (org-current-level)) (prev-level (org-get-previous-line-level))) (cond ((= prev-level 0) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= prev-level cur-level) (org-do-demote)) ((= prev-level 1) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= cur-level 1) (loop repeat (/ (- prev-level 1) (org-level-increment)) do (org-do-demote))) ((< cur-level prev-level) (org-do-promote)) ((> cur-level prev-level) (loop repeat (+ 1 (/ ... ...)) do (org-do-promote)))) t)))
  org-cycle-level()
  (or (org-cycle-level) (org-cycle-item-indentation))
  (and org-cycle-level-after-item/entry-creation (or (org-cycle-level) (org-cycle-item-indentation)))
  (or (run-hook-with-args-until-success (quote org-tab-first-hook)) (and org-cycle-level-after-item/entry-creation (or (org-cycle-level) (org-cycle-item-indentation))))
  (if (or (run-hook-with-args-until-success (quote org-tab-first-hook)) (and org-cycle-level-after-item/entry-creation (or (org-cycle-level) (org-cycle-item-indentation)))) nil (let* ((limit-level (or org-cycle-max-level (and (boundp (quote org-inlinetask-min-level)) org-inlinetask-min-level (1- org-inlinetask-min-level)))) (nstars (and limit-level (if org-odd-levels-only (and limit-level (1- ...)) limit-level))) (org-outline-regexp (if (not (eq major-mode (quote org-mode))) outline-regexp (concat "\\*" (if nstars (format "\\{1,%d\\} " nstars) "+ ")))) (bob-special (and org-cycle-global-at-bob (not arg) (bobp) (not (looking-at org-outline-regexp)))) (org-cycle-hook (if bob-special (delq (quote org-optimize-window-after-visibility-change) (copy-sequence org-cycle-hook)) org-cycle-hook)) (pos (point))) (if (or bob-special (equal arg (quote (4)))) (setq arg t)) (cond ((equal arg (quote (16))) (setq last-command (quote dummy)) (org-set-startup-visibility) (message "Startup visibility, plus VISIBILITY properties")) ((equal arg (quote (64))) (show-all) (message "Entire buffer visible, including drawers")) ((org-at-table-p (quote any)) (if (org-at-table\.el-p) (message "Use C-c ' to edit table.el tables") (if arg (org-table-edit-field t) (org-table-justify-field-maybe) (call-interactively (quote org-table-next-field))))) ((run-hook-with-args-until-success (quote org-tab-after-check-for-table-hook))) ((eq arg t) (org-cycle-internal-global)) ((and org-drawers org-drawer-regexp (save-excursion (beginning-of-line 1) (looking-at org-drawer-regexp))) (org-flag-drawer (not (get-char-property (match-end 0) (quote invisible))))) ((integerp arg) (save-excursion (org-back-to-heading) (outline-up-heading (if (< arg 0) (- arg) (- ... arg))) (org-show-subtree))) ((and (featurep (quote org-inlinetask)) (org-inlinetask-at-task-p) (or (bolp) (not (eq org-cycle-emulate-tab ...)))) (org-inlinetask-toggle-visibility)) ((org-try-cdlatex-tab)) ((and (or (and org-cycle-include-plain-lists (org-at-item-p)) (save-excursion (beginning-of-line 1) (looking-at org-outline-regexp))) (or (bolp) (not (eq org-cycle-emulate-tab ...)))) (org-cycle-internal-local)) (buffer-read-only (org-back-to-heading)) ((run-hook-with-args-until-success (quote org-tab-after-check-for-cycling-hook))) ((org-try-structure-completion)) ((run-hook-with-args-until-success (quote org-tab-before-tab-emulation-hook))) ((and (eq org-cycle-emulate-tab (quote exc-hl-bol)) (or (not (bolp)) (not (looking-at org-outline-regexp)))) (call-interactively (global-key-binding "	"))) ((if (and (memq org-cycle-emulate-tab (quote ...)) (save-excursion (beginning-of-line 1) (looking-at "[ 	]*")) (or (and ... ...) (and ... ...))) t (eq org-cycle-emulate-tab t)) (call-interactively (global-key-binding "	"))) (t (save-excursion (org-back-to-heading) (org-cycle))))))
  (unless (or (run-hook-with-args-until-success (quote org-tab-first-hook)) (and org-cycle-level-after-item/entry-creation (or (org-cycle-level) (org-cycle-item-indentation)))) (let* ((limit-level (or org-cycle-max-level (and (boundp (quote org-inlinetask-min-level)) org-inlinetask-min-level (1- org-inlinetask-min-level)))) (nstars (and limit-level (if org-odd-levels-only (and limit-level (1- ...)) limit-level))) (org-outline-regexp (if (not (eq major-mode (quote org-mode))) outline-regexp (concat "\\*" (if nstars (format "\\{1,%d\\} " nstars) "+ ")))) (bob-special (and org-cycle-global-at-bob (not arg) (bobp) (not (looking-at org-outline-regexp)))) (org-cycle-hook (if bob-special (delq (quote org-optimize-window-after-visibility-change) (copy-sequence org-cycle-hook)) org-cycle-hook)) (pos (point))) (if (or bob-special (equal arg (quote (4)))) (setq arg t)) (cond ((equal arg (quote (16))) (setq last-command (quote dummy)) (org-set-startup-visibility) (message "Startup visibility, plus VISIBILITY properties")) ((equal arg (quote (64))) (show-all) (message "Entire buffer visible, including drawers")) ((org-at-table-p (quote any)) (if (org-at-table\.el-p) (message "Use C-c ' to edit table.el tables") (if arg (org-table-edit-field t) (org-table-justify-field-maybe) (call-interactively (quote org-table-next-field))))) ((run-hook-with-args-until-success (quote org-tab-after-check-for-table-hook))) ((eq arg t) (org-cycle-internal-global)) ((and org-drawers org-drawer-regexp (save-excursion (beginning-of-line 1) (looking-at org-drawer-regexp))) (org-flag-drawer (not (get-char-property (match-end 0) (quote invisible))))) ((integerp arg) (save-excursion (org-back-to-heading) (outline-up-heading (if (< arg 0) (- arg) (- ... arg))) (org-show-subtree))) ((and (featurep (quote org-inlinetask)) (org-inlinetask-at-task-p) (or (bolp) (not (eq org-cycle-emulate-tab ...)))) (org-inlinetask-toggle-visibility)) ((org-try-cdlatex-tab)) ((and (or (and org-cycle-include-plain-lists (org-at-item-p)) (save-excursion (beginning-of-line 1) (looking-at org-outline-regexp))) (or (bolp) (not (eq org-cycle-emulate-tab ...)))) (org-cycle-internal-local)) (buffer-read-only (org-back-to-heading)) ((run-hook-with-args-until-success (quote org-tab-after-check-for-cycling-hook))) ((org-try-structure-completion)) ((run-hook-with-args-until-success (quote org-tab-before-tab-emulation-hook))) ((and (eq org-cycle-emulate-tab (quote exc-hl-bol)) (or (not (bolp)) (not (looking-at org-outline-regexp)))) (call-interactively (global-key-binding "	"))) ((if (and (memq org-cycle-emulate-tab (quote ...)) (save-excursion (beginning-of-line 1) (looking-at "[ 	]*")) (or (and ... ...) (and ... ...))) t (eq org-cycle-emulate-tab t)) (call-interactively (global-key-binding "	"))) (t (save-excursion (org-back-to-heading) (org-cycle))))))
  org-cycle((4))
  (cond ((integerp arg) (show-all) (hide-sublevels arg) (setq org-cycle-global-status (quote contents))) ((equal arg (quote (4))) (org-set-startup-visibility) (message "Startup visibility, plus VISIBILITY properties.")) (t (org-cycle (quote (4)))))
  (let ((org-cycle-include-plain-lists (if (eq major-mode (quote org-mode)) org-cycle-include-plain-lists nil))) (cond ((integerp arg) (show-all) (hide-sublevels arg) (setq org-cycle-global-status (quote contents))) ((equal arg (quote (4))) (org-set-startup-visibility) (message "Startup visibility, plus VISIBILITY properties.")) (t (org-cycle (quote (4))))))
  org-global-cycle(nil)
  call-interactively(org-global-cycle nil nil)
  recursive-edit()
  debug(error (wrong-type-argument stringp nil))
  looking-at(nil)
  (let ((case-fold-search nil)) (looking-at org-todo-line-regexp))
  (save-excursion (beginning-of-line 1) (let ((case-fold-search nil)) (looking-at org-todo-line-regexp)))
  (and (looking-at "[ 	]*$") (save-excursion (beginning-of-line 1) (let ((case-fold-search nil)) (looking-at org-todo-line-regexp))) (string= (match-string 3) ""))
  org-point-at-end-of-empty-headline()
  (if (org-point-at-end-of-empty-headline) (progn (setq this-command (quote org-cycle-level)) (let ((cur-level (org-current-level)) (prev-level (org-get-previous-line-level))) (cond ((= prev-level 0) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= prev-level cur-level) (org-do-demote)) ((= prev-level 1) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= cur-level 1) (loop repeat (/ (- prev-level 1) (org-level-increment)) do (org-do-demote))) ((< cur-level prev-level) (org-do-promote)) ((> cur-level prev-level) (loop repeat (+ 1 (/ ... ...)) do (org-do-promote)))) t)))
  (when (org-point-at-end-of-empty-headline) (setq this-command (quote org-cycle-level)) (let ((cur-level (org-current-level)) (prev-level (org-get-previous-line-level))) (cond ((= prev-level 0) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= prev-level cur-level) (org-do-demote)) ((= prev-level 1) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= cur-level 1) (loop repeat (/ (- prev-level 1) (org-level-increment)) do (org-do-demote))) ((< cur-level prev-level) (org-do-promote)) ((> cur-level prev-level) (loop repeat (+ 1 (/ (- cur-level prev-level) (org-level-increment))) do (org-do-promote)))) t))
  (let ((org-adapt-indentation nil)) (when (org-point-at-end-of-empty-headline) (setq this-command (quote org-cycle-level)) (let ((cur-level (org-current-level)) (prev-level (org-get-previous-line-level))) (cond ((= prev-level 0) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= prev-level cur-level) (org-do-demote)) ((= prev-level 1) (loop repeat (/ (- cur-level 1) (org-level-increment)) do (org-do-promote))) ((= cur-level 1) (loop repeat (/ (- prev-level 1) (org-level-increment)) do (org-do-demote))) ((< cur-level prev-level) (org-do-promote)) ((> cur-level prev-level) (loop repeat (+ 1 (/ ... ...)) do (org-do-promote)))) t)))
  org-cycle-level()
  (or (org-cycle-level) (org-cycle-item-indentation))
  (and org-cycle-level-after-item/entry-creation (or (org-cycle-level) (org-cycle-item-indentation)))
  (or (run-hook-with-args-until-success (quote org-tab-first-hook)) (and org-cycle-level-after-item/entry-creation (or (org-cycle-level) (org-cycle-item-indentation))))
  (if (or (run-hook-with-args-until-success (quote org-tab-first-hook)) (and org-cycle-level-after-item/entry-creation (or (org-cycle-level) (org-cycle-item-indentation)))) nil (let* ((limit-level (or org-cycle-max-level (and (boundp (quote org-inlinetask-min-level)) org-inlinetask-min-level (1- org-inlinetask-min-level)))) (nstars (and limit-level (if org-odd-levels-only (and limit-level (1- ...)) limit-level))) (org-outline-regexp (if (not (eq major-mode (quote org-mode))) outline-regexp (concat "\\*" (if nstars (format "\\{1,%d\\} " nstars) "+ ")))) (bob-special (and org-cycle-global-at-bob (not arg) (bobp) (not (looking-at org-outline-regexp)))) (org-cycle-hook (if bob-special (delq (quote org-optimize-window-after-visibility-change) (copy-sequence org-cycle-hook)) org-cycle-hook)) (pos (point))) (if (or bob-special (equal arg (quote (4)))) (setq arg t)) (cond ((equal arg (quote (16))) (setq last-command (quote dummy)) (org-set-startup-visibility) (message "Startup visibility, plus VISIBILITY properties")) ((equal arg (quote (64))) (show-all) (message "Entire buffer visible, including drawers")) ((org-at-table-p (quote any)) (if (org-at-table\.el-p) (message "Use C-c ' to edit table.el tables") (if arg (org-table-edit-field t) (org-table-justify-field-maybe) (call-interactively (quote org-table-next-field))))) ((run-hook-with-args-until-success (quote org-tab-after-check-for-table-hook))) ((eq arg t) (org-cycle-internal-global)) ((and org-drawers org-drawer-regexp (save-excursion (beginning-of-line 1) (looking-at org-drawer-regexp))) (org-flag-drawer (not (get-char-property (match-end 0) (quote invisible))))) ((integerp arg) (save-excursion (org-back-to-heading) (outline-up-heading (if (< arg 0) (- arg) (- ... arg))) (org-show-subtree))) ((and (featurep (quote org-inlinetask)) (org-inlinetask-at-task-p) (or (bolp) (not (eq org-cycle-emulate-tab ...)))) (org-inlinetask-toggle-visibility)) ((org-try-cdlatex-tab)) ((and (or (and org-cycle-include-plain-lists (org-at-item-p)) (save-excursion (beginning-of-line 1) (looking-at org-outline-regexp))) (or (bolp) (not (eq org-cycle-emulate-tab ...)))) (org-cycle-internal-local)) (buffer-read-only (org-back-to-heading)) ((run-hook-with-args-until-success (quote org-tab-after-check-for-cycling-hook))) ((org-try-structure-completion)) ((run-hook-with-args-until-success (quote org-tab-before-tab-emulation-hook))) ((and (eq org-cycle-emulate-tab (quote exc-hl-bol)) (or (not (bolp)) (not (looking-at org-outline-regexp)))) (call-interactively (global-key-binding "	"))) ((if (and (memq org-cycle-emulate-tab (quote ...)) (save-excursion (beginning-of-line 1) (looking-at "[ 	]*")) (or (and ... ...) (and ... ...))) t (eq org-cycle-emulate-tab t)) (call-interactively (global-key-binding "	"))) (t (save-excursion (org-back-to-heading) (org-cycle))))))
  (unless (or (run-hook-with-args-until-success (quote org-tab-first-hook)) (and org-cycle-level-after-item/entry-creation (or (org-cycle-level) (org-cycle-item-indentation)))) (let* ((limit-level (or org-cycle-max-level (and (boundp (quote org-inlinetask-min-level)) org-inlinetask-min-level (1- org-inlinetask-min-level)))) (nstars (and limit-level (if org-odd-levels-only (and limit-level (1- ...)) limit-level))) (org-outline-regexp (if (not (eq major-mode (quote org-mode))) outline-regexp (concat "\\*" (if nstars (format "\\{1,%d\\} " nstars) "+ ")))) (bob-special (and org-cycle-global-at-bob (not arg) (bobp) (not (looking-at org-outline-regexp)))) (org-cycle-hook (if bob-special (delq (quote org-optimize-window-after-visibility-change) (copy-sequence org-cycle-hook)) org-cycle-hook)) (pos (point))) (if (or bob-special (equal arg (quote (4)))) (setq arg t)) (cond ((equal arg (quote (16))) (setq last-command (quote dummy)) (org-set-startup-visibility) (message "Startup visibility, plus VISIBILITY properties")) ((equal arg (quote (64))) (show-all) (message "Entire buffer visible, including drawers")) ((org-at-table-p (quote any)) (if (org-at-table\.el-p) (message "Use C-c ' to edit table.el tables") (if arg (org-table-edit-field t) (org-table-justify-field-maybe) (call-interactively (quote org-table-next-field))))) ((run-hook-with-args-until-success (quote org-tab-after-check-for-table-hook))) ((eq arg t) (org-cycle-internal-global)) ((and org-drawers org-drawer-regexp (save-excursion (beginning-of-line 1) (looking-at org-drawer-regexp))) (org-flag-drawer (not (get-char-property (match-end 0) (quote invisible))))) ((integerp arg) (save-excursion (org-back-to-heading) (outline-up-heading (if (< arg 0) (- arg) (- ... arg))) (org-show-subtree))) ((and (featurep (quote org-inlinetask)) (org-inlinetask-at-task-p) (or (bolp) (not (eq org-cycle-emulate-tab ...)))) (org-inlinetask-toggle-visibility)) ((org-try-cdlatex-tab)) ((and (or (and org-cycle-include-plain-lists (org-at-item-p)) (save-excursion (beginning-of-line 1) (looking-at org-outline-regexp))) (or (bolp) (not (eq org-cycle-emulate-tab ...)))) (org-cycle-internal-local)) (buffer-read-only (org-back-to-heading)) ((run-hook-with-args-until-success (quote org-tab-after-check-for-cycling-hook))) ((org-try-structure-completion)) ((run-hook-with-args-until-success (quote org-tab-before-tab-emulation-hook))) ((and (eq org-cycle-emulate-tab (quote exc-hl-bol)) (or (not (bolp)) (not (looking-at org-outline-regexp)))) (call-interactively (global-key-binding "	"))) ((if (and (memq org-cycle-emulate-tab (quote ...)) (save-excursion (beginning-of-line 1) (looking-at "[ 	]*")) (or (and ... ...) (and ... ...))) t (eq org-cycle-emulate-tab t)) (call-interactively (global-key-binding "	"))) (t (save-excursion (org-back-to-heading) (org-cycle))))))
  org-cycle((4))
  (cond ((integerp arg) (show-all) (hide-sublevels arg) (setq org-cycle-global-status (quote contents))) ((equal arg (quote (4))) (org-set-startup-visibility) (message "Startup visibility, plus VISIBILITY properties.")) (t (org-cycle (quote (4)))))
  (let ((org-cycle-include-plain-lists (if (eq major-mode (quote org-mode)) org-cycle-include-plain-lists nil))) (cond ((integerp arg) (show-all) (hide-sublevels arg) (setq org-cycle-global-status (quote contents))) ((equal arg (quote (4))) (org-set-startup-visibility) (message "Startup visibility, plus VISIBILITY properties.")) (t (org-cycle (quote (4))))))
  org-global-cycle(nil)
  call-interactively(org-global-cycle nil nil)

In GNU Emacs 24.0.95.1 (i386-mingw-nt5.1.2600)
 of 2012-04-03 on MARVIN
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.6) --no-opt --enable-checking --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include'

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 24.0.95; (org) outline-style cycling + outline-mode
  2012-04-03  5:51 24.0.95; (org) outline-style cycling + outline-mode Jambunathan K
@ 2012-04-09 18:54 ` Bastien
  2012-04-10 16:35   ` Jambunathan K
       [not found] ` <handler.11160.B.133343233325083.ack@debbugs.gnu.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Bastien @ 2012-04-09 18:54 UTC (permalink / raw)
  To: Jambunathan K; +Cc: bug-gnu-emacs, Orgmode

Hi Jambunathan,

Jambunathan K <kjambunathan@gmail.com> writes:

> 1. Install the following hook
>
>      (add-hook 'outline-mode-hook
>        (lambda ()
>          (define-key outline-mode-map [(tab)] 'org-cycle)
>          (define-key outline-mode-map [(shift tab)] 'org-global-cycle)))
>
> 2. (setq debug-on-error t)
> 3. Visit NEWS file with C-h n
> 4. Place the cursor at the end of the line as shown below.
>
> ,---- ^^^^^ is where the cursor is.
> |      ---^^^^^^
> |      ** Emacs can be compiled with SELinux support.^^^^^^
> |      This happens by default if a suitably recent version of the library is
> |      found at build time.  To prevent this, use the configure option^^^^^^^^
> |      `--without-selinux'.  See below for SELinux features.
> | 
> |    
> `----
>
> 5. Press S-TAB. The following error is reported.  I would expect some
>    sort of cycling to happen.
>        let: Wrong type argument: stringp, nil

This should be fixed now.   Can you confirm?

Thanks!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 24.0.95; (org) outline-style cycling + outline-mode
  2012-04-09 18:54 ` Bastien
@ 2012-04-10 16:35   ` Jambunathan K
  2012-04-11 11:07     ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Jambunathan K @ 2012-04-10 16:35 UTC (permalink / raw)
  To: Bastien; +Cc: bug-gnu-emacs, Orgmode


Hello Bastien

Thanks for the fix and it addresses the problem I reported.  Feel free
to close this bug once you commit the changes to bzr repo.

Jambunathan K.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#11160: Acknowledgement (24.0.95; (org) outline-style cycling + outline-mode)
       [not found]   ` <811uo58i9t.fsf@gmail.com>
@ 2012-04-11 11:06     ` Bastien
  0 siblings, 0 replies; 5+ messages in thread
From: Bastien @ 2012-04-11 11:06 UTC (permalink / raw)
  To: Jambunathan K; +Cc: 11160-done

Jambunathan K <kjambunathan@gmail.com> writes:

> http://orgmode.org/worg/org-faq.html#use-visibility-cycling-in-outline-mode.
>
> which specifically notes that org-style cycling is "written in a way
> that they are independent of the outline setup."

This bug is now fixed in emacs-24 branch.

Thanks,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 24.0.95; (org) outline-style cycling + outline-mode
  2012-04-10 16:35   ` Jambunathan K
@ 2012-04-11 11:07     ` Bastien
  0 siblings, 0 replies; 5+ messages in thread
From: Bastien @ 2012-04-11 11:07 UTC (permalink / raw)
  To: Jambunathan K; +Cc: bug-gnu-emacs, Orgmode

Jambunathan K <kjambunathan@gmail.com> writes:

> Thanks for the fix and it addresses the problem I reported.  Feel free
> to close this bug once you commit the changes to bzr repo.

Thanks for confirming.  

This in now in Emacs, I closed the bug there.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-04-11 16:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-03  5:51 24.0.95; (org) outline-style cycling + outline-mode Jambunathan K
2012-04-09 18:54 ` Bastien
2012-04-10 16:35   ` Jambunathan K
2012-04-11 11:07     ` Bastien
     [not found] ` <handler.11160.B.133343233325083.ack@debbugs.gnu.org>
     [not found]   ` <811uo58i9t.fsf@gmail.com>
2012-04-11 11:06     ` bug#11160: Acknowledgement (24.0.95; (org) outline-style cycling + outline-mode) Bastien

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).