Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2017-03-11 11:21:50 +01:00
commit 393dcb7094
2 changed files with 14 additions and 9 deletions

View File

@ -7305,14 +7305,15 @@ With a prefix argument, exclude the lines of that category.
(t (error "No category at point"))))))
(defun org-find-top-headline (&optional pos)
"Find the topmost parent headline and return it."
"Find the topmost parent headline and return it.
POS when non-nil is the marker or buffer position to start the
search from."
(save-excursion
(with-current-buffer (if pos (marker-buffer pos) (current-buffer))
(if pos (goto-char pos))
;; Skip up to the topmost parent
(while (ignore-errors (outline-up-heading 1) t))
(ignore-errors
(nth 4 (org-heading-components))))))
(with-current-buffer (if (markerp pos) (marker-buffer pos) (current-buffer))
(when pos (goto-char pos))
;; Skip up to the topmost parent.
(while (org-up-heading-safe))
(ignore-errors (nth 4 (org-heading-components))))))
(defvar org-agenda-filtered-by-top-headline nil)
(defun org-agenda-filter-by-top-headline (strip)

View File

@ -1790,7 +1790,9 @@ CONTENTS is nil. INFO is a plist holding contextual information."
"Transcode a SUBSCRIPT object from Org to ASCII.
CONTENTS is the contents of the object. INFO is a plist holding
contextual information."
(format (if (string-match-p "[ \t]" contents) "_{%s}" "_%s") contents))
(if (org-element-property :use-brackets-p subscript)
(format "_{%s}" contents)
(format "_%s" contents)))
;;;; Superscript
@ -1799,7 +1801,9 @@ contextual information."
"Transcode a SUPERSCRIPT object from Org to ASCII.
CONTENTS is the contents of the object. INFO is a plist holding
contextual information."
(format (if (string-match-p "[ \t]" contents) "^{%s}" "^%s") contents))
(if (org-element-property :use-brackets-p superscript)
(format "^{%s}" contents)
(format "^%s" contents)))
;;;; Strike-through