rewrite non portable code

This commit is contained in:
Denis Zheleztsov 2018-06-26 15:37:27 +03:00
parent 281be573c5
commit d5ee9d046d
Signed by: Difrex
GPG Key ID: B047A0E62A285621

12
idec.el
View File

@ -69,7 +69,7 @@ put cursor to CHECKPOINT."
(concat
(gethash "tags" msg) "\n"
(gethash "echo" msg) "\n"
(shell-command-to-string (concat "date -d '" (gethash "time" msg) "' +%s"))
(nth 0 (split-string (number-to-string (time-to-seconds (date-to-time (gethash "time" msg)))) "\\.")) "\n"
(gethash "author" msg) "\n"
(gethash "address" msg) "\n"
(gethash "recipient" msg) "\n"
@ -117,11 +117,11 @@ put cursor to CHECKPOINT."
"Display message MSG in new buffer in idec-mode."
(mark-message-read (gethash "id" msg) (get-message-field (gethash "msg" msg) "echo"))
(with-output-to-temp-buffer (get-buffer-create (concat "*IDEC: "
(decode-coding-string
(get-message-field
(gethash "msg" msg) "subj")
'utf-8)
"*"))
(decode-coding-string
(get-message-field
(gethash "msg" msg) "subj")
'utf-8)
"*"))
;; Run in IDEC mode
(switch-to-buffer (concat "*IDEC: " (decode-coding-string (get-message-field
(gethash "msg" msg) "subj")