[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

packages with use-package

From: Rusi
Subject: packages with use-package
Date: Thu, 02 Jun 2016 15:20:53 -0000
User-agent: G2/1.0

Thanks to
I finally got use-=package to work with with emacs packages.

Just wondering if this is the right approach -- specifically the bootstrap 

Comments/suggestions appreciated!

Selected contents of ~/.emacs.d/init.el

;; Bootstrap package system!

(add-to-list 'package-archives '("melpa" . "";) t)
(setq load-prefer-newer t)
(unless (package-installed-p 'use-package)
  (package-install 'use-package))
(require 'use-package)

;; Bootstrap package system done!

;; Typical usage:
(use-package csharp-mode
  :ensure t
  :mode ("\\.cs\\'" . csharp-mode)
  :interpreter ("csharp" . csharp-mode))

;; a builtin package usage
(use-package recentf
  (setq  recentf-save-file "~/.emacs.d/recentfiles"
         recentf-exclude '("COMMIT_EDITMSG" "org-clock-save.el"))
  (add-to-list 'recentf-arrange-rules '(("Org files (%d)" ".\\.org\\'")))
  (recentf-mode 1))

;;org mode is best managed outside the package system with git
;; also my setups are too big so farmed out
(use-package org-mode
  :load-path "~/pdsw/org-mode/lisp"
  (load-file "~/orghacks/orgsetups.el"))

;; And so on
(use-package haskell-mode
  :ensure t
  (:map haskell-mode-map 
        ("C-x C-d" . nil)
        ("C-c C-z" . haskell-interactive-switch)
        ("C-c C-l" . haskell-process-load-file)
        ("C-c C-b" . haskell-interactive-switch)
        ("C-c C-t" . haskell-process-do-type)
        ("C-c C-i" . haskell-process-do-info)
        ("C-c M-." . nil)
        ("C-c C-d" . nil)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]