summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2009-09-10 18:30:42 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2009-09-10 18:30:42 +0200
commitc1524ad9faca39fa33c81e28c6197024cf6697bc (patch)
tree76968bc85926cceafd7113144734101a367442ae
parent91197ce2807b44c7ba5222e2ac56fc3b3c973149 (diff)
downloadorg-mode-c1524ad9faca39fa33c81e28c6197024cf6697bc.tar.gz
Fix arg handling for org-contents
When odd levels are being used, change the interpretation of a numerical arg to S-TAB. Michael Brand writes: > I like the org-indent-mode with the soft-indentation but even more I > like the hard-indentation with `#+STARTUP: odd hidestars' instead for > which I have a question. > > This is the content of the example file oddeven: > -*- mode: org -*- > #+STARTUP: oddeven hidestars content > * 1 Org Mode > ** 1.1 Introduction > *** 1.1.1 Installation > > This is the content of the example file odd: > -*- mode: org -*- > #+STARTUP: odd hidestars content > * 1 Org Mode > *** 1.1 Introduction > ***** 1.1.1 Installation > > The different _Emacs-faces_ (colors) for the heading levels are the same > when comparing the two files. This Emacs-internal adaptation I > appreciate a lot. > > C-u 2 S-Tab shows _two_ levels with the file oddeven but only _one_ with > the file odd. Is this how it is intended to work for the file odd?
-rwxr-xr-xlisp/ChangeLog5
-rw-r--r--lisp/org.el7
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e46a8ed..cb9bd0a 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-10 Carsten Dominik <carsten.dominik@gmail.com>
+
+ * org.el (org-shifttab): Interpret arg differently when using only
+ odd levels.
+
2009-09-09 Bastien Guerry <bzg@altern.org>
* org.el (org-check-agenda-file): Use a more explicit message
diff --git a/lisp/org.el b/lisp/org.el
index 8ff0393..291720f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14617,9 +14617,10 @@ See the individual commands for more information."
(cond
((org-at-table-p) (call-interactively 'org-table-previous-field))
((integerp arg)
- (message "Content view to level: %d" arg)
- (org-content (prefix-numeric-value arg))
- (setq org-cycle-global-status 'overview))
+ (let ((arg2 (if org-odd-levels-only (1- (* 2 arg)) arg)))
+ (message "Content view to level: %d" arg)
+ (org-content (prefix-numeric-value arg2))
+ (setq org-cycle-global-status 'overview)))
(t (call-interactively 'org-global-cycle))))
(defun org-shiftmetaleft ()