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:
parent
4beec074d0
commit
88c07b546d
|
@ -45,6 +45,7 @@
|
||||||
(declare-function org-inlinetask-get-task-level "org-inlinetask" ())
|
(declare-function org-inlinetask-get-task-level "org-inlinetask" ())
|
||||||
(declare-function org-inlinetask-in-task-p "org-inlinetask" ())
|
(declare-function org-inlinetask-in-task-p "org-inlinetask" ())
|
||||||
(declare-function org-list-item-body-column "org-list" (item))
|
(declare-function org-list-item-body-column "org-list" (item))
|
||||||
|
(defvar org-inlinetask-show-first-star)
|
||||||
|
|
||||||
(defgroup org-indent nil
|
(defgroup org-indent nil
|
||||||
"Options concerning dynamic virtual outline indentation."
|
"Options concerning dynamic virtual outline indentation."
|
||||||
|
@ -293,8 +294,10 @@ Assume point is at beginning of line."
|
||||||
(let ((stars (aref org-indent-stars
|
(let ((stars (aref org-indent-stars
|
||||||
(min l org-indent-max-levels))))
|
(min l org-indent-max-levels))))
|
||||||
(and stars
|
(and stars
|
||||||
(concat org-indent-inlinetask-first-star
|
(if (org-bound-and-true-p org-inlinetask-show-first-star)
|
||||||
(substring stars 1)))))
|
(concat org-indent-inlinetask-first-star
|
||||||
|
(substring stars 1))
|
||||||
|
stars))))
|
||||||
(h (aref org-indent-stars
|
(h (aref org-indent-stars
|
||||||
(min l org-indent-max-levels)))
|
(min l org-indent-max-levels)))
|
||||||
(t (aref org-indent-strings
|
(t (aref org-indent-strings
|
||||||
|
|
|
@ -102,6 +102,12 @@ the value of this variable."
|
||||||
(const :tag "Off" nil)
|
(const :tag "Off" nil)
|
||||||
(integer)))
|
(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
|
(defcustom org-inlinetask-export t
|
||||||
"Non-nil means export inline tasks.
|
"Non-nil means export inline tasks.
|
||||||
When nil, they will not be exported."
|
When nil, they will not be exported."
|
||||||
|
@ -434,9 +440,12 @@ Either remove headline and meta data, or do special formatting."
|
||||||
'org-hide
|
'org-hide
|
||||||
'org-warning)))
|
'org-warning)))
|
||||||
(while (re-search-forward re limit t)
|
(while (re-search-forward re limit t)
|
||||||
(add-text-properties (match-beginning 1) (match-end 1)
|
(if org-inlinetask-show-first-star
|
||||||
`(face ,start-face font-lock-fontified t))
|
(add-text-properties (match-beginning 1) (match-end 1)
|
||||||
(add-text-properties (match-beginning 2) (match-end 2)
|
`(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))
|
'(face org-hide font-lock-fontified t))
|
||||||
(add-text-properties (match-beginning 3) (match-end 3)
|
(add-text-properties (match-beginning 3) (match-end 3)
|
||||||
'(face org-inlinetask font-lock-fontified t)))))
|
'(face org-inlinetask font-lock-fontified t)))))
|
||||||
|
|
Loading…
Reference in New Issue