Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Follow org-src-window-setup settings #10

Open
FrauH0lle opened this issue Jan 18, 2019 · 2 comments
Open

Proposal: Follow org-src-window-setup settings #10

FrauH0lle opened this issue Jan 18, 2019 · 2 comments

Comments

@FrauH0lle
Copy link

Org-mode allows the user to customize the way the source code edit buffer is opened via org-src-window-setup. Outorg can be seen as org-mode's twin and it would be nice if it would also have a similar behavior when opening the edit buffer.

Right now, outorg will split the current window (if only one window is present) or switch to the buffer in the other window and open the edit buffer there.
So if the user sets org-src-window-setup to current-window outorg is not aware of this and will split the window.

outorg-copy-and-convert is responsible for setting up the edit buffer.
Would it be possible to change

;; Switch to edit buffer
(when (one-window-p)
  (split-window-sensibly (get-buffer-window)))
(switch-to-buffer-other-window edit-buffer)

to

;; Switch to edit buffer
(org-src-switch-to-buffer edit-buffer 'edit)

?
I think it would be nice for a user to have the same behavior in org-mode and outorg.

@alphapapa
Copy link
Owner

Seems like a good idea to me. Would you be able to submit a patch?

@FrauH0lle
Copy link
Author

Okay, I tried my luck here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants