Wednesday, October 5, 2011

jshint-mode

Playing with javascript lately I came across a super utility called jshint : and Dale Harvey has produced a super jshint-mode! For a javascript nOOb like me it's invaluable when combined with jslint.

See : jshint and Javascript Lint

My javascript set up:-


(require 'js-beautify)

(add-to-list 'load-path "~/.emacs.d/jquery-doc")
(require 'jquery-doc)
(add-hook 'js2-mode-hook 'jquery-doc-setup)
(require 'flymake-jshint)
(add-hook 'js2-mode-hook
(lambda () (flymake-mode t)))

(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))

;; (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
(add-hook 'js2-mode-hook '(lambda () (js-beautify)(define-key js2-mode-map (kbd "M-t") (lambda()(interactive)(js-beautify)))(define-key js2-mode-map [(shift f10)] (lambda()(interactive)(jslint-thisfile)))))

;; javascript lint
(defun jslint-thisfile ()
(interactive)
(compile (format "jsl -process %s" (buffer-file-name))))
(defun jslint-thisfile-test ()
(interactive)
(compile (format "jsl -process %s" (buffer-file-name))))

(provide 'rgr-javascript)

Tuesday, September 14, 2010

Browser shots


This is a wonderful site with which to check your CSS and browser compatability.



(progn
(org-back-to-heading)
(org-set-tags-to (append '("red" "blue") (list "green")))
)




[[http://browsershots.org/[[http://www.stevefairwaymusic.com/index][Browser][http://www.stevefairwaymusic.com/index][Browser]] Shots : preview your web site developments.]]


--
My Emacs Files At GitHub

Browser shots


This is a wonderful site with which to check your CSS and browser compatability.



(progn
(org-back-to-heading)
(org-set-tags-to (append '("red" "blue") (list "green")))
)




[[http://browsershots.org/[[http://www.stevefairwaymusic.com/index][Browser][http://www.stevefairwaymusic.com/index][Browser]] Shots : preview your web site developments.]]


--
My Emacs Files At GitHub

Browser Shots


This is a wonderful site with which to check your CSS and browser compatability.



(progn
(org-back-to-heading)
(org-set-tags-to (append '("red" "blue") (list "green")))
)




[[http://browsershots.org/[[http://www.stevefairwaymusic.com/index][Browser][http://www.stevefairwaymusic.com/index][Browser]] Shots : preview your web site developments.]]


--
My Emacs Files At GitHub

Browser Shots


This is a wonderful site with which to check your CSS and browser compatability.



(progn
(org-back-to-heading)
(org-get-tags)
)




[[http://browsershots.org/[[http://www.stevefairwaymusic.com/index][Browser][http://www.stevefairwaymusic.com/index][Browser]] Shots : preview your web site developments.]]


--
My Emacs Files At GitHub

Browser Shots


This is a wonderful site with which to check your CSS and browser compatability.



(progn
(org-back-to-heading)
(org-get-tags)
)




[[http://browsershots.org/[[http://www.stevefairwaymusic.com/index][Browser][http://www.stevefairwaymusic.com/index][Browser]] Shots : preview your web site developments.]]


--
My Emacs Files At GitHub

Browser Shots


This is a wonderful site with which to check your CSS and browser compatability.



(progn
(org-back-to-heading)
(org-get-tags)
)




[[http://browsershots.org/[[http://www.stevefairwaymusic.com/index][Browser][http://www.stevefairwaymusic.com/index][Browser]] Shots : preview your web site developments.]]


--
My Emacs Files At GitHub

Browser Shots : great web site


This is a wonderful site with which to check your CSS and browser compatability.



(progn
(org-back-to-heading)
(org-get-tags)
)




[[http://browsershots.org/[[http://www.stevefairwaymusic.com/index][Browser][http://www.stevefairwaymusic.com/index][Browser]] Shots : preview your web site developments.]]


--
My Emacs Files At GitHub

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

TestMe

wlfjslfkjslkfj

TestMe

new body 2

blog test

new body