pashinin / workgroups2

Workgroups2 - Emacs session manager
http://workgroups2.rtfd.org/
GNU General Public License v3.0
297 stars 43 forks source link

Not loading session file ~/.emacs_workgroups on start #76

Closed shakthimaan closed 2 years ago

shakthimaan commented 8 years ago

I have the following in my Emacs init scripts:

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

But, when I start emacsclient (Emacs is started as a daemon), and try to switch to a workgroup, I get the following message:

Debugger entered--Lisp error: (error "No workgroups are defined.")
  signal(error ("No workgroups are defined."))
  error("No workgroups are defined.")
  (if noerror nil (error "No workgroups are defined."))
  (or (progn (or (and (vectorp it) (>= (length it) 9) (memq (aref it 0) cl-struct-wg-session-tags)) (error "%s accessing a non-%s" (quote wg-session-workgroup-list) (quote wg-session))) (aref it 7)) (if noerror nil (error "No workgroups are defined.")))
  (if it (or (progn (or (and (vectorp it) (>= (length it) 9) (memq (aref it 0) cl-struct-wg-session-tags)) (error "%s accessing a non-%s" (quote wg-session-workgroup-list) (quote wg-session))) (aref it 7)) (if noerror nil (error "No workgroups are defined."))) (if noerror nil (error "Current session is nil. No workgroups are defined")))
  (let ((it (wg-current-session noerror))) (if it (or (progn (or (and (vectorp it) (>= (length it) 9) (memq (aref it 0) cl-struct-wg-session-tags)) (error "%s accessing a non-%s" (quote wg-session-workgroup-list) (quote wg-session))) (aref it 7)) (if noerror nil (error "No workgroups are defined."))) (if noerror nil (error "Current session is nil. No workgroups are defined"))))
  wg-workgroup-list-or-error(nil)
  (mapcar (quote wg-workgroup-name) (wg-workgroup-list-or-error noerror))
  wg-workgroup-names()
  (wg-completing-read "Workgroup: " (wg-workgroup-names) nil require-match nil nil (let ((it (wg-current-workgroup t))) (if it (progn (progn (or (and (vectorp it) (>= ... 10) (memq ... cl-struct-wg-workgroup-tags)) (error "%s accessing a non-%s" (quote wg-workgroup-name) (quote wg-workgroup))) (aref it 2))))))
  wg-read-workgroup-name()
  (list (wg-read-workgroup-name))
  call-interactively(wg-switch-to-workgroup nil nil)
  command-execute(wg-switch-to-workgroup)

I do have the following in the bottom of .emacs:

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

After I read the sessions file using wg-find-session-file, the workgroups get loaded. I am using workgroups2-20141102.1122

Cudochi commented 7 years ago

1- Put the absolute path instead of ~/ in the wg-session-file argument. 2- Try to make a make a workgroup (C-v w c then the name) and save it (C-v w C-s (make sure that the file written is the one you open)) then reboot emacs.

redguardtoo commented 2 years ago

Latest version does not have this issue. Feel free to re-open this ticket.