some changes

This commit is contained in:
Denis Zheleztsov 2017-10-05 16:22:35 +03:00
parent 723da9ecb4
commit c48e6d48c0

17
idec.el
View File

@ -308,6 +308,20 @@ Return list with body content."
(delete-region (point) (point-min)) (delete-region (point) (point-min))
(buffer-string))) (buffer-string)))
;; LOCAL MAIL FUNCTIONS
;; ;;;;;;;;;;;;;;;;;;;;
(defun get-local-echoes ()
"Get local downloaded echoes from `idec-mail-dir'."
(delete '".." (delete '"." (directory-files idec-mail-dir nil "\\w*\\.\\w*"))))
(defun idec-browse-local-mail ()
"Browse local mail from `idec-mail-dir'."
(message (s-join " " (get-local-echoes))))
;; END OF LOCAL MAIL FUNCTIONS
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun idec-load-new-messages () (defun idec-load-new-messages ()
"Load new messages from IDEC `idec-primary-node'." "Load new messages from IDEC `idec-primary-node'."
(interactive) (interactive)
@ -417,7 +431,6 @@ Return list with body content."
(add-to-list 'msg-ids msgid) (add-to-list 'msg-ids msgid)
(message (concat "Download message " msgid " to " echo))) (message (concat "Download message " msgid " to " echo)))
messages) messages)
(message (make-messages-url msg-ids))
(dolist (line (split-string (get-url-content (make-messages-url msg-ids)) "\n")) (dolist (line (split-string (get-url-content (make-messages-url msg-ids)) "\n"))
(when (not (string= "" line)) (when (not (string= "" line))
(let (msgid content mes) (let (msgid content mes)
@ -512,7 +525,7 @@ with `idec-download-offset' and `idec-download-limit'."
(when (not (equal line "")) (when (not (equal line ""))
;; Defind echo ;; Defind echo
(defvar current-echo nil) (defvar current-echo nil)
(setq current-echo (assoc 'content (split-string line ":"))) (setq current-echo (nth 0 (split-string line ":")))
;; Create clickable button ;; Create clickable button
(insert-text-button current-echo (insert-text-button current-echo
'action (lambda (x) (load-echo-messages (button-get x 'echo))) 'action (lambda (x) (load-echo-messages (button-get x 'echo)))