GithubHelp home page GithubHelp logo

pashinin / workgroups2 Goto Github PK

View Code? Open in Web Editor NEW
292.0 16.0 42.0 579 KB

Workgroups2 - Emacs session manager

Home Page: http://workgroups2.rtfd.org/

License: GNU General Public License v3.0

Emacs Lisp 99.05% Makefile 0.65% Shell 0.29%

workgroups2's Introduction

Workgroups2

https://github.com/pashinin/workgroups2/actions/workflows/test.yml/badge.svg http://melpa.org/packages/workgroups2-badge.svg http://stable.melpa.org/packages/workgroups2-badge.svg

This program can save&load multiple named workspaces (or “workgroups”),

  • Save all opened buffers, their location and sizes on disk to restore later
  • Restore special buffers as: org-agenda, shell, magit-status, help, pdf-tools
  • Users can set up to support any special buffer (restoring the page number and notes of pdf file, for example)

Fork it, add more special buffers support. Or even better - fix bugs.

Install

Just install “workgroups2” from Melpa and activate it with

(require 'workgroups2)

Usage

Quick Start

Use M-x wg-create-workgroup to save save window&buffer layout as a work group.

Use M-x wg-open-workgroup to open an existing work group.

Use M-x wg-kill-workgroup to delete an existing work group.

Enable minor mode workgroups-mode (OPTIONAL)

Put below line at the bottom of .emacs,

(workgroups-mode 1)

Most commands are bound to both <prefix> <key> and <prefix> C-<key>.

By default prefix is: “C-c z” (To change it - see settings below)

<prefix> <key>
<prefix> C-c    - create a new workgroup
<prefix> C-v    - open an existing workgroup
<prefix> C-k    - delete an existing workgroup

If you want to set up this minor mode further:

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

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

Tips (OPTIONAL)

Change workgroups session file

Use below code

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

Support special buffer

Here is minimum sample code to support ivy-occur-grep-mode,

(with-eval-after-load 'workgroups2
  ;; provide major mode, package to require, and functions
  (wg-support 'ivy-occur-grep-mode 'ivy
              `((serialize . ,(lambda (_buffer)
                                (list (base64-encode-string (buffer-string) t))))
                (deserialize . ,(lambda (buffer _vars)
                                  (switch-to-buffer (wg-buf-name buffer))
                                  (insert (base64-decode-string (nth 0 _vars)))
                                  ;; easier than `ivy-occur-grep-mode' to set up
                                  (grep-mode)
                                  ;; need return current buffer at the end of function
                                  (current-buffer))))))

FAQ

Simon Michael (AKA) has written a nice FAQ.

License

workgroups2 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

workgroups2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

This extension is based on experimental branch of the original repo.

workgroups2's People

Contributors

abstraktnull avatar builtinnya avatar fishyfriend avatar il-k avatar ju-sh avatar pashinin avatar pitometsu avatar simonmichael avatar syohex avatar tangxinfa avatar tumashu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

workgroups2's Issues

Saving Auto-Complete modes

There is one big mode called auto-complete. Try M-x customize-group RET auto-complete to see what I mean. Now, I have a workgroup that I like to use for programming in the C language. To get auto-completion to work I type M-x auto-complete-mode and you can see the characters AC occur in the status bar in the current window. I saved this workgroup, but the auto-completion was not remembered.

Can you make it so that workgroups will remember the auto-completion mode?

Is it possible to "freeze" a workgroup?

I would like to freeze a frame configuration that I use for my agenda, such that when I follow a link to a mode that modifies the frame configuration (for instance a gnus link) I can easily restore that configuration. Is this possible with workgroups2?

How do I save & restore all frames automatically?

The single thing I want is that when I reenter Emacs is that all frames and buffers are reopened with the same contents.

Workgroups2 restores only a single frame. What am I supposed to set to get the behavior I want?

Can we have support for the compilation buffer.

One of my saved workgroups has the window configuration below

+------+------+
|      |  B   |
|  A   |      |
|      +------+
|      |  C   |
+------+------+

where "C" is the *compilation* buffer (created by Emacs when we
execute the compile command). However, there is no support for
the *compilation* buffer and window "C" is restored as the
*scratch* buffer. The problem with this is that
when I run the compile command in a restored workgroup like this
Emacs will often use the "B" window for the compilation buffer.

Is is possible to get support for the *compilation* buffer? I
don't think workgroups needs anything special for the compilation
buffer. Setting buffer name in "C" to "*compilation*" would be
enough. With this if I execute the compile command in a newly
restored workgroup like above Emacs would use the window "C".

~/.emacs_workgroups is corrupt sometimes

Here is one file, maybe some # character?

