This file contains hidden or 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 postscript-process () | |
(get-buffer-process (get-buffer "*postscript*"))) | |
(defun run-postscript () | |
(interactive) | |
(require 'comint) | |
(switch-to-buffer (make-comint "postscript" "gs"))) | |
(push '("postscript" . utf-8) process-coding-system-alist) |
This file contains hidden or 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
%!PS | |
%%DocumentMedia: a4 595 842 80 () () | |
/pageHeight 842 def | |
/pageWidth 595 def | |
<< /PageSize [pageWidth pageHeight] >> setpagedevice | |
/mm { 2.834645669 mul } def |
This file contains hidden or 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
newpath | |
300.0 400.0 moveto | |
gsave | |
currentpoint translate | |
-241.66666666666669 0.0 rmoveto | |
108.33333333333334 0.0 rmoveto | |
gsave | |
currentpoint translate | |
-108.33333333333334 0.0 rmoveto | |
25.0 0.0 rmoveto |
This file contains hidden or 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
;; Get package installation ready | |
(require 'package) | |
(setq package-enable-at-startup nil) | |
(add-to-list 'package-archives | |
'("melpa" . "https://melpa.org/packages/")) | |
(package-initialize) | |
;; Bootstrap `use-package' | |
(unless (package-installed-p 'use-package) | |
(package-refresh-contents) |
This file contains hidden or 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
;; 1. place this in ~/.emacs.d/private/intero/packages.el | |
;; 2. add intero, syntax-checking and auto-completion to your | |
;; ~/.spacemacs layer configuration & remove the haskell layer | |
;; if you were using that before | |
;; 3. make sure you have stack installed http://haskellstack.org | |
;; 4. fire up emacs & open up a stack project's source files |
This file contains hidden or 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
dotspacemacs-default-font '("Source Code Pro" | |
:size 18 | |
:weight normal | |
:width normal | |
:powerline-scale 1.1) | |
(server-start) | |
(setq haskell-default-program "stack ghci") |
This file contains hidden or 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
#!/usr/bin/env zsh | |
# ---------------------------------------------------------------------- | |
# Send the standard input into a running emacs server, either on the | |
# kill ring, in a specified register, or in a new buffer. Examples: | |
# echo -n some text into the kill ring | into-emacs | |
# echo -n other text into register 1 | into-emacs -r 1 | |
# long_command | into-emacs -b "long command output" |
This file contains hidden or 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
;;;; ================= Way 1 ================= | |
;; Before commit with work profile use M-x magit-status-work | |
;; | |
(defun magit-status-work () | |
(interactive) | |
(setenv "GIT_AUTHOR_NAME" "work user") | |
(setenv "GIT_AUTHOR_EMAIL" "[email protected]") | |
(magit-status default-directory)) |
This file contains hidden or 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
;; Question: Is there a package/lisp code that lets me cycle through filetype buffers? | |
;; Reddit tpic: https://www.reddit.com/r/emacs/comments/5tjgsb/is_there_a_packagelisp_code_that_lets_me_cycle/ | |
;; | |
;; | |
(require 'helm) ;; | |
(require 'cl) ;; | |
(defun switch-buffer-type (buffer-major-mode file-extension) | |
(let ((items (mapcar | |
(lambda (buf) (cons (buffer-name buf) buf)) |
This file contains hidden or 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
; See http://www.haskell.org/haddock/doc/html/ch03s08.html#idp1371070500 | |
; and http://www.haskell.org/haddock/doc/html/ch03s08.html#idp1371060908 | |
; | |
; Examples: | |
; \, /, ', `, ", @, < ===> \\, \/, \', \`, \", \@, \< | |
; foo `fmap` bar "/a/b" ===> foo \`fmap\` bar \"\/a\/b\" | |
(defun haddock-escape (start end) | |
"Escape symbols that have special meaning in Haddock comments." | |
(interactive "r") | |
(replace-regexp "\\([^\\\\]?\\)\\(`\\|'\\|\\\"\\|@\\|<\\|/\\|\\\\\\)" "\\1\\\\\\2" nil start end)) |