Bad-ptr / persp-mode.el

named perspectives(set of buffers/window configs) for emacs
401 stars 44 forks source link

window config not restored #7

Closed LiFlash closed 10 years ago

LiFlash commented 10 years ago

Hi,

I just started to use persp-mode. On Windows7 it works like expected but on my Xubuntu machine the window configuration is neither stored nor restored when i switch to a workspace/perspective. It seems like there are no window-config infos when saving a workspace to a file. Workgroups is definitely installed. Any ideas?

And another thing: Like the iswitch issue, is it intended to show all buffers in ibuffer (i.e. using C-x C-b).?

Thank you!

Bad-ptr commented 10 years ago

Hello.

1) We need to know what emacs version you use on windows and on xubuntu. You can know your emacs version by M-x: ielm and typing to ielm prompt emacs-version.

2) When you save/load or switch perspectives, does it print any messages to minibuffer? Please create two or more perspectives, switch to one another, then save and load, then go to *Messages* buffer, copy and paste here.

3) Launch emacs --debug-init (or M-x: toggle-debug-on-error after starting emacs without --debug-init) and try to do same as in 2).

4) Create two perspectives, switch to one another, M-x: ielm, to the ielm prompt type (safe-persp-window-conf (get-frame-persp)), paste output here.

That's all what came to my head for now.

Like the iswitch issue, is it intended to show all buffers in ibuffer(i.e. using C-x C-b).?

Do You want Me to add ibuffer support ? )

LiFlash commented 10 years ago

Hi bad-ptr,

thanks for your fast response. It took me a little bit longer because of 4). Just in case there are known bugs: I use emacs live. Here are my results: 1) I can't access the windows machine right now (because it's at my working place) but i use the current emacs version within cygwin which is 24.3.x. In Xubuntu I have the version 24.3.1.

2) nothing is printed to minibuffer or Messages buffer (at least nothing from persp-mode, since I have magit installed there always appears a "Loading vc-git...done")

3) same as 2) and no error appears

4) That one kind of got me into an interesting direction. After many, many tries and restarts this is my result: nil

I don't know what is wrong. There was one situation, when Messages contained "persp-mode enabled" after starting it with M-x persp-mode, but I can not reproduce it. In general there is really no feedback from persp-mode in the Messages buffer and (get-frame-persp) (and therefore (safe-persp-window-conf (get-frame-persp))) is always nil. :( Furthermore, when I save a workspace with C-x x w there are still no window informations in there...

Do You want Me to add ibuffer support ? Since I'm new to emacs and elisp etc. I didn't know this is something special ;) Is there another way to open a window/buffer cotaining the buffers of the current perspective with similar functionality like ibuffer (e.g. marking buffers I want to delete from the perspective)?

Thank you very much for your help.

Bad-ptr commented 10 years ago

It's common case that some settings in user config(~/.emacs) leads to error, so:

1) Download persp-mode.el from this site.(go to https://raw.github.com/Bad-ptr/persp-mode.el/master/persp-mode.el, then save page as...). Download workgroups.el (https://raw.github.com/tlh/workgroups.el/master/workgroups.el).

2) Start emacs with emacs -Q, then with M-x load-file load workgroups.el and persp-mode.el (which you downloaded at step 1), after that M-x persp-mode and repeat step 4 from my previous post.

3) If it still returning nil try running (wg-make-wconfig) in ielm.

And ok, I'll look at ibuffer and add buffer filtering for it if I can.

LiFlash commented 10 years ago

From your 3) I suggest this shouldn't be nil after loading the files manually... but it still is. Loading the files just works fine. When activating (M-x) persp-mode it seems to work, too. Only 'Loading vc-git..." appears in the Messages buffer (so it's not magit ;)). Nevertheless step 4 still returns nil.

(wg-make-wconfig) seems to work and creates a config: ((type . wconfig) (left . 0) (top . 19) (width . 209) (height . 51) (sbars . right) (sbwid . 16) (wtree (type . window) (edges 0 0 213 50) (bname . "ielm") (fname) (point . :max) (mark . 64) (markx) (wstart . 1) (hscroll . 0) (sbars 16 2 t nil) (margins nil) (fringes 9 9 nil) (selwin . t) (mbswin) (dedicated)))

