Closed ddoherty03 closed 7 years ago
I like the idea -- thank you. It shouldn't be too hard to implement; the only annoying thing will probably be updating the overlay. Give me a couple days.
Ok, it's done. I didn't want to change the previous keybindings, so by default you now have C-c C-c
for poporg-update
and C-c C-s
for poporg-update-and-save
. The former does what you want; the latter saves the original buffer too. Of course, you can always customize poporg-mode-map
to rebind to your liking.
Please let me know if you find any bugs.
@QBobWatson, many thanks for the quick response. I'll hook it in. Sorry for the typo "popwin" in the OP instead of "poporg".
I see its not in melpa yet. Will you be pushing soon?
MELPA automatically pulls from GitHub sources periodically. It looks like it's updated now.
Yea, just saw it. Thanks.
For the sake of posterity, here is how I have bound the new functions. I use spacemacs and some regular emacs bindings:
(use-package poporg
:ensure t
:bind ("C-c #" . poporg-dwim)
:commands (poporg-dwin)
:config (progn
(define-key poporg-mode-map [remap save-buffer] 'poporg-update)
(define-key poporg-mode-map [remap evil-write] 'poporg-update)
(define-key poporg-mode-map [remap evil-save-modified-and-close] 'poporg-edit-exit)
(bind-key "C-x C-s" 'poporg-update poporg-mode-map)
(bind-key "C-c C-c" 'poporg-edit-exit poporg-mode-map)
(bind-key "C-c #" 'poporg-edit-exit poporg-mode-map)))
(spacemacs/set-leader-keys "o#" 'poporg-dwim)
Great package!
I often, out of habit really, hit the "save" key sequence, C-x C-s, or SPC f s (evil-mode), after a large edit. What i really want is just to have the original buffer updated, but popwin will exit the buffer instead. It would be nice to have a popwin command just to save back to the original buffer for these key sequences, and bind something like C-c C-c to poporg-edit-exit. BTW, this is one of my favorite programming add-ons to emacs. Thanks.