emacs-purpose icon indicating copy to clipboard operation
emacs-purpose copied to clipboard

proposal to enhance the layout of buffers

Open sergeyglazyrindev opened this issue 6 years ago • 2 comments

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: selection_015 1

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: findpwd-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

view here

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.

sergeyglazyrindev avatar Jul 17 '17 18:07 sergeyglazyrindev

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?

bmag avatar Jul 17 '17 19:07 bmag

The code you had to inject is rewriting purpose-x-code1-update-dired and adding ignore-errors, 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 ...))

bmag avatar Jul 17 '17 19:07 bmag