0

I'm attempting to modify the formatting of timestamps when they are exported to either HTML or TeX/pdf. I have tried two different ways, neither one of which works. The first way was here and I put that code in my dotemacs file. However, I get a symbol's value is void error for org-export-filter-timestamp-functions when I open emacs.

The second way I tried, which also does not work is to attempt the example in the manual under "defining filters for individual files." I copy/pasted the text into the beginning of my org document, but this does not change the formatting of timestamps at all.

#+BIND: org-export-filter-timestamp-functions (tmp-f-timestamp)
 #+BIND: org-export-filter-strike-through-functions (tmp-f-strike-through)
 #+begin_src emacs-lisp :exports results :results none
   (defun tmp-f-timestamp (s backend info)
     (replace-regexp-in-string "&[lg]t;\\|[][]" "" s))
   (defun tmp-f-strike-through (s backend info) "")
 #+end_src
  • I assume org-export-filter-timestamp-functions is a quite new variable of org-mode. Presumably, it is introduced in org-mode 8.3. What is your org-version? For modifying time-stamps see also stackoverflow.com/questions/23297422. /org-mode-timestamp-format-when-exported. Note that the solution using org-export-filter-timestamp-functions is from the year 2015. My org-version is 8.2.5h and I don't have org-export-filter-timestamp-functions either. – Tobias Dec 4 '15 at 17:52
  • Note also that org-export.el was in contrib and not in the main org-mode branch according to this link: github.com/tkf/org-mode/blob/master/contrib/lisp/org-export.el , That git entry seems to be from year 2012. – Tobias Dec 4 '15 at 17:57
  • It would be nice if someone out there could check for the variable org-export-filter-timestamp-functions in org-mode 8.3. – Tobias Dec 4 '15 at 18:00
  • @Tobias - Thanks. I just updated to org 8.3.2 and still have this problem. I downloaded org-plus-contrib, but this doesn't seem to contain org-export.el file. – Alex Dec 4 '15 at 20:12
1

The variable org-export-filter-timestamp-functions is defined in ox.el. You need to add

(require 'ox)

in front of the code where you want to use org-export-filter-timestamp-functions.

Note: My comments above were wrong. (Sorry about that.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.