[cl-struct-wg-session "0GEA0XVF0TZ6AHBC-JUTXJ" nil t nil "~/.emacs_workgroups" "1.0.1" ([cl-struct-wg-workgroup "0GEA0XVF0UOKGRE8-JUUEM" "First workgroup" t nil [c    l-struct-wg-wconfig "0GEA1DA8CNEOBSDS-27JF6B" nil ((fullscreen)) nil nil 239 67 nil nil [cl-struct-wg-wtree nil nil (0 1 239 66) ([cl-struct-wg-win nil nil (0 1 11    9 66) 1221 1 0 nil t nil "0GEA0Y1MHB7S7EZ4-UG0QE"] [cl-struct-wg-win nil nil (119 1 239 66) 17078 16675 0 nil nil nil "0GEA15WY6AMW59TC-1FRV6V"])]] nil nil nil ("0    GEA1AZ85CYDA474-239XSS" "0GEA19C75G3BDSWW-1X73D3" "0GEA18LX8QW1CK5S-1U4MDK" "0GEA18JLIFNC6K40-1SNRGJ" "0GEA15WY6AMW59TC-1FRV6V" "0GEA17QWK6IA0D48-1O1EYH" "0GEA17QO    436E8T4O-1NZW3D" "0GEA170L8ZYQCXA0-1LKVVP" "0GEA15YPDYPVJS6W-1GBETG" "0GEA157X5CZG2GQG-1DQQ1A" "0GEA13LE2DXB7B48-1AR8PY" "0GEA13LE1SCXJAG0-1AR6I7" "0GEA12WLALVJGZV    S-15PPAO" "0GEA12JJ0H9KDBXS-147P3X" "0GEA0YSOIE7T2YHC-VSAO8" "0GEA0Y1MHB7S7EZ4-UG0QE" "0GEA0XZUD2L9EJ5C-RA53T" "0GEA0XZPIFUY39A8-R0PAK" "0GEA0XZMFZZJ9FI8-QC6SP" "0    GEA0XVF0ULP8XRC-JUUAG" "0GEA0XVQE5BG7BW0-PZ0OO")]) ([cl-struct-wg-buf "0GEA19C75G3BDSWW-1X73D3" "*Kill Ring*" nil 1 nil ((major-mode . browse-kill-ring-mode) nil n    il nil nil nil nil nil) nil nil] [cl-struct-wg-buf "0GEA18LX8QW1CK5S-1U4MDK" "*Packages*" nil 84172 1 ((major-mode . package-menu-mode) nil nil nil nil nil nil nil    ) nil nil] [cl-struct-wg-buf "0GEA15YPDYPVJS6W-1GBETG" "*helm-mode-describe-package*" nil 18 nil ((major-mode . fundamental-mode) nil nil nil nil nil nil nil) nil     nil] [cl-struct-wg-buf "0GEA18JLIFNC6K40-1SNRGJ" "*helm-mode-basic-save-buffer*" nil 19 nil ((major-mode . fundamental-mode) nil nil nil nil nil nil nil) nil nil]     [cl-struct-wg-buf "0GEA12JJ0H9KDBXS-147P3X" "*helm-mode-find-function*" nil 15 nil ((major-mode . fundamental-mode) nil nil nil nil nil nil nil) nil nil] [cl-struc    t-wg-buf "0GEA17QWK6IA0D48-1O1EYH" "*helm imenu*" nil 19 nil ((major-mode . fundamental-mode) nil nil nil nil nil nil nil) nil nil] [cl-struct-wg-buf "0GEA170L8ZYQ    CXA0-1LKVVP" "*helm-mode-org2blog/wp-login*" nil 19 nil ((major-mode . fundamental-mode) nil nil nil nil nil nil nil) nil nil] [cl-struct-wg-buf "0GEA157X5CZG2GQG-    1DQQ1A" "*helm-mode-org-set-tags*" nil 14 nil ((major-mode . fundamental-mode) nil nil nil nil nil nil nil) nil nil] [cl-struct-wg-buf "0GEA13LE1SCXJAG0-1AR6I7" "     *popwin-empty*" nil 1 nil ((major-mode . fundamental-mode) nil nil nil nil nil nil nil) nil nil] [cl-struct-wg-buf "0GEA0XZMFZZJ9FI8-QC6SP" "*helm recentf*" nil 9     nil ((major-mode . fundamental-mode) nil nil nil nil nil nil nil) nil nil] [cl-struct-wg-buf "0GEA12WLALVJGZVS-15PPAO" "*helm-mode-moz-load-js-file-and-send-it*" n    il 94 nil ((major-mode . fundamental-mode) nil nil nil nil nil nil nil) nil nil] [cl-struct-wg-buf "0GEA0XZPIFUY39A8-R0PAK" "marmalade.el" "/home/cb/projs/emacs-ar    chive/marmalade.el" 86913 437 ((major-mode . emacs-lisp-mode) nil nil nil nil nil nil nil) nil nil] [cl-struct-wg-buf "0GEA0XZUD2L9EJ5C-RA53T" "gnu.el" "/home/cb/p    rojs/emacs-archive/gnu.el" 205 nil ((major-mode . emacs-lisp-mode) nil nil nil nil nil nil nil) nil nil] [cl-struct-wg-buf "0GEA0YSOIE7T2YHC-VSAO8" "work.org" "/ho    me/cb/org/work/work.org" 35695 35475 ((major-mode . org-mode) (mark-ring 35475 34911 34778 137 137 1837) nil nil nil nil nil nil) nil nil] [cl-struct-wg-buf "0GEA1    7QO436E8T4O-1NZW3D" "tar-mode.el" "/usr/share/emacs/24.3/lisp/tar-mode.el" 16307 51267 ((major-mode . emacs-lisp-mode) (mark-ring 1867 1840 1763 1924 1867 1840 176    3 2082 2082 135 135 2475 4322 26226) nil nil nil nil nil nil) nil nil] [cl-struct-wg-buf "0GEA0XVF0ULP8XRC-JUUAG" "*scratch*" nil 297 334 ((major-mode . lisp-inter    action-mode) (mark-ring 397) nil nil nil nil nil nil) nil nil] [cl-struct-wg-buf "0GEA0XVQE5BG7BW0-PZ0OO" "*Messages*" nil 1 1 ((major-mode . fundamental-mode) (ma    rk-ring 1 1 1) nil nil nil nil nil nil) nil nil] [cl-struct-wg-buf "0GEA13LE2DXB7B48-1AR8PY" "*Help*" nil 1 1 ((major-mode . help-mode) (mark-ring 1 1) nil nil nil     nil nil nil) (wg-deserialize-help-mode-buffer ("/usr/share/emacs/24.3/lisp/emacs-lisp/" ((describe-variable package-archives #<buffer package.el>) ((1 describe-va    riable package-archives #<buffer package.el>) (1 describe-variable package-directory-list #<buffer package.el>) (1 describe-variable package-user-dir #<buffer pack    age.el>) (1 describe-variable package-alist #<buffer package.el>) (504 describe-variable package-load-list #<buffer package.el>) (1 describe-package w3m) (31155 de    scribe-variable package-archive-contents #<buffer package.el>) (57 describe-function list-packages) (40 describe-function package-list-packages) (563 describe-vari    able tar-update-datestamp #<buffer *Help*>) (753 describe-function tar-mode)) nil))) nil] [cl-struct-wg-buf "0GEA1AZ85CYDA474-239XSS" "init-elpa.el" "/home/cb/.ema    cs.d/init-elpa.el" 1972 1926 ((major-mode . emacs-lisp-mode) (mark-ring 1869 1404 1322 4175 1972 1926 1869 1404 4175 1972 1926 1869 1404 4175 1972 1926) nil nil ni    l nil nil nil) nil nil] [cl-struct-wg-buf "0GEA15WY6AMW59TC-1FRV6V" "package.el" "/usr/share/emacs/24.3/lisp/emacs-lisp/package.el" 17078 17246 ((major-mode . emac    s-lisp-mode) (mark-ring 18469 37927 22158 22354 22354 25189 27328 27305 50746 44309 45009 43903 45009 43903 45009 43903) nil nil nil nil nil nil) nil nil] [cl-stru    ct-wg-buf "0GEA0Y1MHB7S7EZ4-UG0QE" "README.org" "/home/cb/projs/emacs-archive/README.org" 1221 1477 ((major-mode . org-mode) (mark-ring 1299 628 39) nil nil nil ni    l nil nil) nil nil])]

Saving ALL buffers when doing <prefix> <C-s>

Hi,

My emacs session has 98 buffers open. But when I do <prefix> <C-s>, I see that the saved session file stores only 6 buffer names!

I verified that that's happening by loading that saved session.

What am I missing in the config that workgroups2 is not saving all the buffers?

Here is how I am trying to save the workgroup with all open buffers:

  • Open all the buffers I want to save in the workgroup (98 buffers)
  • Create workgroup <prefix> c
  • Save session <prefix> C-s
  • Quit emacs
  • Restart emacs
  • Load session <prefix> C-f
    At this point all 98 buffers are not restored, only 6 of them are!
(req-package workgroups2
  :pre-load
  (progn
    ;; Change prefix key (before activating WG)
    (setq wg-use-default-session-file nil ; autoload/autosave (turn off for "emacs --daemon")
          wg-prefix-key (kbd "s-w") ;; Win + w
          wg-emacs-exit-save-behavior 'save
          wg-workgroups-mode-exit-save-behavior 'save
          wg-session-file (concat user-emacs-directory "/.emacs_workgroups")))
  :config
  (progn
    (workgroups-mode 1)))  ; put this at the bottom of .emacs

Issues when used together with ECB

I use ECB as a project directory tree browser with a single pane on the left side of the screen.

With Workgroups2 active, creating/switching workgroups starts duplicating the ECB frame (but with the active buffer in the new pane instead of the ECB buffer), till the duplicates fill up the whole screen. They can't be switched to with C-x o either, just like ECB's own panes.

To me this is massively painful, cause Workgroups2 is the dream replacement for Escreen/Elscreen I've been looking for for years, but at the same time I can't let go of having a project file/folder tree visible.

Buffer ordering problem (the wrong buffer is restored when quitting another buffer)

Since I've started using workgroups2 I've noticed a small issue: when I quit a buffer, the buffer that is replaces it in the window is not the one I expect.

Here are two examples:

  • I do a search using notmuch, which creates a notmuch-search buffer. When I find a thread that I want to read, I hit "enter" to read the thread, which takes over the window. When I'm done reading that thread, I hit 'q' and the buffer that is restored is not the notmuch-search buffer but the one that was displayed before running the search.
  • I read RSS feeds using elfeed. Starting elfeed creates an elfeed-search buffer populated with article headlines. When I find an interesting post, I hit "enter" and it splits the window, displaying the article. To go back to the list of headlines, I hit 'q' but this now takes me back to the buffer before I started elfeed, and not to the elfeed-search buffer.

None of this happens when I'm not using workgroups.

Is this a bug?

The ability for workgroups2 to save programming language interpeters

Inspired by my super user post: http://superuser.com/questions/635013/emacs-workgroups-and-interpreters

We are looking for the capability for workgroups2 to save programming language interpreters inside emacs as shown in the post. In the post I have a python interpreter and an R interpreter. More generally, it would be great for ANY programming language interpreter (the builtin elisp interpreter (ielm) does work!)

The commands are M-x R which starts ESS (emacs speaks statistics) which is the R interpreter and M-x run-python

What I have noticed is that most programming language interpreters are started by M-x run-NAME. This seems to be built-in to emacs, try Mx-run-[TAB] to see the auto-complete list. However, they will not work unless you have installed the associated interpreter and elisp code for the associated mode. For example to run the prolog interpreter I have the following in my .emacs file:

;;;PROLOG
(setq auto-mode-alist
(cons (cons ".pl" 'prolog-mode) auto-mode-alist))
(autoload 'run-prolog "prolog" "Start a Prolog sub-process." t)
(autoload 'prolog-mode "prolog" "Major mode for editing Prolog programs." t)
(autoload 'mercury-mode "prolog" "Major mode for editing Mercury programs." t)
(setq prolog-system 'swi)
(setq auto-mode-alist (append '((".pl$" . prolog-mode)
(".m$" . mercury-mode))
auto-mode-alist))

I believe I installed SWI-Prolog (the implementation) via Linux's apt-get utility and I believe I installed prolog-mode.el from the emacs package manager MELPA.

Thanks, and let me know if you need more information.

wg-switch-to-buffer does not work (or exist)

With the latest version of the package, I could not not run wg-switch-to-buffer command (probably more functions are affected). I had to checkout a git version from last month in order to be able to use workgroups.

Macro expansion errors

Hi,

I just grabbed workgroups2 off MELPA. I'm getting the following errors when activating workgroups-mode without any configuration changes:

Eager macro-expansion failure: (error "(wg-workgroup-parameters copy) is not a valid place expression") [2 times]
Eager macro-expansion failure: (error "(wg-session-parameters copy) is not a valid place expression") [2 times]

Any guidance? GNU Emacs 24.3 Darwin.

workgroups2 breaks ENSIME

After the fix to #12, I updated workgroups2. Then I noticed another problem:

The updated version works with desktop mode but breaks ENSIME (which I need); commenting out the following two lines (leaving no mention of workgroups2 in my .emacs file) works around the problem for me.

  (require 'workgroups2)
  (workgroups-mode 1)

To notice the breakage when both are loaded, I simply need to do M-x ensime : Emacs will get stuck on:

Polling "/var/folders/_7/hlxv4yv95x95vgnn416b4q4m0000gn/T/ensime_port.79811".. (Abort with `M-x ensime-abort-connection'.)

even after ENSIME has started, as visible from the buffer *inferior-ensime-server*. Using M-x ensime-abort-connection will cause a flood of messages telling me that

I could reproduce this a few times by starting Emacs with those two lines in, I couldn't when I started Emacs without, loaded Workgroups2 later, by using C-x C-e on each of the above two lines, and then reloaded Ensime. Maybe that's because I didn't load Workgroups2 in .emacs, maybe because I can't always reproduce the problem anyway.

Relevant snippets from my .emacs (somewhat simplified):

; From https://github.com/aemoncannon/ensime#readme
;; load the ensime lisp code...
(add-to-list 'load-path "~/Documents/Research/Sorgenti/ensime/dist/elisp/")
(require 'ensime)

;; This step causes the ensime-mode to be started whenever
;; scala-mode is started for a buffer. You may have to customize this step
;; if you're not using the standard scala mode.

(add-hook 'scala-mode-hook 'ensime-scala-mode-hook)

;(setq ensime-sbt-compile-on-save nil)
(setq ensime-sbt-compile-on-save 1)
; ... 
   ;; See http://emacswiki.org/emacs/ELPA. Packages are made
    ;; available after initialization, hence we must load scala-mode2, workgroups2, etc.
    ;; after that.
    (add-hook 'after-init-hook
              #'(lambda ()
                  (after-packages-loaded-hook)))))
; ...
(defun after-packages-loaded-hook ()
; ...
  (require 'scala-mode2)
; ...
; Note: workgroups2 must be here since I loaded it through melpa, so it's
  (require 'workgroups2)
  (workgroups-mode 1)
)

I won't be able to spend extra time on trying out workgroups2 until the 12 October.

workgroups2 breaks desktop-save-mode

The single thing I want is that when I reenter Emacs is that all frames and buffers are reopened with the same contents, as in #11.

workgroups2 takes care of one frame, but it interferes with desktop-save-mode, hence it prevents me from taking care of open files.

Now, desktop-read restores workgroups, but does not run the standard desktop-restore. It's enough to require 'workgroups2 for this to happen.

Switched: First workgroup
Loaded: ~/.emacs_workgroups
Quit

This happens with Emacs 24.2.1 and the latest workgroups2 from elpa/melpa repos (installed today through packages-list-packages).

`next-buffer` does nothing on restore

All my visible buffers and windows are restored correctly when I start emacs. I even see all buffers, visible and not visible, on buffers list (C-x C-b). But if I try to change to any of them using next-buffer (or previous-buffer, switch-to-next-buffer, switch-to-prev-buffer...) then nothing happens.

When I do change to one of the open but not visible buffers (using C-x b, for example), then I can change to this buffer again using next-buffer, but only this one buffer. The other open but not visible buffers remain unreachable using next-buffer commands. Until I reach them using C-x b. Then I can reach them.

I can cycle only through the buffers I reached using C-x b.

It behaves like some cycling-buffer-list is empty, and it rebuilds itself as I switch to buffers by C-x b.

Is this fixable?

Saving the state of the scala REPL

Can we add support for a scala REPL? Specifically, I want to include the functionalities for ensime and sbt. Ensime is similar to slime for common lisp and sbt is a build tool.

I looked at your source code, and I believe you need the following information (let me know if you need more):

Starting ensime in a buffer: M-x ensime (you also have to specify the location of the ensime config file named .ensime)
Starting the REPL from a buffer: 'C-c C-v zwhich calls theensime-inf-switch` function which switches to a buffer containing the REPL.

After installing ensime via elpa, it appears that ensime and sbt are integrated, but I am not sure exactly how this is related (I think for now this suffices to saving the state of a scala REPL).

Keeping track of position in twittering-mode

I recently started using workgroups2, and like to keep one workgroup open with several twittering-mode buffers. In order to keep track of what I have read, I keep the point on the last tweet I've read, and usually twittering-mode inserts tweets above that point, letting me catch up at my own pace. However, when I switch back to this workgroup, the point is moved to where workgroups2 thinks is the last place it was, even if that means it has skipped over several new tweets that have come in.

This also happened with the original workgroups, but not when I was using elscreen. (For other reasons, I'd rather not go back to the latter.) Also note that if I switch to a twittering-mode buffer from another workgroup with C-x b, it works as expected, with the point being on the last tweet I read, no matter it's current position in the buffer.

Is there a way to fix this?

workgroups2 breaks powerline

My powerline does not show up under any circumstances if I have workgroups-mode on.

I saw #13 but wg-mode-line-disable doesn't seem to be used anywhere in the workgroups2 code so I assume it is defunct. I turned off desktop-save-mode as well but I still cannot get powerline and workgroups2 to coexist.

Saving the state of the w3m web browser

Currently in workgroups2, I had the w3m web browser open and I saved my entire workgroups configuration hoping that the next time I opened emacs, the w3m web-browser could refresh to the page that I was on. However, workgroups2 does not even restore the w3m web-browser at all!

Could you please add support for saving the w3m web-browser? Ideally, the URL of the page I am on should be restored.

Thanks.

desktop-mode & powerline interactions

There seem to be some weird interactions not just with desktop-mode, but also w/ powerline:

If both desktop mode and workgroups-mode are enabled before powerline, emacs segfaults...

If desktop-mode is disabled and wg enabled after powerline i'm getting this nice stacktrace:

Debugger entered--Lisp error: (wrong-type-argument integerp nil)
  wg-insert-after((wg-mode-line-display-on (:eval (wg-mode-line-string))) ("%e" (:eval (let* ((active (powerline-selected-window-active)) (mode-line (if active (quote mode-line) (quote mode-line-inactive))) (face1 (if active (quote powerline-active1) (quote powerline-inactive1))) (face2 (if active (quote powerline-active2) (quote powerline-inactive2))) (separator-left (intern (format "powerline-%s-%s" powerline-default-separator (car powerline-default-separator-dir)))) (separator-right (intern (format "powerline-%s-%s" powerline-default-separator (cdr powerline-default-separator-dir)))) (lhs (list (powerline-raw "%*" nil (quote l)) (powerline-buffer-size nil (quote l)) (powerline-raw mode-line-mule-info nil (quote l)) (powerline-buffer-id nil (quote l)) (when (and ... which-func-mode) (powerline-raw which-func-format nil ...)) (powerline-raw " ") (funcall separator-left mode-line face1) (when (boundp ...) (powerline-raw erc-modified-channels-object face1 ...)) (powerline-major-mode face1 (quote l)) (powerline-process face1) (powerline-minor-modes face1 (quote l)) (powerline-narrow face1 (quote l)) (powerline-raw " " face1) (funcall separator-left face1 face2) (powerline-vc face2 (quote r)))) (rhs (list (powerline-raw global-mode-string face2 (quote r)) (funcall separator-right face2 face1) (powerline-raw "%4l" face1 (quote l)) (powerline-raw ":" face1 (quote l)) (powerline-raw "%3c" face1 (quote r)) (funcall separator-right face1 mode-line) (powerline-raw " ") (powerline-raw "%6p" nil (quote r)) (powerline-hud face2 face1)))) (concat (powerline-render lhs) (powerline-fill face2 (powerline-width rhs)) (powerline-render rhs))))) nil)
  wg-add-mode-line-display()
  workgroups-mode(1)
  eval-buffer(#<buffer  *load*> nil "/Users/toxi/.emacs.d/init.el" nil t)  ; Reading at buffer position 13289
  load-with-code-conversion("/Users/toxi/.emacs.d/init.el" "/Users/toxi/.emacs.d/init.el" t t)
  load("/Users/toxi/.emacs.d/init" t t)

I can only get it to work if desktop-mode is disabled and wg enabled prior to powerline... not sure who's to blame here, though :)

Void function ":div"

This error shows up constantly in *Messages*:

Error during redisplay: (eval (wg-mode-line-string)) signaled (void-function :div)

Not defined functions

When installing this from MELPA, workgroups-commands.el fails compiling because it requires wg-docar from workgroups-utils-basic. When adding "(require 'workgroups-utils-basic)" to that file, compiling works fine.
Later, when trying to delete a workgroup, I get an error message about a not-defined function ring-insert. This message can be fixed by inserting "(require 'ring)" in workgroups-commands.el

Is there a reason that those require's where left out and is my fix correct (still new at emacs)?

Symbol's function definition is void: wg-prefix-key

I had workgroups2 working on Feb 6th, now it doesn't work! I can 'M-x workgroups-mode' and then 'C-c 2s' and it comes back saying 'Symbol's function definition is void: wg-prefix-key' If I 'C-PAUSE' it comes back saying 'wg-current-session: No session is defined'. From my .emacs -

;; workgroups
(require 'workgroups2)
;; Change prefix key (before activating WG)
(setq wg-prefix-key (kbd "C-c 2s"))

;; Change workgroups session file
 (setq wg-default-session-file "/home/boudiccas/.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-<pause>") 'wg-save-session)
(global-set-key (kbd "S-z")         'wg-switch-to-workgroup)
(global-set-key (kbd "S-y")         'wg-switch-to-previous-workgroup)

I got 'workgroups2-20140131.111' from ELPA, and am using emacs-24.3.1, with the 'afternoon.theme'. Where am I going wrong please?

cannot install workgroups2.el

I got this error when install workgroup2:

Compiling file /Users/lian/.emacs.d/elpa/workgroups2-20140929.2339/workgroups2.el at Wed Oct 22 08:3
windata 20080412.... new convert window configuration to list |6:14 2014
window+ 20140216.... new Extensions to `window.el'. |workgroups2.el:90:1:Error: Cannot open load file: f

Thanks for help!

Need to write a decent test system

As a reminder for me (or if someone wants to create it)
Need to write something for travis-ci.org to automatically check saving/restoring buffers.
Currently only syntax is checked (that everything loads)

"no session is defined"

Hi I just installed workgroups2 by melpa. However whatever command I issue, like wg-create-workgroup, wg-save-session, it always tells me "no session is defined". I googled online and failed to find related threads. Am I missing something here?

wg-save-wconfig doesn't work

I try M-x wg-save-wconfig and get error "wg-workgroup-save-wconfig: wg-wconfig-name accessing a non-wg-wconfig"

Make wg minor mode name configurable

Hi,

Right now the mode name of the wg minor mode is hardcoded to "wg" on the mode line. Could you make it configurable? When I turned on the wg mode globally, there is a "wg" on the mode line of all buffers, which is a waste of space. So I want to configure it to "" in order to hide it. Thanks!

Cant install from Melpa

Currently I get this error when trying to install workgroups2 from melpa:
error: Error during download request: Not Found

workgroups stop working with wg-add-buffer-to-buf-list(nil)

I have not yet found out how to reproduce this, but sometimes wg stops working and every operation raises a backtrace like this (bytecode removed, some of the code is visible as I tried to debug it):

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  wg-add-buffer-to-buf-list(nil)
  wg-pickel-marker-serializer(#<marker in no buffer>)
  #[(obj id) "..." [id obj result wg-pickel-object-serializer] 3](#<marker in no buffer> 18)
  maphash(#[(obj id) "..." [id obj result wg-pickel-object-serializer] 3] #s(hash-table size 65 test eq rehash-size 1.5 rehash-threshold 0.8 data (((#<buffer todo-orgx.org> #<marker at 1 in todo-orgx.org> #<marker at 158366 in todo-orgx.org>) (#<buffer refile-orgx.org> #<marker at 39 in refile-orgx.org> #<marker at 39 in refile-orgx.org>) (nil #<marker in no buffer> #<marker in no buffer>)) 0 (#<buffer todo-orgx.org> #<marker at 1 in todo-orgx.org> #<marker at 158366 in todo-orgx.org>) 1 #<buffer todo-orgx.org> 2 (#<marker at 1 in todo-orgx.org> #<marker at 158366 in todo-orgx.org>) 3 #<marker at 1 in todo-orgx.org> 4 (#<marker at 158366 in todo-orgx.org>) 5 #<marker at 158366 in todo-orgx.org> 6 nil 7 ((#<buffer refile-orgx.org> #<marker at 39 in refile-orgx.org> #<marker at 39 in refile-orgx.org>) (nil #<marker in no buffer> #<marker in no buffer>)) 8 (#<buffer refile-orgx.org> #<marker at 39 in refile-orgx.org> #<marker at 39 in refile-orgx.org>) 9 #<buffer refile-orgx.org> 10 (#<marker at 39 in refile-orgx.org> #<marker at 39 in refile-orgx.org>) 11 #<marker at 39 in refile-orgx.org> 12 (#<marker at 39 in refile-orgx.org>) 13 #<marker at 39 in refile-orgx.org> 14 ((nil #<marker in no buffer> #<marker in no buffer>)) 15 (nil #<marker in no buffer> #<marker in no buffer>) 16 (#<marker in no buffer> #<marker in no buffer>) 17 #<marker in no buffer> 18 (#<marker in no buffer>) 19 #<marker in no buffer> 20 ...)))
  wg-pickel-serialize-objects(#s(hash-table size 65 test eq rehash-size 1.5 rehash-threshold 0.8 data (((#<buffer todo-orgx.org> #<marker at 1 in todo-orgx.org> #<marker at 158366 in todo-orgx.org>) (#<buffer refile-orgx.org> #<marker at 39 in refile-orgx.org> #<marker at 39 in refile-orgx.org>) (nil #<marker in no buffer> #<marker in no buffer>)) 0 (#<buffer todo-orgx.org> #<marker at 1 in todo-orgx.org> #<marker at 158366 in todo-orgx.org>) 1 #<buffer todo-orgx.org> 2 (#<marker at 1 in todo-orgx.org> #<marker at 158366 in todo-orgx.org>) 3 #<marker at 1 in todo-orgx.org> 4 (#<marker at 158366 in todo-orgx.org>) 5 #<marker at 158366 in todo-orgx.org> 6 nil 7 ((#<buffer refile-orgx.org> #<marker at 39 in refile-orgx.org> #<marker at 39 in refile-orgx.org>) (nil #<marker in no buffer> #<marker in no buffer>)) 8 (#<buffer refile-orgx.org> #<marker at 39 in refile-orgx.org> #<marker at 39 in refile-orgx.org>) 9 #<buffer refile-orgx.org> 10 (#<marker at 39 in refile-orgx.org> #<marker at 39 in refile-orgx.org>) 11 #<marker at 39 in refile-orgx.org> 12 (#<marker at 39 in refile-orgx.org>) 13 #<marker at 39 in refile-orgx.org> 14 ((nil #<marker in no buffer> #<marker in no buffer>)) 15 (nil #<marker in no buffer> #<marker in no buffer>) 16 (#<marker in no buffer> #<marker in no buffer>) 17 #<marker in no buffer> 18 (#<marker in no buffer>) 19 #<marker in no buffer> 20 ...)))
  wg-pickel(((#<buffer todo-orgx.org> #<marker at 1 in todo-orgx.org> #<marker at 158366 in todo-orgx.org>) (#<buffer refile-orgx.org> #<marker at 39 in refile-orgx.org> #<marker at 39 in refile-orgx.org>) (nil #<marker in no buffer> #<marker in no buffer>)))
  (wg-set-win-parameter win (quote prev-buffers) (wg-pickel (remove nil (cl-subseq (window-prev-buffers window) 0 4))))
  (progn (select-window (car save-selected-window--state) (quote norecord)) (setq win (wg-make-win :edges (window-edges window) :point (wg-window-point window) :start (window-start window) :hscroll (window-hscroll window) :selected selected :minibuffer-scroll (eq window minibuffer-scroll-window) :dedicated (window-dedicated-p window) :buf-uid (wg-buffer-uid-or-add (window-buffer window)))) (wg-set-win-parameter win (quote next-buffers) (wg-pickel (remove nil (cl-subseq (window-next-buffers window) 0 4)))) (wg-set-win-parameter win (quote prev-buffers) (wg-pickel (remove nil (cl-subseq (window-prev-buffers window) 0 4)))))
  (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (setq win (wg-make-win :edges (window-edges window) :point (wg-window-point window) :start (window-start window) :hscroll (window-hscroll window) :selected selected :minibuffer-scroll (eq window minibuffer-scroll-window) :dedicated (window-dedicated-p window) :buf-uid (wg-buffer-uid-or-add (window-buffer window)))) (wg-set-win-parameter win (quote next-buffers) (wg-pickel (remove nil (cl-subseq (window-next-buffers window) 0 4)))) (wg-set-win-parameter win (quote prev-buffers) (wg-pickel (remove nil (cl-subseq (window-prev-buffers window) 0 4))))) (internal--after-with-selected-window save-selected-window--state))
  (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (setq win (wg-make-win :edges (window-edges window) :point (wg-window-point window) :start (window-start window) :hscroll (window-hscroll window) :selected selected :minibuffer-scroll (eq window minibuffer-scroll-window) :dedicated (window-dedicated-p window) :buf-uid (wg-buffer-uid-or-add (window-buffer window)))) (wg-set-win-parameter win (quote next-buffers) (wg-pickel (remove nil (cl-subseq (window-next-buffers window) 0 4)))) (wg-set-win-parameter win (quote prev-buffers) (wg-pickel (remove nil (cl-subseq (window-prev-buffers window) 0 4))))) (internal--after-with-selected-window save-selected-window--state)))
  (let ((save-selected-window--state (internal--before-with-selected-window window))) (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (setq win (wg-make-win :edges (window-edges window) :point (wg-window-point window) :start (window-start window) :hscroll (window-hscroll window) :selected selected :minibuffer-scroll (eq window minibuffer-scroll-window) :dedicated (window-dedicated-p window) :buf-uid (wg-buffer-uid-or-add (window-buffer window)))) (wg-set-win-parameter win (quote next-buffers) (wg-pickel (remove nil (cl-subseq ... 0 4)))) (wg-set-win-parameter win (quote prev-buffers) (wg-pickel (remove nil (cl-subseq ... 0 4))))) (internal--after-with-selected-window save-selected-window--state))))
  (let ((selected (eq window (selected-window))) win) (let ((save-selected-window--state (internal--before-with-selected-window window))) (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) (quote norecord)) (setq win (wg-make-win :edges (window-edges window) :point (wg-window-point window) :start (window-start window) :hscroll (window-hscroll window) :selected selected :minibuffer-scroll (eq window minibuffer-scroll-window) :dedicated (window-dedicated-p window) :buf-uid (wg-buffer-uid-or-add ...))) (wg-set-win-parameter win (quote next-buffers) (wg-pickel (remove nil ...))) (wg-set-win-parameter win (quote prev-buffers) (wg-pickel (remove nil ...)))) (internal--after-with-selected-window save-selected-window--state)))) win)
  wg-window-to-win(#<window 348 on *Org Agenda*>)
  #[(w) "..." [w wins dir edges --cl-inner-- windowp wg-window-to-win signal wrong-number-of-arguments nil wg-make-wtree :dir :edges :wlist mapcar] 10](#<window 348 on *Org Agenda*>)
  mapcar(#[(w) "..." [w wins dir edges --cl-inner-- windowp wg-window-to-win signal wrong-number-of-arguments nil wg-make-wtree :dir :edges :wlist mapcar] 10] (#<window 348 on *Org Agenda*> (t (182 0 365 88) (nil (182 0 365 68) #<window 353 on todo-orgx.org> #<window 383 on workgroups-win.el>) #<window 355 on refile-orgx.org>)))
  #[(w) "..." [w wins dir edges --cl-inner-- windowp wg-window-to-win signal wrong-number-of-arguments nil wg-make-wtree :dir :edges :wlist mapcar] 10]((nil (0 0 365 88) #<window 348 on *Org Agenda*> (t (182 0 365 88) (nil (182 0 365 68) #<window 353 on todo-orgx.org> #<window 383 on workgroups-win.el>) #<window 355 on refile-orgx.org>)))
  wg-window-tree-to-wtree(((nil (0 0 365 88) #<window 348 on *Org Agenda*> (t (182 0 365 88) (nil (182 0 365 68) #<window 353 on todo-orgx.org> #<window 383 on workgroups-win.el>) #<window 355 on refile-orgx.org>)) #<window 4 on  *Minibuf-0*>))
  wg-frame-to-wconfig()
  wg-current-wconfig()
  wg-update-current-workgroup-working-wconfig()
  wg-restore-wconfig-undoably([cl-struct-wg-wconfig "0GLC06LTFRAD0000-FPD7F3" nil ((fullscreen . fullboth)) 0 0 362 90 nil 0 [cl-struct-wg-wtree nil nil (0 0 365 88) ([cl-struct-wg-win nil ((prev-buffers ~pickel!~ (21 (m ...) 20 (c) 19 (m ...) 18 (c) 17 (b "0GJY06FJK7YJ0000-15TG1X") 16 (c) 15 (c) 14 (m ...) 13 (c) 12 (m ...) 11 (c) 10 (b "0GLC06IK5MZ60000-FNLYPJ") 9 (c) 8 (c) 7 nil 6 (m ...) 5 (c) 4 (m ...) 3 (c) 2 (b "0GJY06FJK7YJ0000-15TG1X") 1 (c) 0 (c)) (c 20 21 7 c 18 19 20 c 16 17 18 c 15 16 7 c 13 14 7 c 11 12 13 c 9 10 11 c 8 9 15 c 5 6 7 c 3 4 5 c 1 2 3 c 0 1 8) 0) (next-buffers ~pickel!~ (0 nil) nil 0)) (0 0 76 88) 4672 1 0 nil nil nil "0GJY06FJK7YJ0000-15TG1X"] [cl-struct-wg-win nil ((prev-buffers ~pickel!~ (7 nil 6 (m ...) 5 (c) 4 (m ...) 3 (c) 2 (b "0GJY06FJK7YJ0000-15TG1X") 1 (c) 0 (c)) (c 5 6 7 c 3 4 5 c 1 2 3 c 0 1 7) 0) (next-buffers ~pickel!~ (0 nil) nil 0)) (76 0 184 88) 36188 4208 0 nil nil nil "0GJY06FJK7YJ0000-15TG1X"] [cl-struct-wg-win nil ((prev-buffers ~pickel!~ (0 nil) nil 0) (next-buffers ~pickel!~ (0 nil) nil 0)) (184 0 365 88) 38171 36188 0 nil t nil "0GJY06FJK7YJ0000-15TG1X"])]] t)
  wg-restore-workgroup([cl-struct-wg-workgroup "0GJY0QSVHKUY0000-344R2I" "myconf" t ((ecb)) [cl-struct-wg-wconfig "0GLA14E5AP6P0000-4X6IB6" nil ((fullscreen . fullboth)) 0 0 362 90 nil 0 [cl-struct-wg-wtree nil nil (0 0 365 89) ([cl-struct-wg-win nil ((prev-buffers ~pickel!~ (7 nil 6 ... 5 ... 4 ... 3 ... 2 ... 1 ... 0 ...) (c 5 6 7 c 3 4 5 c 1 2 3 c 0 1 7) 0) (next-buffers ~pickel!~ (0 nil) nil 0)) (0 0 76 89) 82596 1 0 nil nil nil "0GJY06FJK7YJ0000-15TG1X"] [cl-struct-wg-win nil ((prev-buffers ~pickel!~ (7 nil 6 ... 5 ... 4 ... 3 ... 2 ... 1 ... 0 ...) (c 5 6 7 c 3 4 5 c 1 2 3 c 0 1 7) 0) (next-buffers ~pickel!~ (0 nil) nil 0)) (76 0 184 89) 87461 38555 0 nil nil nil "0GJY06FJK7YJ0000-15TG1X"] [cl-struct-wg-win nil ((prev-buffers ~pickel!~ (0 nil) nil 0) (next-buffers ~pickel!~ (0 nil) nil 0)) (184 0 365 89) 95743 91653 0 nil t nil "0GJY06FJK7YJ0000-15TG1X"])]] [cl-struct-wg-wconfig "0GLC06LTFRAD0000-FPD7F3" nil ((fullscreen . fullboth)) 0 0 362 90 nil 0 [cl-struct-wg-wtree nil nil (0 0 365 88) ([cl-struct-wg-win nil ((prev-buffers ~pickel!~ (21 ... 20 ... 19 ... 18 ... 17 ... 16 ... 15 ... 14 ... 13 ... 12 ... 11 ... 10 ... 9 ... 8 ... 7 nil 6 ... 5 ... 4 ... 3 ... 2 ... 1 ... 0 ...) (c 20 21 7 c 18 19 20 c 16 17 18 c 15 16 7 c 13 14 7 c 11 12 13 c 9 10 11 c 8 9 15 c 5 6 7 c 3 4 5 c 1 2 3 c 0 1 8) 0) (next-buffers ~pickel!~ (0 nil) nil 0)) (0 0 76 88) 4672 1 0 nil nil nil "0GJY06FJK7YJ0000-15TG1X"] [cl-struct-wg-win nil ((prev-buffers ~pickel!~ (7 nil 6 ... 5 ... 4 ... 3 ... 2 ... 1 ... 0 ...) (c 5 6 7 c 3 4 5 c 1 2 3 c 0 1 7) 0) (next-buffers ~pickel!~ (0 nil) nil 0)) (76 0 184 88) 36188 4208 0 nil nil nil "0GJY06FJK7YJ0000-15TG1X"] [cl-struct-wg-win nil ((prev-buffers ~pickel!~ (0 nil) nil 0) (next-buffers ~pickel!~ (0 nil) nil 0)) (184 0 365 88) 38171 36188 0 nil t nil "0GJY06FJK7YJ0000-15TG1X"])]] nil nil ("0GJY06FJK7YJ0000-15TG1X")])
  wg-switch-to-workgroup([cl-struct-wg-workgroup "0GJY0QSVHKUY0000-344R2I" "myconf" t ((ecb)) [cl-struct-wg-wconfig "0GLA14E5AP6P0000-4X6IB6" nil ((fullscreen . fullboth)) 0 0 362 90 nil 0 [cl-struct-wg-wtree nil nil (0 0 365 89) ([cl-struct-wg-win nil ((prev-buffers ~pickel!~ (7 nil 6 ... 5 ... 4 ... 3 ... 2 ... 1 ... 0 ...) (c 5 6 7 c 3 4 5 c 1 2 3 c 0 1 7) 0) (next-buffers ~pickel!~ (0 nil) nil 0)) (0 0 76 89) 82596 1 0 nil nil nil "0GJY06FJK7YJ0000-15TG1X"] [cl-struct-wg-win nil ((prev-buffers ~pickel!~ (7 nil 6 ... 5 ... 4 ... 3 ... 2 ... 1 ... 0 ...) (c 5 6 7 c 3 4 5 c 1 2 3 c 0 1 7) 0) (next-buffers ~pickel!~ (0 nil) nil 0)) (76 0 184 89) 87461 38555 0 nil nil nil "0GJY06FJK7YJ0000-15TG1X"] [cl-struct-wg-win nil ((prev-buffers ~pickel!~ (0 nil) nil 0) (next-buffers ~pickel!~ (0 nil) nil 0)) (184 0 365 89) 95743 91653 0 nil t nil "0GJY06FJK7YJ0000-15TG1X"])]] [cl-struct-wg-wconfig "0GLC06LTFRAD0000-FPD7F3" nil ((fullscreen . fullboth)) 0 0 362 90 nil 0 [cl-struct-wg-wtree nil nil (0 0 365 88) ([cl-struct-wg-win nil ((prev-buffers ~pickel!~ (21 ... 20 ... 19 ... 18 ... 17 ... 16 ... 15 ... 14 ... 13 ... 12 ... 11 ... 10 ... 9 ... 8 ... 7 nil 6 ... 5 ... 4 ... 3 ... 2 ... 1 ... 0 ...) (c 20 21 7 c 18 19 20 c 16 17 18 c 15 16 7 c 13 14 7 c 11 12 13 c 9 10 11 c 8 9 15 c 5 6 7 c 3 4 5 c 1 2 3 c 0 1 8) 0) (next-buffers ~pickel!~ (0 nil) nil 0)) (0 0 76 88) 4672 1 0 nil nil nil "0GJY06FJK7YJ0000-15TG1X"] [cl-struct-wg-win nil ((prev-buffers ~pickel!~ (7 nil 6 ... 5 ... 4 ... 3 ... 2 ... 1 ... 0 ...) (c 5 6 7 c 3 4 5 c 1 2 3 c 0 1 7) 0) (next-buffers ~pickel!~ (0 nil) nil 0)) (76 0 184 88) 36188 4208 0 nil nil nil "0GJY06FJK7YJ0000-15TG1X"] [cl-struct-wg-win nil ((prev-buffers ~pickel!~ (0 nil) nil 0) (next-buffers ~pickel!~ (0 nil) nil 0)) (184 0 365 88) 38171 36188 0 nil t nil "0GJY06FJK7YJ0000-15TG1X"])]] nil nil ("0GJY06FJK7YJ0000-15TG1X")])
  wg-switch-to-previous-workgroup()

I think the problem is in (remove nil (cl-subseq (window-prev-buffers window) 0 4)), as the problematic element to remove is not simply nil but (nil #<marker in no buffer> #<marker in no buffer>).

More precisely, if I evaluate (cl-subseq (window-prev-buffers window) 0 4) I get

((#<buffer todo-orgx.org> #<marker at 1 in todo-orgx.org> #<marker at 158366 in todo-orgx.org>) (#<buffer refile-orgx.org> #<marker at 39 in refile-orgx.org> #<marker at 39 in refile-orgx.org>) (nil #<marker in no buffer> #<marker in no buffer>) nil)

Is this a bug?

errors after update

After the update to the newest version (28.02.2014) workgroups2 cause strange errors when basic commands in emacs are run:
(save-buffers-kill-terminal) = C-x C-c: Symbol's function definition is void: wg-gensym
(kill-this-buffer): wg-workgroup-dissociate-bufobj: Symbol's function definition is void: wg-remove*

version GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)

my workgroups2 init config:

;; set prefix key
(setq wg-prefix-key (kbd "C-z"))

;; set workgroups session file
(setq wg-default-session-file "~/.emacs.d/config/workgroups")

;; mode line customization
(setq
wg-mode-line-decor-left-brace "["
wg-mode-line-decor-right-brace "]"
)

(setq wg-buffer-auto-association-on nil)
(setq wg-emacs-exit-save-behavior nil)
(setq wg-restore-associated-buffers t)

;; turn on the workgroups mode
(workgroups-mode 1)

Compile error: workgroups-commands.el:821:1:Error: Invalid function: (wg (wg-current-workgroup t frame))

Hi,

I installed Workgroups2 from MELPA and got the following errors:

Compiling file /Users/zand/.emacs.d/elpa/workgroups2-20130522.1943/workgroups-commands.el at Wed May 22 17:58:20 2013

In end of data:
workgroups-commands.el:821:1:Warning: the following functions are not known to be defined:
wg-pickel-all-session-parameters, wg-unpickel-session-parameters
workgroups-commands.el:821:1:Error: Invalid function: (wg (wg-current-workgroup t frame))

Compiling file /Users/zand/.emacs.d/elpa/workgroups2-20130522.1943/workgroups-utils-basic.el at Wed May 22 17:58:22 2013

My emacs version info:
GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2013-03-12 on bob.porkrind.org

Broken workgroup config

Out of a sudden this error occurs. Previously my workgroups did work fine (for about 1 day, just started to use it). How to address/fix this?

 |Debugger entered--Lisp error: (wrong-type-argument integerp (+ -2))
 |  set-frame-position(#<frame F1 0x101818cf0> (+ -2) 22)
 |  wg-wconfig-restore-frame-position([cl-struct-wg-wconfig "0G9712NJ5DJM0000-4B96U1" nil ((fullscreen)) (+ -2) 22 271 81 nil 0 [cl-st$
 |  wg-restore-wconfig([cl-struct-wg-wconfig "0G9712NJ5DJM0000-4B96U1" nil ((fullscreen)) (+ -2) 22 271 81 nil 0 [cl-struct-wg-wtree n$
 |  wg-restore-wconfig-undoably([cl-struct-wg-wconfig "0G9712NJ5DJM0000-4B96U1" nil ((fullscreen)) (+ -2) 22 271 81 nil 0 [cl-struct-w$
 |  wg-restore-workgroup([cl-struct-wg-workgroup "0G961DAVF0JU0000-IFGV7" "Org" t nil [cl-struct-wg-wconfig "0G9712NJ5DJM0000-4B96U1" $
 |  wg-switch-to-workgroup([cl-struct-wg-workgroup "0G961DAVF0JU0000-IFGV7" "Org" t nil [cl-struct-wg-wconfig "0G9712NJ5DJM0000-4B96U1$
 |  wg-find-session-file("~/Dropbox/Emacs/.emacs_session")
 |  eval-buffer(#<buffer  *load*> nil "/Users/nblu/.emacs" nil t)  ; Reading at buffer position 1995
 |  load-with-code-conversion("/Users/nblu/.emacs" "/Users/nblu/.emacs" t t)
 |  load("~/.emacs" t t)
 |  #[0 "^H\205\262^@     \306=\203^Q^@\307^H\310Q\202;^@ \311=\204^^^@\307^H\312Q\202;^@\313\307\314\315#\203*^@\316\202;^@\313\307\3$
 |  command-line()
 |  normal-top-level()

Do you want to help? Collaborator?

I'd like to see a guy here who uses workgroups2 from a git repo, wants to make changes and improve it. In other words - just to help me with it.

Start with any questions and I will write missing documentation.

sometimes I just want to create a new group even it already exists

After applying below patch, I will be asked whether I agree that the new group will override the existing group from Emacs.

That's actually better UI. Here is my patch:

commit 962360039e8dbfaa6e4cf5ce279328429287e6b9
Author: Chen Bin <[email protected]>
Date:   Fri Apr 11 15:11:18 2014 +1000

    create a new group without checking if it is unique

diff --git a/site-lisp/workgroups2/workgroups-functions.el b/site-lisp/workgroups2/workgroups-functions.el
index d3231a8..5d7caad 100644
--- a/site-lisp/workgroups2/workgroups-functions.el
+++ b/site-lisp/workgroups2/workgroups-functions.el
@@ -1624,7 +1624,7 @@ current and previous workgroups."
      (or prompt (format "Name (default: %S): " default))
      (lambda (new) (and (stringp new)
                         (not (equal new ""))
-                        (wg-unique-workgroup-name-p new)))
+                        t))
      "Please enter a unique, non-empty name"
      nil nil nil nil default)))

saving the scala repl

Sergey,

Could you please add the feature for saving the scala REPL? I am using ensime (this is similar to slime which you have already added support for) and scala-mode2. Let me know if you have any specifics and thank you!

The ability for workgroups2 to save programming language interpeters

Inspired by my super user post: http://superuser.com/questions/635013/emacs-workgroups-and-interpreters

We are looking for the capability for workgroups2 to save programming language interpreters inside emacs as shown in the post. In the post I have a python interpreter and an R interpreter. More generally, it would be great for ANY programming language interpreter (the builtin elisp interpreter (ielm) does work!)

The commands are M-x R which starts ESS (emacs speaks statistics) which is the R interpreter and M-x run-python

What I have noticed is that most programming language interpreters are started by M-x run-NAME. This seems to be built-in to emacs, try Mx-run-[TAB] to see the auto-complete list. However, they will not work unless you have installed the associated interpreter and elisp code for the associated mode.

Documentation/API

Hello,

Thanks for writing this package!

It is currently quite hard to understand how the authors intended for the package to be used.

Furthermore, it is not clear how to fit it to one's needs, i.e. customise the functionality by extending it farther and by modifying it, outside of the "customize" functionality of emacs.

Therefore, it would be great if there was some more documentation - esp. regarding how to get to the worgroup/wconfig/etc datastructures.

Thanks again!

Comment out "eval-when-compile"

This is on OS x 10.8, installed with MELPA for Emacs 24.3.

I needed to comment out "eval-when-compile" around wg-pickel-all-session-parameters (in workgroups-pickel.el) and recompile. Otherwise a workgroup could not be saved and Emacs would freeze.

ido all the time

Previously wg2 used ido only when ido-mode is t. I use Helm-mode. But now when I call wg-switch-to-workgroup it use ido in any case.

error: Required feature `cl-macs' was not provided

Installed fresh from MELPA, then tried to require, giving this error. The offending require seems to be located in workgroups-functions.el.

Tell me if I can provide any information to help solve this, as I'd really like to try this out.

Emacs version GNU Emacs 24.2.1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.