I was not very statisfied with the leading zero that I got in my insert-date function.
It looks now as
09 jun 2015, instead
9 jun 2015.
To solve this, I looked into the source code of s.el and wrote a function for it.
(defun insert-date () "Insert current date 1 jun yyyy." (interactive) (insert (if (string-prefix-p "0" (format-time-string "%d")) ;; Checks if there is a leding zero. (s-right (format-time-string "%d") 1) ;; If so, chop it off with the library s, then s-right. (format-time-string "%d")) ;; If not (for example, 10, 12, 25, 31), let it so. (format-time-string "%b %Y")) ;; Then the rest (jun 2015). )
After some tweaking, I still got the same error that there is a wrong type argument in sequencep 1. But I couldn't figure out.
Anybody have the golden hint?