From 1c5014740eda9eb9d2fc30befacdd6c20343dc49 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Tue, 23 Dec 2014 11:12:00 +0100 Subject: [PATCH] Compare `org-current-level' and `org-outline-level' * lisp/org.el (org-outline-level, org-current-level): Update docstrings to insist on the difference between the two functions. --- lisp/org.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 56506d6b8..06506916f 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -6237,8 +6237,11 @@ done, nil otherwise." (defun org-outline-level () "Compute the outline level of the heading at point. -If this is called at a normal headline, the level is the number of stars. -Use `org-reduced-level' to remove the effect of `org-odd-levels'." + +If this is called at a normal headline, the level is the number +of stars. Use `org-reduced-level' to remove the effect of +`org-odd-levels'. Unlike to `org-current-level', this functions +takes into consideration inline tasks." (org-with-wide-buffer (end-of-line) (if (re-search-backward org-outline-regexp-bol nil t) @@ -8083,7 +8086,10 @@ in the region." (defun org-current-level () "Return the level of the current entry, or nil if before the first headline. -The level is the number of stars at the beginning of the headline." +The level is the number of stars at the beginning of the +headline. Use `org-reduced-level' to remove the effect of +`org-odd-levels'. Unlike to `org-outline-level', this function +ignores inlinetasks." (let ((level (org-with-limited-levels (org-outline-level)))) (and (> level 0) level))) -- 2.11.4.GIT