Changeset - 03fca578fbdc
[Not reviewed]
Merge
17 5 2
Sergey Pashinin - 11 years ago 2014-08-30 16:07:39
sergey@pashinin.com
Merge branch 'dev'

Conflicts:
src/workgroups-win.el
21 files changed:
0 comments (0 inline, 0 general)
.gitignore
Show inline comments
 
*.elc
 
TAGS
 
/dash.el
 
/s.el
 
/f.el
 
/anaphora.el
 
/deps
.travis.yml
Show inline comments
 
@@ -4,19 +4,37 @@ env:
 
  global:
 
    - CURL=curl -fsSkL --retry 9 --retry-delay 9
 
  matrix:
 
    - EMACS=emacs24
 
    - EMACS=emacs-snapshot
 

	
 
    - EMACS=emacs23           GUI=1
 
    - EMACS=emacs24           GUI=1
 
    - EMACS=emacs-snapshot    GUI=1
 
#    - EMACS=emacs-snapshot    GUI=0
 
#matrix:
 
#  allow_failures:
 
#    - env: EMACS=emacs-snapshot
 
before_install:
 
  - sudo add-apt-repository -y ppa:cassou/emacs
 
  - sudo apt-get update -qq
 
  - sudo apt-get install -qq $EMACS
 
  - "export DISPLAY=:99.0"
 
  - "sh -e /etc/init.d/xvfb start"
 
install:
 
  - make deps
 
  - if [ "$EMACS" = "emacs23" ]; then
 
      $CURL https://raw.githubusercontent.com/ohler/ert/fb3c278d/lisp/emacs-lisp/ert.el -o ert.el;
 
      $CURL http://elpa.gnu.org/packages/cl-lib-0.5.el -o cl-lib.el;
 
    fi
 
  - if [ "$EMACS" = "emacs24" ]; then
 
      sudo apt-get install -qq emacs24-el;
 
    fi
 
  - if [ "$EMACS" = "emacs-snapshot" ]; then
 
      sudo apt-get install -qq emacs-snapshot-el emacs-snapshot-gtk;
 
    fi
 

	
 
script:
 
  $EMACS --version && make test EMACS=${EMACS}
 
\ No newline at end of file
 
  - $EMACS --version
 
  - if [ "$GUI" = "1" ]; then make testgui EMACS=${EMACS}; fi;
 
  - if [ "$GUI" = "0" ]; then make test EMACS=${EMACS}; fi;
 
  - ls -la /tmp
 

	
 
notifications:
 
  email: false
 
\ No newline at end of file
Makefile
Show inline comments
 
# -*- Makefile -*-
 

	
 
EMACS = emacs
 

	
 
EMACS ?= emacs
 
TEST_DIR = src
 
TRAVIS_FILE = .travis.yml
 

	
 
# Compile with noninteractive and relatively clean environment.
 
EFLAGS ?= -L ../cl-lib -L src -L . -L tests -L deps
 
BATCH = $(EMACS) $(EFLAGS) -batch -Q
 
NOBATCH = $(EMACS) --debug-init $(EFLAGS) -Q
 
NOBATCHE = $(NOBATCH) -eval
 
BATCHE = $(BATCH) -eval
 
BATCHFLAGS = -batch -q --no-site-file
 
FLAGS =   -L src -batch -l workgroups2.el --eval "(ido-mode t)"
 
FLAGSWG = -L src -batch -l workgroups2.el --eval "(ido-mode t)" --eval "(workgroups-mode 1)"
 
@@ -14,24 +16,34 @@ WGCMD = ${EMACS} $(FLAGSWG) --debug-init --eval
 
clean:
 
	find . -name '*.elc' -delete
 

	
 
test: clean
 
