* add org-quote-region
@ 2018-08-04 22:23 Will Pierce
2018-08-04 22:27 ` Will Pierce
2018-08-05 4:28 ` Kyle Meyer
0 siblings, 2 replies; 4+ messages in thread
From: Will Pierce @ 2018-08-04 22:23 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 170 bytes --]
Adds a function to turn the highlighted region into a block quote for
export ("#+begin_quote...#+end_quote").
As a writer using org-mode I've found this very useful.
W
[-- Attachment #1.2: Type: text/html, Size: 253 bytes --]
[-- Attachment #2: 0001-Add-org-quote-region-function.patch --]
[-- Type: application/octet-stream, Size: 957 bytes --]
From e799ff70965d3ac479eb817687cb02b7fb188c7d Mon Sep 17 00:00:00 2001
From: pierwill <19642016+pierwill@users.noreply.github.com>
Date: Sat, 4 Aug 2018 17:08:39 -0500
Subject: [PATCH] Add org-quote-region function
---
lisp/org.el | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/lisp/org.el b/lisp/org.el
index 999575d05..b29b3e353 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -22643,6 +22643,17 @@ package ox-bibtex by Taru Karttunen."
org--rds (list (list 'bib bib))))))
(call-interactively 'reftex-citation)))
+(defun org-quote-region (start end)
+ "Mark current region as a quotation block. (#+begin_quote)"
+ (interactive "r")
+ (save-restriction
+ (narrow-to-region start end)
+ (goto-char (point-min))
+ (insert "#+begin_quote\n")
+ (goto-char (point-max))
+ (insert "#+end_quote\n")))
+
+
;;;; Functions extending outline functionality
(defun org-beginning-of-line (&optional n)
--
2.18.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: add org-quote-region
2018-08-04 22:23 add org-quote-region Will Pierce
@ 2018-08-04 22:27 ` Will Pierce
2018-08-05 4:28 ` Kyle Meyer
1 sibling, 0 replies; 4+ messages in thread
From: Will Pierce @ 2018-08-04 22:27 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 295 bytes --]
Ah. Here it is with a proper commit msg:
On 4 August 2018 at 17:23, Will Pierce <pierwill@gmail.com> wrote:
> Adds a function to turn the highlighted region into a block quote for
> export ("#+begin_quote...#+end_quote").
>
> As a writer using org-mode I've found this very useful.
>
> W
>
[-- Attachment #1.2: Type: text/html, Size: 764 bytes --]
[-- Attachment #2: 0001-Add-org-quote-region-function-2.patch --]
[-- Type: application/octet-stream, Size: 1107 bytes --]
From 4635997efcf3f0523024fb3ea4a583febe4fd7f1 Mon Sep 17 00:00:00 2001
From: pierwill <19642016+pierwill@users.noreply.github.com>
Date: Sat, 4 Aug 2018 17:08:39 -0500
Subject: [PATCH] Add org-quote-region function
* lisp/org.el (org-quote-region): Adds a function to turn the
highlighted region into a block quote for export ("#+begin_quote
... #+end_quote").
---
lisp/org.el | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/lisp/org.el b/lisp/org.el
index 999575d05..b29b3e353 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -22643,6 +22643,17 @@ package ox-bibtex by Taru Karttunen."
org--rds (list (list 'bib bib))))))
(call-interactively 'reftex-citation)))
+(defun org-quote-region (start end)
+ "Mark current region as a quotation block. (#+begin_quote)"
+ (interactive "r")
+ (save-restriction
+ (narrow-to-region start end)
+ (goto-char (point-min))
+ (insert "#+begin_quote\n")
+ (goto-char (point-max))
+ (insert "#+end_quote\n")))
+
+
;;;; Functions extending outline functionality
(defun org-beginning-of-line (&optional n)
--
2.18.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: add org-quote-region
2018-08-04 22:23 add org-quote-region Will Pierce
2018-08-04 22:27 ` Will Pierce
@ 2018-08-05 4:28 ` Kyle Meyer
2018-08-05 15:31 ` Will Pierce
1 sibling, 1 reply; 4+ messages in thread
From: Kyle Meyer @ 2018-08-05 4:28 UTC (permalink / raw)
To: Will Pierce, emacs-orgmode
Hello,
Will Pierce <pierwill@gmail.com> writes:
> Adds a function to turn the highlighted region into a block quote for
> export ("#+begin_quote...#+end_quote").
>
> As a writer using org-mode I've found this very useful.
I believe this can already be achieved in a more general way with
org-insert-structure-template (currently in master, which will be
released as Org 9.2). Select the region of interest and type C-c C-, q
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: add org-quote-region
2018-08-05 4:28 ` Kyle Meyer
@ 2018-08-05 15:31 ` Will Pierce
0 siblings, 0 replies; 4+ messages in thread
From: Will Pierce @ 2018-08-05 15:31 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 679 bytes --]
Ah! Thanks. I didn't search hard enough. Just starting to wrap my head
around the org code. I'll have to look elsewhere in org for a place to
contribute ;)
On 4 August 2018 at 23:28, Kyle Meyer <kyle@kyleam.com> wrote:
> Hello,
>
> Will Pierce <pierwill@gmail.com> writes:
>
> > Adds a function to turn the highlighted region into a block quote for
> > export ("#+begin_quote...#+end_quote").
> >
> > As a writer using org-mode I've found this very useful.
>
> I believe this can already be achieved in a more general way with
> org-insert-structure-template (currently in master, which will be
> released as Org 9.2). Select the region of interest and type C-c C-, q
>
>
>
[-- Attachment #2: Type: text/html, Size: 1157 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-08-05 15:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-04 22:23 add org-quote-region Will Pierce
2018-08-04 22:27 ` Will Pierce
2018-08-05 4:28 ` Kyle Meyer
2018-08-05 15:31 ` Will Pierce
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.