:(

ibuffer: wow, thank you very much :) I thought about a prefix-arg (C-u) for disabling this filter if needed. So I'm able to manage only the current perspective but still cleaning up the whole emacs without switching through all my workspaces. On the other hand, I wonder why it's only me who 'needs' this feature. What does your workflow look like? How do you keep your emacs 'clean'?

LiFlash commented 10 years ago

Btw, I just tried workgroups2 and the window restoring works just fine. But they are definitely missing the filter-functionality, so C-x b will not only contain the workspace buffers. This is very uncomfortable ;)

Bad-ptr commented 10 years ago

he-he. Found bug in code.

LiFlash commented 10 years ago

^^ Thanks for your support. How come you didn't recognize it, don't you use it yourself? ;) And out of curiosity - would you mind giving a short statement regarding your workflow (s.o.) since I just started using emacs and try to use it as smooth as possible?

Greetings

Bad-ptr commented 10 years ago

How come you didn't recognize it, don't you use it yourself?

This bug appears only when you start emacs without daemon. Usually I start(and kill) emacs as daemon (after login) with this script: https://gist.github.com/Bad-ptr/7628186 . And then create frames with emacsclient.

I'm installing packages mostly from melpa.

I Dont use ibuffer just switching/killing my buffers with ido-mode, ( ido-complete-space-or-hyphen, ido-hacks, ido-ubiquitous, ido-vertical-mode, flx-ido also installed)

I use tabbar with default grouping buffers by major-mode and bind 'tn' and 'tb'(with key-chord) to tabbar-forward-tab and tabbar-backward-tab.

I use flycheck(most of time it's disabled and enabled only when needed) for highlighting errors, not flymake.

I use smart-mode-line.

I bind M-x to smex.

Other interesting packages that I remember: autopair, expand-region, find-file-in-repository, golden-ratio, highlight-parentheses, highlight-sexps, jabber, linear-undo, move-text, multiple-cursors, rainbow-mode, shell-pop, smooth-scrolling, wgrep, zencoding-mode.

LiFlash commented 10 years ago

This bug appears only when you start emacs without daemon.

I saw your commit comment later. So if I were finished configuring this wouldn't have happened ;) Thanks for the infos about your setup. Just added some ido-packs and I will have look for flycheck.

Sorry for bothering you, but I don't know what to do now or where to ask (remember, I use emacs live and doen't know that's part of reason): When installing a package via list-package or via elisp on startup, most of the files are not compiled correctly but aborted with 'End of file while parsing'. Sometimes a restart of emacs helps but most of the time I have byte-compile them by hand. Do you have any idea what I can do or where to go to find out how to fix it?

Thank you very much!

Bad-ptr commented 10 years ago

I don't know what to do now or where to ask

One of the good place to ask is StackOverflow.com And another place is emacs mail list. )

most of the files are not compiled correctly but aborted with 'End of file while parsing'.

It's could be a side-effect of one of the installed elisp package. Try to disable minor modes one by one. I had similar issues with flymake and one of early version of flycheck(now it's seems like fixed in flycheck) so try to disable these modes first(could be launched by one of the hooks). And If you have troubles first of all try to reproduce it with emacs -Q, and if you can't -- then something wrong with your config or side packages.

LiFlash commented 10 years ago

stackoverflow... of course facepalm ;)

Thanks for the minor-modes tip. Found out that a setting in emacs-live caused the issue. It came from restricting the Compile Log buffer size within popwin... will raise this issue over there.

Thanks again for all your help and patience. Looking forward filtering the ibuffer ;)

Greetings, Joe

Bad-ptr commented 10 years ago

How would you like this: https://gist.github.com/Bad-ptr/7644606 ? It's not filtering, but grouping. What do you think?

Bad-ptr commented 10 years ago

@LiFlash // in case if there is no automatic notifications from closed issues.