Closed stardiviner closed 9 years ago
Are you sure the minor mode is not enabled? (poporg-mode +1)
runs unconditionally in (poporg-edit-thing)
. Also, isn't your define-key
redundant given the definition of (poporg-mode-map)
?
Yes, I'm sure the minor mode is not enabled, and I checked out the definition of poporg-dwim
-> poporg-edit-thing
-> (poporg-mode +1)
. I know my define-key
to poporg-edit-exit
is redundant. it's the way I try to fix this issue, but it does not work.
In that case I'm stumped. Can you turn the mode on manually using M-x poporg-mode
from the poporg buffer? What version of Emacs are you using?
@QBobWatson yes, I can enable poporg minor mode manually. Emacs version: "25.0.50.1"
I haven't tried it with Emacs 25+ yet, so that may be the problem. Have you tried putting (poporg-mode +1)
in poporg-edit-hook
? If your buffer ends up in org mode then presumably that's getting run.
@QBobWatson I tried to add (poporg-mode +1)
into poporg-edit-hook
. not work. I will try to debug my emacs with emacs -Q
, must be something wrong in my Emacs configs. let you know update as soon I get the bisect result.
UPDATE: after test with emacs -Q
, and load poporg-mode
only, it works.
After bisect test my Emacs configs, I found why:
I have enable this:
(setq org-startup-with-latex-preview t)
And this caused poporg-mode does not loaded in popup buffer correctly.
I see -- org latex preview won't work on non-file buffers, so it throws an error, which poporg is not catching. I just committed a revision which should hopefully fix your problem -- please let me know if it works.
Thanks for the debugging!
@QBobWatson it works now, but still have a small question, it will auto close the opened buffer window, instead of switch back to previous buffer.
You mean when you type C-x C-s
?
Yes
That's the intended behavior. If you want to switch back to the previous buffer with the poporg buffer open, use C-x o
. The part of the text that you're editing in poporg is marked immutable.
Not that, I mean, keep the window open, just close poporg popup buffer.
For example:
I have two windows which opened two buffers : buffer1
buffer2
, and the two windows corresponding two buffers are: window1
, window2
.
Then I open poporg in window1
, the poporg will popup buffer in window2
. After [C-x C-s]
, poporg closed the window2
. I hope the window2
can be keep, just close the poporg buffer
, the final result is the buffer in window2
is still buffer2
.
(This is a little kind of complicated way to describe my situation. but it is accurate)
seems this https://github.com/QBobWatson/poporg/pull/3 can solve my problem.
poporg minor mode is not enabled in opened buffer, so the keybinding [C-x C-s] does not work. and here is my config: