فهرست منبع

Computed dates in tables appear as inactive time stamps

* lisp/org-table.el (org-table-eval-formula): Replace active time
  stamps, as produced by Calc package, with inactive ones.

Reported-by: "Doherty, Daniel" <ded@ddoherty.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/111458>
Nicolas Goaziou 8 سال پیش
والد
کامیت
a2950b00c1
2فایلهای تغییر یافته به همراه10 افزوده شده و 1 حذف شده
  1. 4 0
      etc/ORG-NEWS
  2. 6 1
      lisp/org-table.el

+ 4 - 0
etc/ORG-NEWS

@@ -191,6 +191,10 @@ It is the reciprocal of ~org-list-to-lisp~, which see.
 
 Call ~org-agenda-set-restriction-lock~ from the agenda.
 
+** Miscellaneous
+
+*** Computed dates in tables appear as inactive time stamps
+
 * Version 9.0
 
 ** Incompatible changes

+ 6 - 1
lisp/org-table.el

@@ -2910,7 +2910,12 @@ $1->    %s\n" orig formula form0 form))
 	(when (consp ev) (setq fmt nil ev "#ERROR"))
 	(org-table-justify-field-maybe
 	 (format org-table-formula-field-format
-		 (if fmt (format fmt (string-to-number ev)) ev)))
+		 (if fmt (format fmt (string-to-number ev))
+		   ;; Replace any active time stamp in the result with
+		   ;; an inactive one.  Dates in tables are likely
+		   ;; piece of regular data, not meant to appear in
+		   ;; the agenda.
+		   (replace-regexp-in-string org-ts-regexp "[\\1]" ev))))
 	(if (and down (> ndown 0) (looking-at ".*\n[ \t]*|[^-]"))
 	    (call-interactively 'org-return)
 	  (setq ndown 0)))