# just load all files
 
	${EMACS} -L src $(BATCHFLAGS) -f batch-byte-compile $(TEST_DIR)/*.el
 

	
 
# wg-mode-line-string
 
	${EMACS} -L src -batch -l workgroups-modeline.el --eval '(message (wg-mode-line-string))'
 

	
 
# desktop-save-mode
 
	${EMACS} $(FLAGS) --eval "(desktop-save-mode 1)" --eval "(workgroups-mode 1)"
 

	
 
# WGs list length
 
	${EMACS} $(FLAGSWG) --eval "(message (number-to-string (length (wg-workgroup-list))))"
 

	
 
# show WG name
 
	${EMACS} $(FLAGSWG) --eval "(message (wg-workgroup-name (wg-current-workgroup)))"
 

	
 
# save session
 
	${WGCMD} "(wg-save-session)"
 

	
 
test-ido:
 
	emacs -Q -L src -l cl.el -l ido.el -l workgroups2.el --eval "(ido-mode t)" --eval "(workgroups-mode 1)"
 
.PHONY: deps
 
deps:
 
	mkdir -p deps;
 
	if [ ! -f deps/f.el ];               then curl https://raw.githubusercontent.com/rejeep/f.el/master/f.el -o deps/f.el; fi;
 
	if [ ! -f deps/s.el ];               then curl https://raw.githubusercontent.com/magnars/s.el/master/s.el -o deps/s.el; fi;
 
	if [ ! -f deps/dash.el ];            then curl https://raw.githubusercontent.com/magnars/dash.el/master/dash.el -o deps/dash.el; fi;
 
	if [ ! -f deps/anaphora.el ];        then curl https://raw.githubusercontent.com/rolandwalker/anaphora/master/anaphora.el -o deps/anaphora.el; fi;
 
	if [ ! -f deps/magit.el ];           then curl https://raw.githubusercontent.com/magit/magit/master/magit.el -o deps/magit.el; fi;
 
	if [ ! -f deps/git-commit-mode.el ]; then curl https://raw.githubusercontent.com/magit/git-modes/master/git-commit-mode.el -o deps/git-commit-mode.el; fi;
 
	if [ ! -f deps/git-rebase-mode.el ]; then curl https://raw.githubusercontent.com/magit/git-modes/master/git-rebase-mode.el -o deps/git-rebase-mode.el; fi;
 
	if [ ! -f deps/magit-key-mode.el ];  then curl https://raw.githubusercontent.com/magit/magit/master/magit-key-mode.el -o deps/magit-key-mode.el; fi;
 

	
 

	
 
.PHONY: test
 
test: $(ELCS)
 
	@$(BATCHE) "(progn\
 
	(require 'cl) \
 
	(require 'ert) \
 
	(put 'flet 'byte-obsolete-info nil))" \
 
	-l tests/ert-my-utils.el -l tests/workgroups2-tests.el -f ert-run-tests-batch-and-exit
 

	
 

	
 
.PHONY: testgui
 
testgui: $(ELCS)
 
	@$(NOBATCHE) "(progn\
 
	(require 'cl) \
 
	(require 'ert) \
 
	(put 'flet 'byte-obsolete-info nil))" \
 
	-l tests/ert-my-utils.el -l tests/workgroups2-tests.el -f my-ert-run-tests
 
	if [ -f /tmp/wg-tests.log ]; then cat /tmp/wg-tests.log; exit 1; fi;
 
	if [ -f /tmp/wg-tests-ok.log ]; then cat /tmp/wg-tests-ok.log; fi;
README.md
Show inline comments
 
# Workgroups for Emacs
 
[![License](https://img.shields.io/badge/license-GPL_3-green.svg?dummy)](https://github.com/pashinin/workgroups2)
 
[![Build Status](https://travis-ci.org/pashinin/workgroups2.png?branch=master)](https://travis-ci.org/pashinin/workgroups2)
 
[![Gittip](http://img.shields.io/gittip/pashinin.png)](https://www.gittip.com/pashinin)
 

	
 
## What is it?
 
# Workgroups for Emacs
 

	
 
Workgroups is a session manager for Emacs.
 

	
 
@@ -16,9 +17,11 @@ Fork it, [add more special buffers support](https://github.com/pashinin/workgrou
 

	
 
Just install "workgroups2" from Melpa and activate it with
 

	
 
    (require 'workgroups2)
 
    ;; Change some settings
 
    (workgroups-mode 1)        ; put this one at the bottom of .emacs
 
```elisp
 
(require 'workgroups2)
 
;; Change some settings
 
(workgroups-mode 1)        ; put this one at the bottom of .emacs
 
```
 

	
 
## Use
 

	
 
@@ -38,45 +41,77 @@ By default prefix is: "C-c z" (To change it - see settings below)
 

	
 
If you want to change some settings - here is an example:
 

	
 
    (require 'workgroups2)
 
    ;; Your settings here
 
```elisp
 
(require 'workgroups2)
 
;; Your settings here
 

	
 
    ;; autoload/autosave:
 
    ;;(setq wg-session-load-on-start nil)
 
;;(setq wg-session-load-on-start t)    ; default: (not (daemonp))
 

	
 
    ;; Change prefix key (before activating WG)
 
    (setq wg-prefix-key (kbd "C-c z"))
 
;; Change prefix key (before activating WG)
 
(setq wg-prefix-key (kbd "C-c z"))
 

	
 
    ;; Change workgroups session file
 
    (setq wg-session-file "~/.emacs.d/.emacs_workgroups")
 
;; Change workgroups session file
 
(setq wg-session-file "~/.emacs.d/.emacs_workgroups")
 

	
 
    ;; Set your own keyboard shortcuts to reload/save/switch WG:
 
    (global-set-key (kbd "<pause>")     'wg-reload-session)
 
    (global-set-key (kbd "C-S-<pause>") 'wg-save-session)
 
    (global-set-key (kbd "s-z")         'wg-switch-to-workgroup)
 
    (global-set-key (kbd "s-/")         'wg-switch-to-previous-workgroup)
 
;; Set your own keyboard shortcuts to reload/save/switch WGs:
 
;; "s" == "Super" or "Win"-key, "S" == Shift, "C" == Control
 
(global-set-key (kbd "<pause>")     'wg-reload-session)
 
(global-set-key (kbd "C-S-<pause>") 'wg-save-session)
 
(global-set-key (kbd "s-z")         'wg-switch-to-workgroup)
 
(global-set-key (kbd "s-/")         'wg-switch-to-previous-workgroup)
 

	
 
    (workgroups-mode 1)   ; put this one at the bottom of .emacs
 
(workgroups-mode 1)   ; put this one at the bottom of .emacs
 
```
 
## More options
 

	
 
## Help
 
You can use `M-x customize-group` `workgroups` to see all variables and
 
faces to change.
 

	
 
```elisp
 
;; What to do on Emacs exit / workgroups-mode exit?
 
(setq wg-emacs-exit-save-behavior           'save)      ; Options: 'save 'ask nil
 
(setq wg-workgroups-mode-exit-save-behavior 'save)      ; Options: 'save 'ask nil
 

	
 
Type `<prefix> ?` (Eval `(wg-help)`) for more help.
 
;; Mode Line changes
 
;; Display workgroups in Mode Line?
 
(setq wg-mode-line-display-on t)          ; Default: (not (featurep 'powerline))
 
(setq wg-flag-modified t)                 ; Display modified flags as well
 
(setq wg-mode-line-decor-left-brace "["
 
      wg-mode-line-decor-right-brace "]"  ; how to surround it
 
      wg-mode-line-decor-divider ":")
 
```
 

	
 
This will bring up a help buffer listing all the commands and their bindings.
 
### Hooks
 

	
 
See the customization section in the source for details, or use:
 
Hooks' names can tell when they are executed
 

	
 
```elisp
 
workgroups-mode-hook                    ; when `workgroups-mode' is turned on
 
workgroups-mode-exit-hook               ; `workgroups-mode' is turned off
 
wg-before-switch-to-workgroup-hook
 
wg-after-switch-to-workgroup-hook
 
```
 

	
 
## Help
 

	
 
    M-x customize-group RET workgroups RET
 
For you:
 

	
 
1. `<prefix> ?` or `(wg-help)` - help buffer listing all the commands
 
   and their bindings.
 
2. `M-x customize-group RET workgroups RET` - all customization options
 

	
 
## Original Workgroups
 
For me:
 

	
 
There is a package on Melpa called "workgroups".
 
This extension is based on experimental branch of the [original repo](http://github.com/tlh/workgroups.el).
 
1. **Reporting a bug** - give me full `(backtrace)` of what
 
   happened and how you did it.
 
2. **Requesting a major-mode support** - write how you *install*,
 
   *configure* and *run* yours.
 
3. Make pull-requests
 
4. Ask questions (if you don't know how to hack it). Personally I
 
   found the code *very* complex at first
 

	
 
So great respect to the author. But it has not been updated for more
 
than 2 years and experimental branch was not released.
 

	
 
## License
 

	
 
Workgroups for Emacs is released under the GPL.
 
GPL. This extension is based on experimental branch of the
 
[original repo](http://github.com/tlh/workgroups.el).
src/workgroups-advice.el
Show inline comments
 
deleted file
src/workgroups-buf.el
Show inline comments
 
deleted file
src/workgroups-faces.el
Show inline comments
 
deleted file
src/workgroups-ido.el
Show inline comments
 
deleted file
src/workgroups-keys.el
Show inline comments
 
deleted file
src/workgroups-minibuffer.el
Show inline comments
 
deleted file
src/workgroups-modeline.el
Show inline comments
 
deleted file
src/workgroups-pickel.el
Show inline comments
 
deleted file
src/workgroups-session.el
Show inline comments
 
deleted file
src/workgroups-specialbufs.el
Show inline comments
 
deleted file
src/workgroups-structs.el
Show inline comments
 
deleted file
src/workgroups-utils-basic.el
Show inline comments
 
deleted file
src/workgroups-variables.el
Show inline comments
 
deleted file
src/workgroups-wconfig.el
Show inline comments
 
deleted file
src/workgroups-win.el
Show inline comments
 
deleted file
src/workgroups-workgroup.el
Show inline comments
 
deleted file
src/workgroups-wtree.el
Show inline comments
 
deleted file

Changeset was too big and was cut off... Show full diff anyway

0 comments (0 inline, 0 general)