Skip to content

Commit

Permalink
README.org: Rename from README.md
Browse files Browse the repository at this point in the history
* Makefile: New targets - update, compile, plain.

Re #34
  • Loading branch information
abo-abo committed Oct 2, 2017
1 parent 683efb2 commit bbd44df
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/Makefile
/init.el
/gh-pages/
/.cask/
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
emacs ?= emacs

update:
$(emacs) -batch -l targets/install-deps.el

compile:
$(emacs) -batch -l elpa.el -l targets/compile.el

plain:
@echo "Using $(shell which $(emacs))..."
@echo "Version: $(shell $(emacs) --version)"
$(emacs) -Q -l elpa.el -l targets/interactive.el README.org

clean:
rm -f *.elc

.PHONY: plain
6 changes: 0 additions & 6 deletions README.md

This file was deleted.

5 changes: 5 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* worf

**GNU Emacs minor mode that provides vi-like bindings for org-mode**

See the documentation in [[http://abo-abo.github.io/worf/README.html][HTML]] or [[https://raw.githubusercontent.com/abo-abo/worf/gh-pages/README.org][org]].
4 changes: 4 additions & 0 deletions elpa.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(setq package-user-dir
(expand-file-name (format ".cask/%s/elpa" emacs-version)))
(package-initialize)
(add-to-list 'load-path default-directory)
3 changes: 3 additions & 0 deletions targets/compile.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(setq files '("worf.el"))
(setq byte-compile--use-old-handlers nil)
(mapc #'byte-compile-file files)
28 changes: 28 additions & 0 deletions targets/install-deps.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
(setq package-user-dir
(expand-file-name (format ".cask/%s/elpa" emacs-version)))
(message "installing in %s ...\n" package-user-dir)
(package-initialize)
(setq package-archives
'(("melpa" . "http://melpa.org/packages/")
("gnu" . "http://elpa.gnu.org/packages/")))
(package-refresh-contents)

(defconst worf-dev-packages
'(swiper
ace-link
hydra
zoutline))

(dolist (package worf-dev-packages)
(unless (package-installed-p package)
(ignore-errors
(package-install package))))

(save-window-excursion
(package-list-packages t)
(condition-case nil
(progn
(package-menu-mark-upgrades)
(package-menu-execute t))
(error
(message "All packages up to date"))))
10 changes: 10 additions & 0 deletions targets/interactive.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(custom-set-variables
'(inhibit-startup-screen t)
'(scroll-bar-mode nil)
'(show-paren-mode t)
'(tool-bar-mode nil)
'(indent-tabs-mode nil))
(require 'worf)
(add-hook 'org-mode-hook (lambda () (worf-mode 1)))
(require 'swiper)
(ivy-mode)

0 comments on commit bbd44df

Please sign in to comment.