0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-20 04:26:32 +00:00

Fix inline task export

Tasks without content caused did cause an error.
This commit is contained in:
Carsten Dominik 2009-10-02 10:34:06 +02:00
parent 3ce0a4a9e2
commit b86c061228
2 changed files with 10 additions and 6 deletions

View file

@ -1,5 +1,8 @@
2009-10-02 Carsten Dominik <carsten.dominik@gmail.com> 2009-10-02 Carsten Dominik <carsten.dominik@gmail.com>
* org-inlinetask.el (org-inlinetask-export-handler): fix bug for
tasks without content.
* org-clock.el: Make sure the clock-in target position does not * org-clock.el: Make sure the clock-in target position does not
move to a different node by widening the buffer. move to a different node by widening the buffer.

View file

@ -144,12 +144,13 @@ Either remove headline and meta data, or do special formatting."
(if (match-end 2) (if (match-end 2)
(concat (match-string 2 headline) " ") "") (concat (match-string 2 headline) " ") "")
(match-string 4 headline))) (match-string 4 headline)))
(if (not (string-match "\\S-" content)) (when content
(setq content nil) (if (not (string-match "\\S-" content))
(if (string-match "[ \t\n]+\\'" content) (setq content nil)
(setq content (substring content 0 (match-beginning 0)))) (if (string-match "[ \t\n]+\\'" content)
(setq content (org-remove-indentation content)) (setq content (substring content 0 (match-beginning 0))))
(if latexp (setq content (concat "\\quad \\\\\n" content)))) (setq content (org-remove-indentation content))
(if latexp (setq content (concat "\\quad \\\\\n" content)))))
(insert "- ") (insert "- ")
(setq indent (make-string (current-column) ?\ )) (setq indent (make-string (current-column) ?\ ))
(insert headline " ::") (insert headline " ::")