Open sergeyglazyrindev opened 7 years ago
And yes, I'll cleanup this pull request to mimic current main project state once we solve issue with layout which doesn't work properly being in separated file. Sorry.. for some wrong changes here.
Thanks, I reviewed the PR and submitted feedback.
As I suggested in the issue report, please implement the change as a new extension, and don't change code1 itself. Copy code1 and rename code1 to code2, then do the changes you want to code2. If I'm not clear feel free to ask questions.
What exactly is "the issue with layout which doesn't work properly being in separated file"?
Hi bmag! I've got an idea why my layout doesn't work in separated file... Let me try out one idea and then if that doesn't help, I'll share details about the problem. Thanks for review. I am not an expert in elisp :( And I appreciate your suggestions.
Oh yes, sorry forgot to ask you: what do you mean by "add code2" instead of "changing code1" ? Are you talking about adding separated vars, etc with code2 prefix like you named variable "purpose-x-code1--window-layout" ?
Hey bmag! Please check this out now! I solved the issue with setting up my layout though I had to get rid of purpose-x-code1-setup function calling, instead I added my own initialization:
(defun load-purpose-mode ()
(interactive)
(purpose-x-code1--setup-ibuffer)
(purpose-x-code1-update-dired)
(ignore-errors (imenu-list-minor-mode))
(frame-or-buffer-changed-p 'purpose-x-code1-buffers-changed)
(add-hook 'post-command-hook #'purpose-x-code1-update-changed)
(purpose-load-window-layout-file "~/.emacs.d/layouts/full-ide.window-layout")
(todo-mode-get-buffer-create)
)
(global-set-key (kbd "M-L") 'load-purpose-mode)
That works fine now. And I added my layout into your folder "layouts" I am thinking, how do I describe the way how to setup it properly ? Because I like todo purpose buffer and it helps much to find all todos and handle it. Also I like the idea of misc buffer. Though I listed all needed major mode and its modes through variable purpose-user-mode-purposes but I think how to simplify the setup for another users. Would you mind if I add a part how to setup the things to your README ? Or is it better to write a full-ide-README.md in layouts folder ?
Oh yes, sorry forgot to ask you: what do you mean by "add code2" instead of "changing code1" ? Are you talking about adding separated vars, etc with code2 prefix like you named variable "purpose-x-code1--window-layout" ?
Yes, I'm talking about adding separate variables and functions. Right now, these exist:
(defvar purpose-x-code1--window-layout ...)
(defvar purpose-x-code1-purpose-config ...)
(defvar purpose-x-code1-buffers-changed ...)
(define-ibuffer-filter purpose-x-code1-ibuffer-files-only ...)
(defun purpose-x-code1--setup-ibuffer ...)
(defun purpose-x-code1--unset-ibuffer ...)
(defun purpose-x-code1-update-dired ...)
(defun purpose-x-code1-update-changed ...)
(defun purpose-x-code1-setup ...)
(defun purpose-x-code1-unset ...)
What I'm saying is to add below them:
(defvar purpose-x-code2--window-layout ...)
(defvar purpose-x-code2-purpose-config ...)
(defun purpose-x-code2-update-dired ...)
(defun purpose-x-code2-update-changed ...)
(defun purpose-x-code2-setup ...)
(defun purpose-x-code2-unset ...)
I think you can reuse purpose-x-code1-buffers-changed
, purpose-x-code1--setup-ibuffer
and purpose-x-code1--unset-ibuffer
in code2 without copying them.
And I added my layout into your folder "layouts" I am thinking, how do I describe the way how to setup it properly ? Because I like todo purpose buffer and it helps much to find all todos and handle it. Also I like the idea of misc buffer.
I prefer the layout to be stored in purpose-x-code2--window-layout
, rather than as a separate layout file. Ideally code2 will just work by calling purpose-x-code2-setup
, including setting up the layout, and won't need a big description. Any necessary description can be included in the docstring of purpose-x-code2-setup
or in the wiki.
Though I listed all needed major mode and its modes through variable purpose-user-mode-purposes but I think how to simplify the setup for another users. Would you mind if I add a part how to setup the things to your README ? Or is it better to write a full-ide-README.md in layouts folder ?
I prefer the necessary configuration to be stored in purpose-x-code2-purpose-config
, so the user doesn't need to do anything more than calling purpose-x-code2-setup
. That said, the todo.org buffer is custom-made for your workflow, right? It isn't a standard thing? So if the user uses a different buffer for viewing todos, he/she will have to assign a todo
purpose to this buffer. This kind of info can go in the wiki as well. Instructions on how to create a todo.org can also go in the wiki.
I solved the issue with setting up my layout though I had to get rid of purpose-x-code1-setup function calling, instead I added my own initialization
It's weird that you need to wrap imenu-list-minor-mode
inside an ignore-errors
block. The index can't be created when imenu-list-minor-mode
is invoked from an indexable buffer (e.g. the *scratch*
buffer if activated at Emacs startup), but imenu-list is supposed to catch these errors and handle them gracefully. Are you using an old version of imenu-list.el
by any chance?
Ok, now it's clear I'll do that Thank you for suggestions! But I think I'll find a time a the end of the week. Now busy at work.
Any news?
Hi, I scheduled it but last weeks very crazy. Will do that asap. Sorry :( for delay.
Hello dear bmag. Sorry for the huge delay I had problems with health and couldn't work enough to do anything in open source world. Now I restored and added changes you requested + added a documentation how to install things and use full-ide.window-layout. Please let me know your thoughts
@sergeyglazyrindev It's ok, I understand, hope you're all better now and wish you the best.
As for this PR, I'm very busy myself this month, so it will take me some time to review these. Worst case scenario, I will review them towards the end of February.
Hey, sorry for the late response, I was really busy and turns out "end of February" wasn't the worst case :frowning_face:
I know putting together this PR is a considerable amount of work, and I appreciate the effort you put into it, but I feel it ended up too big and out-of-scope for Purpose itself, so I won't be merging it. However, I'd like to convert it to a new page in Purpose's wiki. Would you mind if I did that?
Hey bmag!
I moved out almost all not necessary stuff from window-purpose-x.el though there's one problem: maybe you can advice (I am debugging it now - maybe there's a problem with my init.el)
Hm, I removed everything from my init.el except window-purpose initialization... and still there's a problem: if I fix default layout in your window-purpose-x.el then it works, if I put the same layout to separated layout file it doesn't work... Any idea ?
I included changes to layout, so you may play with these changes.....