Skip to content

Commit

Permalink
refactory files
Browse files Browse the repository at this point in the history
  • Loading branch information
eggcaker committed Jan 17, 2015
1 parent cba98b0 commit 17fec96
Show file tree
Hide file tree
Showing 13 changed files with 130 additions and 726 deletions.
485 changes: 0 additions & 485 deletions history.md

This file was deleted.

51 changes: 31 additions & 20 deletions pelm.org
Expand Up @@ -158,37 +158,26 @@ Function for loading other parts of the PELM.
(pelm-load "evil")
(pelm-load "keys")
(pelm-load "yas")



(pelm-load "misc")
#+END_SRC

#+BEGIN_SRC emacs-lisp
(defvar pelm-plugins
'(
git
markups
;;markups
;;scala
;;haskell
;;clojure
lisp
c
go
js
java
(pelm-load "lisp")
(pelm-load "c")
;;go
(pelm-load "js")
;;java
;; php
;;objc
blog
(pelm-load "blog")
;;mail
;;android
;;gnus
shell
(pelm-load "shell")
;;scrum
))

(pelm-load "misc")
#+END_SRC

** System Specific Files
#+BEGIN_SRC emacs-lisp
(cond
Expand All @@ -208,3 +197,25 @@ Function for loading other parts of the PELM.
(load (concat pelm-dir "post-init-local") 'noerror)
(run-hooks 'pelm-post-init-hook)
#+END_SRC

** Customize

after you clone the PELM, you can add your own code in 2 files :
- pre-init-local.el
- post-init-local.el

the PELM loaded =pre-init-local.el= before allplugins and load
=post-init-local.el= after all plugins loaded. both of them ignore
by git, so can add some experimental code.

** Dpendencies
- libtool
- g++
- libglib2.0-dev
- libgmime-2.6-dev
- php5 ( for stock bin)
- libxapian-dev
- texinfo

** License
MIT
18 changes: 5 additions & 13 deletions plugins/pelm-blog.el → plugins/pelm-blog.org
@@ -1,15 +1,8 @@
;;; pelm-misc.el --- PELM blog
;;
;; Copyright (c) 2011-2015 eggcaker
;;
;; Authors: eggcaker <eggcaker@gmail.com>
;; URL: http://iemacs.com/pelm


;; This file is not part of GNU Emacs

;;; Code:
* PELM-blog

** TODO refactory code and add document
** codes
#+BEGIN_SRC emacs-lisp
(require 'org-page)
(setq op/repository-directory "~/src/personal/iemacs")
(setq op/theme-root-directory "~/src/personal/iemacs/themes")
Expand All @@ -21,5 +14,4 @@
(setq op/personal-github-link "http://github.com/eggcaker")
(setq op/personal-google-analytics-id "")

(provide 'pelm-blog)
;;; pelm-blog ends here
#+END_SRC
40 changes: 14 additions & 26 deletions plugins/pelm-c.el → plugins/pelm-c.org
@@ -1,57 +1,48 @@
;;; pelm-c.el --- PELM c-mode
;;
;; Copyright (c) 2011-2015 eggcaker
;;
;; Authors: eggcaker <eggcaker@gmail.com>
;; URL: http://caker.me/pelm
* PELM-c configurations

;; This file is not part of GNU Emacs

;;; Code:
#+BEGIN_SRC emacs-lisp

(defconst pelm-c-style
'((c-offsets-alist . ((substatement-open . 0)
(defun-block-intro . 4)
(statement-block-intro . 4)
(case-label . 4)
(defun-block-intro . 2)
(statement-block-intro . 2)
(case-label . 2)
;;(inclass . 0)
;;(topmost-intro . 0)
(inher-cont . 4)
(inline-open . 4)))
(inher-cont . 2)
(inline-open . 2)))
(c-echo-syntactic-information-p . t)))

(defun pelm-c-mode-common-hook ()
(c-add-style "pelm-c" pelm-c-style t)
(setq tab-width 4 indent-tabs-mode nil)) ;; indent with spaces not tabs
(setq tab-width 2 indent-tabs-mode nil)) ;; indent with spaces not tabs

(add-hook 'c-mode-common-hook 'pelm-c-mode-common-hook)


(setq c-mode-hook
(function (lambda()
(setq indent-tabs-mode nil)
(setq c-indent-level 4))))
(setq c-indent-level 2))))
(setq objc-mode-hook
(function (lambda ()
(setq indent-tabs-mode nil)
(setq c-indent-level 4))))
(setq c-indent-level 2))))
(setq c++-mode-hook
(function (lambda ()
(setq indent-tabs-mode nil)
(setq c-indent-level 4))))
(setq c-indent-level 2))))

(setq nxml-mode-hook
(function (lambda ()
(setq indent-tabs-mode nil)
(setq c-indent-level 4))))
(setq c-indent-level 2))))

(setq tab-width 4)
(setq tab-width 2)

(add-hook 'first-change-hook
(lambda () (setq indent-tabs-mode nil)))



(defun run-current-file ()
"Runs the compilation of the current file.
Assumes it has the same name, but without an extension"
Expand All @@ -76,8 +67,5 @@
(or (getenv "CFLAGS") "-ansi -pedantic -Wall -g")
file))))))

