Showing posts with label elisp. Show all posts
Showing posts with label elisp. Show all posts

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

wfgw1t324t634

df
--
My Emacs Files At GitHub

expertise

Remote: origin git@github.com:rileyrg/org-googlecl.git
Local: master ~/programming/emacs/org-googlecl/
Head: 0de8b07 Do zerop check on length. How many more times am I going to make that error?!

Stashes:

--
My Emacs Files At GitHub

org-googlecl now checks for exiting 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 there is give the option to view the existing one.
(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))))))

(unless borg (setq bbody
(if (use-region-p)
(region-or-word-at-point)
(read-from-minibuffer "Body:" ))))

--
My Emacs Files At GitHub

ererererer

body
--
My Emacs Files At GitHub

test2

help

test

r

Monday, September 13, 2010

Save temp files to the tmp directory

(setq backup-directory-alist
`((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t)))





Save temp files to the tmp directory

(setq backup-directory-alist
`((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t)))

;; (require 'real-auto-save)
;; (remove-hook 'org-mode-hook 'turn-on-real-auto-save)
;; (setq real-auto-save-interval 5) ;; in seconds




Save temp files to the tmp directory

(setq backup-directory-alist
`((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t)))

;; (require 'real-auto-save)
;; (remove-hook 'org-mode-hook 'turn-on-real-auto-save)
;; (setq real-auto-save-interval 5) ;; in seconds








;; Dont ask me why this needs to go here. I dont know.
(require 'pymacs)
(pymacs-load "ropemacs" "rope-")

(defvar server-emacs t
"If non-null, this emacs should run emacsclient.")
(defvar org-instance t
"If nil then no org bindings")
(defvar email-instance nil
"If nil then no email")
(defvar erc-instance nil
"If nil then no erc auto start")

(add-to-list
'command-switch-alist
'("email" . (lambda (&rest ignore)
;; Start Gnus when Emacs starts
(setq email-instance t))))

(add-to-list
'command-switch-alist
'("irc" . (lambda (&rest ignore)
(setq erc-instance t))))

(add-to-list
'command-switch-alist
'("no-server" . (lambda (&rest ignore)
(setq server-emacs nil))))

(add-to-list
'command-switch-alist
'("no-org" . (lambda (&rest ignore)
(setq org-instance nil))))

(add-hook 'emacs-startup-hook
(lambda ()
(when server-emacs
(server-start))
(when org-instance
(rgr-org))
(when erc-instance
(rgr/start-erc))
(when email-instance
(progn (gnus)))))