all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] org-src-edit support open edit buffer bellow current window
@ 2018-03-12 17:27 stardiviner
  2018-03-13  8:22 ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: stardiviner @ 2018-03-12 17:27 UTC (permalink / raw)
  To: org-mode


[-- Attachment #1.1: Type: text/plain, Size: 42 bytes --]

Add a more better way to open src block.


[-- Attachment #1.2: Type: text/html, Size: 353 bytes --]

[-- Attachment #2: 0001-org-src.el-org-edit-src-support-open-edit-src-window.patch --]
[-- Type: text/x-patch, Size: 1578 bytes --]

From d0db82e0b3f7e6ff0102b4b08ba18de883da32e2 Mon Sep 17 00:00:00 2001
From: stardiviner <numbchild@gmail.com>
Date: Tue, 13 Mar 2018 01:23:52 +0800
Subject: [PATCH] org-src.el: (org-edit-src) support open edit src window
 below.

---
 lisp/org-src.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lisp/org-src.el b/lisp/org-src.el
index dfa2ae3de..5d3c2e538 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -155,6 +155,8 @@ Possible values for this option are:
 
 current-window    Show edit buffer in the current window, keeping all other
                   windows.
+split-window-below Show edit buffer below the current window, keeping all
+                   other windows.
 other-window      Use `switch-to-buffer-other-window' to display edit buffer.
 reorganize-frame  Show only two windows on the current frame, the current
                   window and the edit buffer.  When exiting the edit buffer,
@@ -164,6 +166,7 @@ other-frame       Use `switch-to-buffer-other-frame' to display edit buffer.
   :group 'org-edit-structure
   :type '(choice
 	  (const current-window)
+	  (const split-window-below)
 	  (const other-frame)
 	  (const other-window)
 	  (const reorganize-frame)))
@@ -746,6 +749,9 @@ If BUFFER is non-nil, test it instead."
     (`current-window (pop-to-buffer-same-window buffer))
     (`other-window
      (switch-to-buffer-other-window buffer))
+    (`split-window-below
+     (select-window (split-window-vertically))
+     (pop-to-buffer-same-window buffer))
     (`other-frame
      (pcase context
        (`exit
-- 
2.16.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] org-src-edit support open edit buffer bellow current window
  2018-03-12 17:27 [PATCH] org-src-edit support open edit buffer bellow current window stardiviner
@ 2018-03-13  8:22 ` Nicolas Goaziou
  2018-03-13 10:19   ` stardiviner
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2018-03-13  8:22 UTC (permalink / raw)
  To: stardiviner; +Cc: org-mode

Hello,

stardiviner <numbchild@gmail.com> writes:

> Add a more better way to open src block.

Thank you.

> From d0db82e0b3f7e6ff0102b4b08ba18de883da32e2 Mon Sep 17 00:00:00 2001
> From: stardiviner <numbchild@gmail.com>
> Date: Tue, 13 Mar 2018 01:23:52 +0800
> Subject: [PATCH] org-src.el: (org-edit-src) support open edit src window
>  below.

Your commit message is incomplete as you didn't mention you modified the
variable `org-src-window-setup'.

Also, would you mind adding an ORG-NEWS entry about it?

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] org-src-edit support open edit buffer bellow current window
  2018-03-13  8:22 ` Nicolas Goaziou
@ 2018-03-13 10:19   ` stardiviner
  2018-03-16  7:27     ` stardiviner
  0 siblings, 1 reply; 7+ messages in thread
From: stardiviner @ 2018-03-13 10:19 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: org-mode

[-- Attachment #1: Type: text/plain, Size: 151 bytes --]

I regenerated the path file.

- mentioned `org-src-window-setup' in commit message
- added `TINYCHANGE` in commit message
- added change in `ORG-NEWS'

[-- Attachment #2: 0001-org-src.el-org-src-window-setup-support-open-edit-sr.patch --]
[-- Type: text/x-patch, Size: 2135 bytes --]

From 762f6c06621e12c98031363fe3e70345e342ffeb Mon Sep 17 00:00:00 2001
From: stardiviner <numbchild@gmail.com>
Date: Tue, 13 Mar 2018 01:23:52 +0800
Subject: [PATCH] org-src.el: (org-src-window-setup) support open edit src
 window below.

TINYCHANGE
---
 etc/ORG-NEWS    | 2 ++
 lisp/org-src.el | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index da189eed5..10687ba83 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -107,6 +107,8 @@ document, use =shrink= value instead, or in addition to align:
 #+END_EXAMPLE
 
 ** New features
+*** Add support for open src block in below window
+Set option ~org-src-window-setup~ to ~'split-window-below~.
 *** Add support for links to LaTeX equations in HTML export
 Use MathJax links when enabled (by ~org-html-with-latex~), otherwise
 add a label to the rendered equation.
diff --git a/lisp/org-src.el b/lisp/org-src.el
index dfa2ae3de..5d3c2e538 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -155,6 +155,8 @@ Possible values for this option are:
 
 current-window    Show edit buffer in the current window, keeping all other
                   windows.
+split-window-below Show edit buffer below the current window, keeping all
+                   other windows.
 other-window      Use `switch-to-buffer-other-window' to display edit buffer.
 reorganize-frame  Show only two windows on the current frame, the current
                   window and the edit buffer.  When exiting the edit buffer,
@@ -164,6 +166,7 @@ other-frame       Use `switch-to-buffer-other-frame' to display edit buffer.
   :group 'org-edit-structure
   :type '(choice
 	  (const current-window)
+	  (const split-window-below)
 	  (const other-frame)
 	  (const other-window)
 	  (const reorganize-frame)))
@@ -746,6 +749,9 @@ If BUFFER is non-nil, test it instead."
     (`current-window (pop-to-buffer-same-window buffer))
     (`other-window
      (switch-to-buffer-other-window buffer))
+    (`split-window-below
+     (select-window (split-window-vertically))
+     (pop-to-buffer-same-window buffer))
     (`other-frame
      (pcase context
        (`exit
-- 
2.16.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] org-src-edit support open edit buffer bellow current window
  2018-03-13 10:19   ` stardiviner
@ 2018-03-16  7:27     ` stardiviner
  2018-03-16 21:47       ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: stardiviner @ 2018-03-16  7:27 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: org-mode

Hi, @Nicolas is this patch still has any thing need to change?

Maybe this is missed, just popup to take a little of your time. Sorry 
for disturb.


On 03/13/2018 06:19 PM, stardiviner wrote:
> I regenerated the patch file.
>
> - mentioned `org-src-window-setup' in commit message
> - added `TINYCHANGE` in commit message
> - added change in `ORG-NEWS'

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] org-src-edit support open edit buffer bellow current window
  2018-03-16  7:27     ` stardiviner
@ 2018-03-16 21:47       ` Nicolas Goaziou
  2018-03-17  4:26         ` stardiviner
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2018-03-16 21:47 UTC (permalink / raw)
  To: stardiviner; +Cc: org-mode

Hello,

stardiviner <numbchild@gmail.com> writes:

> Hi, @Nicolas is this patch still has any thing need to change?

It doesn't apply on master branch. Could you rebase it against HEAD and
send it again?

Thank you.

Regards,

-- 
Nicolas Goaziou                                                0x80A93738

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] org-src-edit support open edit buffer bellow current window
  2018-03-16 21:47       ` Nicolas Goaziou
@ 2018-03-17  4:26         ` stardiviner
  2018-03-17  7:11           ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: stardiviner @ 2018-03-17  4:26 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: org-mode


[-- Attachment #1.1: Type: text/plain, Size: 368 bytes --]

regenerated patch against HEAD now. Check it out. Thanks for your review.


On 03/17/2018 05:47 AM, Nicolas Goaziou wrote:
> Hello,
>
> stardiviner <numbchild@gmail.com> writes:
>
>> Hi, @Nicolas is this patch still has any thing need to change?
> It doesn't apply on master branch. Could you rebase it against HEAD and
> send it again?
>
> Thank you.
>
> Regards,
>


[-- Attachment #1.2: Type: text/html, Size: 989 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-src.el-org-src-window-setup-support-open-edit-sr.patch --]
[-- Type: text/x-patch; name="0001-org-src.el-org-src-window-setup-support-open-edit-sr.patch", Size: 2137 bytes --]

From fc84014b600afb3eb23fc2e73c359aed5c0791af Mon Sep 17 00:00:00 2001
From: stardiviner <numbchild@gmail.com>
Date: Tue, 13 Mar 2018 01:23:52 +0800
Subject: [PATCH] org-src.el: (org-src-window-setup) support open edit src
 window below.

TINYCHANGE
---
 etc/ORG-NEWS    | 2 ++
 lisp/org-src.el | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 01a9361df..c14bbe1d4 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -113,6 +113,8 @@ now sort according to the locale’s collation rules instead of by
 code-point.
 
 ** New features
+*** Add support for open src block in below window
+Set option ~org-src-window-setup~ to ~'split-window-below~.
 *** Add support for links to LaTeX equations in HTML export
 Use MathJax links when enabled (by ~org-html-with-latex~), otherwise
 add a label to the rendered equation.
diff --git a/lisp/org-src.el b/lisp/org-src.el
index dfa2ae3de..5d3c2e538 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -155,6 +155,8 @@ Possible values for this option are:
 
 current-window    Show edit buffer in the current window, keeping all other
                   windows.
+split-window-below Show edit buffer below the current window, keeping all
+                   other windows.
 other-window      Use `switch-to-buffer-other-window' to display edit buffer.
 reorganize-frame  Show only two windows on the current frame, the current
                   window and the edit buffer.  When exiting the edit buffer,
@@ -164,6 +166,7 @@ other-frame       Use `switch-to-buffer-other-frame' to display edit buffer.
   :group 'org-edit-structure
   :type '(choice
 	  (const current-window)
+	  (const split-window-below)
 	  (const other-frame)
 	  (const other-window)
 	  (const reorganize-frame)))
@@ -746,6 +749,9 @@ If BUFFER is non-nil, test it instead."
     (`current-window (pop-to-buffer-same-window buffer))
     (`other-window
      (switch-to-buffer-other-window buffer))
+    (`split-window-below
+     (select-window (split-window-vertically))
+     (pop-to-buffer-same-window buffer))
     (`other-frame
      (pcase context
        (`exit
-- 
2.16.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] org-src-edit support open edit buffer bellow current window
  2018-03-17  4:26         ` stardiviner
@ 2018-03-17  7:11           ` Nicolas Goaziou
  0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Goaziou @ 2018-03-17  7:11 UTC (permalink / raw)
  To: stardiviner; +Cc: org-mode

Hello,

stardiviner <numbchild@gmail.com> writes:

> regenerated patch against HEAD now. Check it out. Thanks for your
> review.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-03-17  7:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-12 17:27 [PATCH] org-src-edit support open edit buffer bellow current window stardiviner
2018-03-13  8:22 ` Nicolas Goaziou
2018-03-13 10:19   ` stardiviner
2018-03-16  7:27     ` stardiviner
2018-03-16 21:47       ` Nicolas Goaziou
2018-03-17  4:26         ` stardiviner
2018-03-17  7:11           ` Nicolas Goaziou

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.