Browse Source

Merge branch 'hotfix-7.8.06'

Bastien Guerry 13 năm trước cách đây
mục cha
commit
6e276f3b45
2 tập tin đã thay đổi với 28 bổ sung19 xóa
  1. 14 5
      lisp/org-colview.el
  2. 14 14
      lisp/org-odt.el

+ 14 - 5
lisp/org-colview.el

@@ -930,6 +930,8 @@ Don't set this, this is meant for dynamic scoping.")
 		  (overlay-put ov 'display (format fmt val)))))
 	    org-columns-overlays))))
 
+(defvar org-inlinetask-min-level
+  (if (featurep 'org-inlinetask) org-inlinetask-min-level 15))
 (defun org-columns-compute (property)
   "Sum the values of property PROPERTY hierarchically, for the entire buffer."
   (interactive)
@@ -944,7 +946,9 @@ Don't set this, this is meant for dynamic scoping.")
 	 (fun (nth 6 ass))
 	 (calc (or (nth 7 ass) 'identity))
 	 (beg org-columns-top-level-marker)
-	 last-level val valflag flag end sumpos sum-alist sum str str1 useval)
+	 (inminlevel org-inlinetask-min-level)
+	 (last-level org-inlinetask-min-level)
+	 val valflag flag end sumpos sum-alist sum str str1 useval)
     (save-excursion
       ;; Find the region to compute
       (goto-char beg)
@@ -953,16 +957,21 @@ Don't set this, this is meant for dynamic scoping.")
       ;; Walk the tree from the back and do the computations
       (while (re-search-backward re beg t)
 	(setq sumpos (match-beginning 0)
-	      last-level level
+	      last-level (if (not (or (zerop level) (eq level inminlevel)))
+			     level last-level)
 	      level (org-outline-level)
 	      val (org-entry-get nil property)
 	      valflag (and val (string-match "\\S-" val)))
 	(cond
 	 ((< level last-level)
 	  ;; put the sum of lower levels here as a property
-	  (setq sum (when (aref lvals last-level)
-		      (apply fun (aref lvals last-level)))
-		flag (aref lflag last-level) ; any valid entries from children?
+	  (setq sum (+ (if (and (/= last-level inminlevel)
+				(aref lvals last-level))
+			   (apply fun (aref lvals last-level)) 0)
+		       (if (aref lvals inminlevel)
+			   (apply fun (aref lvals inminlevel)) 0))
+		flag (or (aref lflag last-level) ; any valid entries from children?
+			 (aref lflag inminlevel)) ; or inline tasks?
 		str (org-columns-number-to-string sum format printf)
 		str1 (org-add-props (copy-sequence str) nil 'org-computed t 'face 'bold)
 		useval (if flag str1 (if valflag val ""))

+ 14 - 14
lisp/org-odt.el

@@ -1535,6 +1535,20 @@ value of `org-export-odt-fontify-srcblocks."
 	       (org-odt-copy-image-file thefile) thelink))))
     (org-export-odt-format-image thefile href)))
 
+(defvar org-odt-entity-labels-alist nil
+  "Associate Labels with the Labeled entities.
+Each element of the alist is of the form (LABEL-NAME
+CATEGORY-NAME SEQNO LABEL-STYLE-NAME).  LABEL-NAME is same as
+that specified by \"#+LABEL: ...\" line.  CATEGORY-NAME is the
+type of the entity that LABEL-NAME is attached to.  CATEGORY-NAME
+can be one of \"Table\", \"Figure\" or \"Equation\".  SEQNO is
+the unique number assigned to the referenced entity on a
+per-CATEGORY basis.  It is generated sequentially and is 1-based.
+LABEL-STYLE-NAME is a key `org-odt-label-styles'.
+
+See `org-odt-add-label-definition' and
+`org-odt-fixup-label-references'.")
+
 (defun org-export-odt-format-formula (src href)
   (save-match-data
     (let* ((caption (org-find-text-property-in-string 'org-caption src))
@@ -2025,20 +2039,6 @@ ATTR is a string of other attributes of the a element."
 	  (setq width (* scale width) height (* scale height)))))
     (cons width height)))
 
-(defvar org-odt-entity-labels-alist nil
-  "Associate Labels with the Labeled entities.
-Each element of the alist is of the form (LABEL-NAME
-CATEGORY-NAME SEQNO LABEL-STYLE-NAME).  LABEL-NAME is same as
-that specified by \"#+LABEL: ...\" line.  CATEGORY-NAME is the
-type of the entity that LABEL-NAME is attached to.  CATEGORY-NAME
-can be one of \"Table\", \"Figure\" or \"Equation\".  SEQNO is
-the unique number assigned to the referenced entity on a
-per-CATEGORY basis.  It is generated sequentially and is 1-based.
-LABEL-STYLE-NAME is a key `org-odt-label-styles'.
-
-See `org-odt-add-label-definition' and
-`org-odt-fixup-label-references'.")
-
 (defvar org-odt-entity-counts-plist nil
   "Plist of running counters of SEQNOs for each of the CATEGORY-NAMEs.
 See `org-odt-entity-labels-alist' for known CATEGORY-NAMEs.")