[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: Bug in org-inlinetask - was: Re: Feature suggestion: highl
From: |
Sebastian Rose |
Subject: |
[Orgmode] Re: Bug in org-inlinetask - was: Re: Feature suggestion: highlights |
Date: |
Fri, 16 Apr 2010 23:47:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
This patch fixes the odd odd/even behaviour. I.e., it makes
`org-inlinetask-insert-task' regard `org-odd-levels-only'.
Diffed against `origin/master':
diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el
index aac338b..46a7a7e 100644
--- a/lisp/org-inlinetask.el
+++ b/lisp/org-inlinetask.el
@@ -109,9 +109,13 @@ When nil, they will not be exported."
"Insert an inline task."
(interactive)
(or (bolp) (newline))
- (insert (make-string org-inlinetask-min-level ?*) " \n"
- (make-string org-inlinetask-min-level ?*) " END\n")
+ (let ((indent org-inlinetask-min-level))
+ (if org-odd-levels-only
+ (setq indent (- (* 2 indent) 1)))
+ (insert (make-string indent ?*) " \n"
+ (make-string indent ?*) " END\n"))
(end-of-line -1))
+
(define-key org-mode-map "\C-c\C-xt" 'org-inlinetask-insert-task)
(defvar htmlp) ; dynamically scoped into the next function
Diffed against branch `remove-compatibility-code':
diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el
index aac338b..6c4e397 100644
--- a/lisp/org-inlinetask.el
+++ b/lisp/org-inlinetask.el
@@ -109,8 +109,11 @@ When nil, they will not be exported."
"Insert an inline task."
(interactive)
(or (bolp) (newline))
- (insert (make-string org-inlinetask-min-level ?*) " \n"
- (make-string org-inlinetask-min-level ?*) " END\n")
+ (let ((indent org-inlinetask-min-level))
+ (if org-odd-levels-only
+ (setq indent (- (* 2 indent) 1)))
+ (insert (make-string indent ?*) " \n"
+ (make-string indent ?*) " END\n"))
(end-of-line -1))
(define-key org-mode-map "\C-c\C-xt" 'org-inlinetask-insert-task)
Sebastian
- [Orgmode] Feature suggestion: highlights, Ali Tofigh, 2010/04/15
- [Orgmode] Re: Feature suggestion: highlights, Bernt Hansen, 2010/04/15
- Re: [Orgmode] Feature suggestion: highlights, Sebastian Rose, 2010/04/15
- Re: [Orgmode] Feature suggestion: highlights, Ali Tofigh, 2010/04/16
- Re: [Orgmode] Feature suggestion: highlights, Sebastian Rose, 2010/04/16
- [Orgmode] Re: Feature suggestion: highlights, Bernt Hansen, 2010/04/16
- [Orgmode] Bug in org-inlinetask - was: Re: Feature suggestion: highlights, Sebastian Rose, 2010/04/16
- Re: [Orgmode] Bug in org-inlinetask - was: Re: Feature suggestion: highlights, Sebastian Rose, 2010/04/16
- [Orgmode] Re: Bug in org-inlinetask - was: Re: Feature suggestion: highlights, Bernt Hansen, 2010/04/16
- [Orgmode] Re: Bug in org-inlinetask - was: Re: Feature suggestion: highlights,
Sebastian Rose <=
- [Orgmode] Re: Feature suggestion: highlights, Ali Tofigh, 2010/04/16
- [Orgmode] Re: Feature suggestion: highlights, Bernt Hansen, 2010/04/16