Posted October 14th, 2010 by Aidan McQuay, 2 Comments
I’ve recently decided to ditch CUA mode. It steals some shortcuts that I would like to override. One thing CUA mode did really well is allow the use of C-x for CUT and for the C-x Command Prefix. I haven’t quite figured out how to replicate this exact behavior, even finding info on how to remap C-x reliably was difficult.
The problem here is that if you remap C-x it breaks commands further down the line regardless. Instead of remapping the keys in this case you want to use keyboard-translate :
;; -- cut C-x, C-x is now C-j
(keyboard-translate ?\C-j ?\C-x)
(keyboard-translate ?\C-x ?\C-w)
This remaps Swaps C-x for C-j and puts kill-region in for for C-x.
Posted October 10th, 2010 by Aidan McQuay, No Comments
I’ve been puttering around trying to get MySQL to work with Cygwin for a while. It’s not available on the main application package system, so there’s a lot of advice out there on how to compile it.
Unfortunately it’s really hard to compile, I mucked around with it for quite a few hours before, finally finding the advice hidden deep in a thread that it’s available in Cygwin Ports. Cygwin ports which I hadn’t heard of before provided all sorts of stuff that’s not available normally.
Just follow the directions here, and select the MySQL package when prompted.
http://sourceware.org/cygwinports/
It’s been working great for me and I can finally use SQL-MODE in emacs.
Posted October 8th, 2010 by Aidan McQuay, No Comments
oh no, becoming a Emacs org-mode addict. Soon to release org-basecamp, two way todo syncing with org-mode.
Posted June 10th, 2010 by Aidan McQuay, No Comments
Posted May 25th, 2010 by Aidan McQuay, 2 Comments
I’ve been releasing stuff to Github these days, basecamp2text , drupal-irssi , simple-volume-osd , etc. So I’ve been using TortoiseGit as a GUI to make git a little easier to swallow.
On the SVN side of things I’ve been using a library I found over on the EmacsWIKI to interface SVN and emacs. Since I’m using Git so much these days I thought I’d adapt that library to work with TortioseGit.
Right now it only supports log, diff, blame, commit, revert and help. It’s been working great for my uses so far.
tortoise-git.el
(defun tortoise-git-command (command filename)
(start-process "tortoise-git" "foo"
"c:/Progra~1/TortoiseGit/bin/TortoiseProc" (concat "/command:" command)
(concat "/path:" (replace-regexp-in-string "Program Files"
(regexp-quote "Progra~1") (expand-file-name filename))
"")))
(defun tortoise-git-log ()
(interactive)
(tortoise-git-log-select (buffer-file-name)))
(defun tortoise-git-log-select (filename &optional wildcards)
(interactive (find-file-read-args "Find file: " t))
(tortoise-git-command "log" filename))
(defun tortoise-git-diff ()
(interactive)
(tortoise-git-command "diff" (buffer-file-name)))
(defun tortoise-git-blame ()
(interactive)
(tortoise-git-command "blame" (buffer-file-name)))
(defun tortoise-git-commit ()
(interactive)
(tortoise-git-command "commit" (buffer-file-name)))
(defun tortoise-git-commit-select (filename &optional wildcards)
(interactive (find-file-read-args "Find file: " t))
(tortoise-git-command "commit" (buffer-file-name)))
(defun tortoise-git-revert ()
(interactive)
(tortoise-git-revert-select (buffer-file-name)))
(defun tortoise-git-revert-select (filename &optional wildcards)
(interactive (find-file-read-args "Find file: " t))
(tortoise-git-command "revert" filename))
(defun tortoise-git-help ()
(interactive)
(start-process-shell-command "tortoise-git" nil
(concat "/cygdrive/c/Progra~1/TortoiseGit/bin/TortoiseProc /command:help")))
; add key bind
(global-set-key "\C-xgl" 'tortoise-git-log)
(global-set-key "\C-xgL" 'tortoise-git-log-select)
(global-set-key "\C-xg=" 'tortoise-git-diff)
(global-set-key "\C-xgb" 'tortoise-git-blame)
(global-set-key "\C-xgc" 'tortoise-git-commit)
(global-set-key "\C-xgC" 'tortoise-git-commit-select)
(global-set-key "\C-xgs" 'tortoise-git-repostatus)
(global-set-key "\C-xgS" 'tortoise-git-repostatus-select)
(global-set-key "\C-xgr" 'tortoise-git-revert)
(global-set-key "\C-xgR" 'tortoise-git-revert-select)
(global-set-key "\C-xgh" 'tortoise-git-help)
(provide 'tortoise-git)
Watch the github repository for more features in the future:
http://github.com/openist/tortoise-git-emacs