This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Damien Cassou | |
# | |
# This is the script I use to build https://launchpad.net/~cassou/+archive/emacs/ | |
# from http://emacs.naquadah.org/. | |
MAIN_VERSION=20120410 | |
SUB_VERSION=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(eval-after-load 'gist | |
'(progn | |
(defadvice gh-api-run-request (around | |
su/advice/gist/gh-api-run-request/around/set-tls-program a c pre) | |
"Set `tls-program' to favor openssl, otherwise url-retrieve-synchronously | |
hangs" | |
(let ((tls-program '( | |
"openssl s_client -connect %h:%p -no_ssl2 -ign_eof" | |
"gnutls-cli --insecure -p %p %h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defadvice gist-region (around su/advice/gist/gist-region/around/dirty-hack | |
a c pre) | |
"Dirty hack to prevent gist-region from choking on buffers which contain | |
`%' character" | |
(save-window-excursion | |
(let* ((delete-old-versions t) | |
(dummy "foo") | |
(beg (ad-get-arg 0)) | |
(end (ad-get-arg 1)) | |
(min-beg-end (min beg end)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun su/magit/commit-message-template (&rest discard) | |
"Have a template for the commit message" | |
(unless current-prefix-arg ;; ignore commit amends | |
(let ((tag (format "%s: " (magit-get-current-branch)))) | |
(goto-char (point-min)) | |
(unless (search-forward tag nil t) | |
(insert tag)) | |
(goto-char (point-max)) | |
))) | |
(add-hook 'magit-log-edit-mode-hook 'su/magit/commit-message-template) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun su/magit/format-magit-status-buffer-name () | |
"Append the value of current branch to `magit-status' buffer" | |
(let ((magit-status-buffer-name (buffer-name (magit-find-status-buffer))) | |
(branch-name (magit-get-current-branch)) | |
(buffer-name-regex "^\\(\\*.*\\*\\)\\(.*\\)?$")) | |
(dolist (buffer-name `(,magit-status-buffer-name ,magit-log-buffer-name)) | |
(string-match buffer-name-regex buffer-name) | |
(ignore-errors (with-current-buffer buffer-name | |
(rename-buffer (replace-match (concat "\\1" (format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Language.Haskell.Exts | |
main = putStr . prettyPrintWithMode (defaultMode {layout = PPSemiColon}) | |
. fromParseResult . parseFileContents =<< getContents |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# OPTIONS -Wall -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-matches #-} | |
{-# LANGUAGE TemplateHaskell, ViewPatterns #-} | |
-- | Helpful template haskell utilities. Mostly a re-write of the | |
-- subset of Justin Bailey's haskelldb-th that was needed, as an | |
-- educational exercise. | |
module Database.HaskellDB.TH where | |
import Control.Monad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; erc-sasl.el -- handle SASL PLAIN authentication | |
;; Copyright (C) 2012 Joseph Gay | |
;; Author: Joseph Gay <[email protected]> | |
;; Keywords: comm | |
;; This file is NOT part of GNU Emacs. | |
;; GNU Emacs is free software: you can redistribute it and/or modify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq x-select-enable-clipboard t) | |
;; [[https://hugoheden.wordpress.com/2009/03/08/copypaste-with-emacs-in-terminal/][source]] | |
;; If emacs is run in a terminal, the clipboard- functions have no | |
;; effect. Instead, we use of xsel, see | |
;; http://www.vergenet.net/~conrad/software/xsel/ -- "a command-line | |
;; program for getting and setting the contents of the X selection" | |
(unless window-system | |
(when (getenv "DISPLAY") | |
;; Callback for when user cuts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URxvt*letterSpace : -2 |
OlderNewer