Advertisement
elvecent

.emacs for work

Aug 28th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scheme 2.83 KB | None | 0 0
  1. (setenv "PATH"
  2.   (concat
  3.    "/home/user/Development/mc-s1-sdk/bin/linux/x86_64/" ":"
  4.    (getenv "PATH")
  5.   )
  6. )
  7.  
  8.  
  9. (require 'package)
  10.  
  11. (let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
  12.                     (not (gnutls-available-p))))
  13.        (proto (if no-ssl "http" "https")))
  14.   (add-to-list 'package-archives
  15.            (cons "melpa" (concat proto "://melpa.org/packages/")) t))
  16.  
  17. (package-initialize)
  18.  
  19. (global-set-key (kbd "C-c a") 'org-agenda)
  20.  
  21. (require 'smartparens-config)
  22.  
  23. (require 'multiple-cursors)
  24.  
  25. (global-set-key (kbd "C->") 'mc/mark-next-like-this)
  26. (global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
  27.  
  28. (require 'pdf-tools)
  29. (pdf-tools-install)
  30.  
  31. (add-to-list 'load-path
  32.              "/home/user/.emacs.d/elisp/hideshow-org")
  33. (require 'hideshow-org)
  34.  
  35. (require 'compile)
  36. (add-hook 'c-mode-hook
  37.       (lambda ()
  38.         (progn
  39.           (unless (file-exists-p "Makefile")
  40.         (set (make-local-variable 'compile-command)
  41.              (let ((file (file-name-nondirectory buffer-file-name)))
  42.                (format "clang -S -O2 %s"
  43.                    file))))
  44.           (hs-org/minor-mode))))
  45.  
  46. (add-hook 'asm-mode-hook
  47.       (lambda ()
  48.         (auto-revert-mode)))
  49.  
  50. (add-hook 'racket-mode-hook #'smartparens-mode)
  51.  
  52. (global-set-key (kbd "C-x C-o") 'previous-multiframe-window)
  53. (global-set-key (kbd "C-c c") 'compile)
  54. (global-set-key (kbd "C-c w") 'fit-window-to-buffer)
  55.  
  56. (setq backup-directory-alist '(("." . "~/.emacs.d/saves")))
  57.  
  58. (defun workday-after (fix-date cur-date)
  59.   (and
  60.    (memq (calendar-day-of-week cur-date) '(1 2 3 4 5))
  61.    (calendar-date-compare (list fix-date) (list cur-date))))
  62.  
  63. (custom-set-variables
  64.  ;; custom-set-variables was added by Custom.
  65.  ;; If you edit it by hand, you could mess it up, so be careful.
  66.  ;; Your init file should contain only one such instance.
  67.  ;; If there is more than one, they won't work right.
  68.  '(backup-by-copying t)
  69.  '(column-number-mode t)
  70.  '(create-lockfiles nil)
  71.  '(custom-enabled-themes (quote (tango)))
  72.  '(desktop-save-mode nil)
  73.  '(display-time-24hr-format t)
  74.  '(display-time-mode t)
  75.  '(fill-column 80)
  76.  '(fit-window-to-buffer-horizontally t)
  77.  '(inhibit-startup-screen t)
  78.  '(org-agenda-files (quote ("~/org/work.org")))
  79.  '(org-clock-display-default-range (quote untilnow))
  80.  '(org-clock-idle-time 10)
  81.  '(org-clock-mode-line-total (quote today))
  82.  '(org-clock-x11idle-program-name "xprintidle")
  83.  '(package-selected-packages
  84.    (quote
  85.     (org smartparens racket-mode 2048-game pdf-tools multiple-cursors)))
  86.  '(pdf-view-image-relief 0)
  87.  '(scroll-step 1)
  88.  '(show-paren-mode t)
  89.  '(tab-always-indent (quote complete))
  90.  '(tab-width 4)
  91.  '(tool-bar-mode nil))
  92. (custom-set-faces
  93.  ;; custom-set-faces was added by Custom.
  94.  ;; If you edit it by hand, you could mess it up, so be careful.
  95.  ;; Your init file should contain only one such instance.
  96.  ;; If there is more than one, they won't work right.
  97.  )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement