emacs-purpose
emacs-purpose copied to clipboard
proposal to enhance the layout of buffers
Hey guys!
I do really like this emacs extension though I missed few places in layout And I added in my forked repo purposes misc and todo.
Please check out my buffer layout:
As you may see this misc buffer is quite small, though especially for this I added a shortcuts: (\C-c+) which enlarges window by 20 and \C-c_ decreases window by -20. It's quite useful to accumulate there all different activities: python shells, searches, etc
In todo I store a list of @todos collected from my current project by this script:
bash part:
find
pwd-type d \( -name .git -o -name myworkenv -o -name node_modules \) -prune -o -type f \( -name todo.org \) -prune -o -type f -print -exec grep -n '@todo' '{}' \; | create_org_mode_todo_file.py > ./todo.org
and script create_org_mode_todo_file.py
This script places all found todos into todo.org file in my current project and so I am always aware about all todos in my project
Would you mind if I add my layout for this configuration and extend list of purposes with these changes ?
If so, what's the better way to do that ? Because it needs some code injection in window-purpose-x.el though maybe it's possible to avoid it. I did that one year ago and I've no found good way to inject it one year ago.
Hey @sergeyglazyrindev, that looks really good! I think the best way to add to Purpose is as a new extension and call it "code2". I want to keep the existing "code1" extension as is, to favor users who don't need a todo or misc window. Can you please make a pull request so we can continue the discussion there?
The code you had to inject is rewriting purpose-x-code1-update-dired
and adding ignore-error
s, right? The purpose configuration and layout shouldn't be a problem:
(setq purpose-x-code1--window-layout ...)
(with-eval-after-load 'window-purpose-x
(oset purpose-x-code1-purpose-config :mode-purposes ...)
(oset purpose-x-code1-purpose-config :name-purposes ...)
(oset purpose-x-code1-purpose-config :regexp-purposes ...))