(provide 'pelm-c)

;; pelm-c.el ends here

#+END_SRC

12 changes: 9 additions & 3 deletions plugins/pelm-editor.org
@@ -1,4 +1,7 @@
* PELM-editor

** TODO refactory and added document
** Code
#+BEGIN_SRC emacs-lisp
;;; pelm-editor.el --- PELM editor
;;
Expand All @@ -14,9 +17,15 @@
;; no backups

(require 'smartparens)
(require 'auto-complete)
(require 'auto-complete-config)

(setq ac-comphist-file "~/.emacs.d/.cache/ac-comphist.dat")
(setq make-backup-files nil)
(drag-stuff-global-mode)

(projectile-global-mode)
(setq projectile-known-projects-file "~/.emacs.d/.cache/projectile.cache.files")

;;ido setups
(setq ido-enable-flex-matching t)
Expand Down Expand Up @@ -128,9 +137,6 @@
(defalias 'ack-find-file 'ack-and-a-half-find-file)
(defalias 'ack-find-file-same 'ack-and-a-half-find-file-same)

(require 'auto-complete)
(require 'auto-complete-config)
(auto-complete-mode)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/dict")
(ac-config-default)

Expand Down
19 changes: 6 additions & 13 deletions plugins/pelm-js.el → plugins/pelm-js.org
@@ -1,15 +1,9 @@
;;; pelm-js.el --- PELM js-mode
;;
;; Copyright (c) 2011-2015 eggcaker
;;
;; Authors: eggcaker <eggcaker@gmail.com>
;; URL: http://caker.me/pelm

;; This file is not part of GNU Emacs

;;; Code:

* PELM-js
** TODO refactory code and rewrite the docs
** TODO the slime-js not working
** Codes

#+BEGIN_SRC emacs-lisp
(load "editorconfig")
(require 'coffee-mode)
(require 'js3-mode)
Expand Down Expand Up @@ -110,5 +104,4 @@
(add-hook 'js2-mode-hook #'flycheck-mode)
(add-hook 'js3-mode-hook #'flycheck-mode)

(provide 'pelm-js)
;; pelm-js.el ends here
#+END_SRC
23 changes: 0 additions & 23 deletions plugins/pelm-lisp.el

This file was deleted.

12 changes: 12 additions & 0 deletions plugins/pelm-lisp.org
@@ -0,0 +1,12 @@
* PELM-lisp

** TODO refactory code and add document
#+BEGIN_SRC emacs-lisp

;; Copyright (c) 2011-2015 eggcaker
(require 'paredit)
(add-hook 'emacs-lisp-mode-hook 'subword-mode)
(add-hook 'emacs-lisp-mode-hook 'paredit-mode)
(add-hook 'emacs-lisp-mode-hook 'rainbow-delimiters-mode)

#+END_SRC
25 changes: 17 additions & 8 deletions plugins/pelm-org.org
Expand Up @@ -37,6 +37,7 @@

(setq org-export-backends '(ascii beamer html latex md rss reveal))

(setq org-clock-persist-file "~/.emacs.d/.cache/org-clock-save.el")

(add-hook 'org-mode-hook
'(lambda ()
Expand Down Expand Up @@ -144,7 +145,7 @@
SCHEDULED: %^t
:PROPERTIES:
:Effort: %^{effort|1:00|0:05|0:15|0:30|2:00|4:00}
:END
:END:
%?
" "Basic task data.")

Expand Down Expand Up @@ -300,7 +301,6 @@ SCHEDULED: %^t




;;;; Refile settings
; Exclude DONE state tasks from refile targets
(defun pelm/verify-refile-target ()
Expand Down Expand Up @@ -394,6 +394,9 @@ SCHEDULED: %^t
((org-agenda-overriding-header "Tasks to Archive")
(org-agenda-skip-function 'pelm/skip-non-archivable-tasks))))))




(defun pelm/skip-stuck-projects ()

"Skip trees that are not stuck projects"
Expand Down Expand Up @@ -461,6 +464,9 @@ SCHEDULED: %^t
(setq org-clock-out-remove-zero-time-clocks t)
;; Clock out when moving task to a done state
(setq org-clock-out-when-done t)



;; Save the running clock and all clock history when exiting Emacs, load it on startup
(setq org-clock-persist t)
;; Do not prompt to resume an active clock
Expand Down Expand Up @@ -521,6 +527,9 @@ as the default task."
(org-clock-in '(16))
(pelm/clock-in-organization-task-as-default)))))




(defun pelm/punch-out ()
(interactive)
(setq pelm/keep-clock-running nil)
Expand Down Expand Up @@ -650,6 +659,8 @@ Callers of this function already widen the buffer view."
(setq org-tags-match-list-sublevels nil))
nil)



(defun pelm/list-sublevels-for-projects ()
"Set org-tags-match-list-sublevels so when restricted to a subtree we list all subtasks.
This is normally used by skipping functions where this variable is already local to the agenda."
Expand Down Expand Up @@ -808,8 +819,9 @@ When not restricted, skip project and sub-project tasks, habits, and project rel

; global Effort estimate values
; global STYLE property values for completion
(setq org-global-properties (quote (("Effort_ALL" . "0:15 0:30 0:45 1:00 2:00 3:00 4:00 5:00 6:00 0:00")
("STYLE_ALL" . "habit"))))
;; TODO: some bugs
;(setq org-global-properties (quote (("Effort_ALL" . "0:15 0:30 0:45 1:00 2:00 3:00 4:00 5:00 6:00")
; ("STYLE_ALL" . "habit"))))



Expand Down Expand Up @@ -906,6 +918,7 @@ Callers of this function already widen the buffer view."
(setq org-tags-match-list-sublevels nil))
nil)


(defun pelm/skip-non-stuck-projects ()
"Skip trees that are not stuck projects"
(save-restriction
Expand Down Expand Up @@ -1464,8 +1477,4 @@ Late deadlines first, then scheduled, then non-late deadlines"

(provide 'pelm-org)
;;; pelm-org.el ends here




#+END_SRC

0 comments on commit 17fec96

Please sign in to comment.