Make the display of the first star in an inline task optional

* lisp/org-inlinetask.el (org-inlinetask-show-first-star): New option.
(org-inlinetask-fontify): Honor `org-inlinetask-show-first-star'.
* lisp/org-indent.el (org-indent-set-line-properties): Honor
`org-inlinetask-show-first-star'.
This commit is contained in:
Carsten Dominik 2012-01-26 07:22:16 +00:00
parent 4beec074d0
commit 88c07b546d
2 changed files with 17 additions and 5 deletions

View File

@ -45,6 +45,7 @@
(declare-function org-inlinetask-get-task-level "org-inlinetask" ())
(declare-function org-inlinetask-in-task-p "org-inlinetask" ())
(declare-function org-list-item-body-column "org-list" (item))
(defvar org-inlinetask-show-first-star)
(defgroup org-indent nil
"Options concerning dynamic virtual outline indentation."
@ -293,8 +294,10 @@ Assume point is at beginning of line."
(let ((stars (aref org-indent-stars
(min l org-indent-max-levels))))
(and stars
(concat org-indent-inlinetask-first-star
(substring stars 1)))))
(if (org-bound-and-true-p org-inlinetask-show-first-star)
(concat org-indent-inlinetask-first-star
(substring stars 1))
stars))))
(h (aref org-indent-stars
(min l org-indent-max-levels)))
(t (aref org-indent-strings

View File

@ -102,6 +102,12 @@ the value of this variable."
(const :tag "Off" nil)
(integer)))
(defcustom org-inlinetask-show-first-star nil
"Non-nil means display the first star of an inline task as additional marker.
When nil, the first star is not shown."
:tag "Org Inline Tasks"
:group 'org-structure)
(defcustom org-inlinetask-export t
"Non-nil means export inline tasks.
When nil, they will not be exported."
@ -434,9 +440,12 @@ Either remove headline and meta data, or do special formatting."
'org-hide
'org-warning)))
(while (re-search-forward re limit t)
(add-text-properties (match-beginning 1) (match-end 1)
`(face ,start-face font-lock-fontified t))
(add-text-properties (match-beginning 2) (match-end 2)
(if org-inlinetask-show-first-star
(add-text-properties (match-beginning 1) (match-end 1)
`(face ,start-face font-lock-fontified t)))
(add-text-properties (match-beginning
(if org-inlinetask-show-first-star 2 1))
(match-end 2)
'(face org-hide font-lock-fontified t))
(add-text-properties (match-beginning 3) (match-end 3)
'(face org-inlinetask font-lock-fontified t)))))