Tuesday, September 14, 2010

org-googlecl now checks for existing blog entries

;; If the option flag googlecl-blog-exists is set to true we check if there is already an entry with this title.
;; If a blog with the same title exists then give the option to view it via the default browser.

(if googlecl-blog-exists
(with-temp-buffer
(let* ((blogrc (call-process-shell-command (concat "google blogger list --blog '" googlecl-blogname "' --title '" btitle "' url") nil (current-buffer)))
(blogurl (buffer-string)))
(if (not (zerop(length blogurl)))
(if (y-or-n-p (concat "Blog entry exists :" blogurl ". View existing?"))
(browse-url blogurl))))))





--
My Emacs Files At GitHub

No comments:

Post a Comment