Hi I would like to use, optionally, org-time-stamp instead of the vanilla TeX-arg-date. The advantate is that the calendar is called in it is easy to select an appropriate date.
So I came up with this (defvar TeX-arg-date-use-orgmode nil "Use `org-time-stamp' instead of the simple built in date TeX date function. Default is `nil'.") (defun TeX-arg-date (optional &optional prompt) "Prompt for a date, defaulting to the current date. If OPTIONAL is non-nil, insert the resulting value as an optional argument, otherwise as a mandatory one. Use PROMPT as the prompt string." (if TeX-arg-date-use-orgmode (concat (insert "{") (org-time-stamp nil) (insert "}")) (let ((default (format-time-string TeX-date-format (current-time)))) (TeX-argument-insert (TeX-read-string (TeX-argument-prompt optional prompt (format "Date (default %s)" default)) nil nil default) optional)))) (I can send a patch if needed) But I must admit that the implementation is very crude. Org-time-stamp inserts \date{<2017-07-13 Thu>} Which is a bit ugly, that format can be changed but as I learned form the orgmode list ,---- | Custom format time are applied during fontification time. The major mode | you're using in your LaTeX document doesn't know about Org fontification | rules. | | You may want to add some rules to font lock there `---- So that is a bit though. Any suggestions? Uwe Brauer _______________________________________________ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel