From: Will Pierce <pierwill@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: add org-quote-region
Date: Sat, 4 Aug 2018 17:27:42 -0500 [thread overview]
Message-ID: <CAF-DrMj_rohUaF5J66R++=KrL_qL2zpEU+Bycn0mnpUzOixjPw@mail.gmail.com> (raw)
In-Reply-To: <CAF-DrMiy=hN3iKXrySyQ-Xm4qfMB6gcnFOp5uBUuF21XJnPMUg@mail.gmail.com>
[-- 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
next prev parent reply other threads:[~2018-08-04 22:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-04 22:23 add org-quote-region Will Pierce
2018-08-04 22:27 ` Will Pierce [this message]
2018-08-05 4:28 ` Kyle Meyer
2018-08-05 15:31 ` Will Pierce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAF-DrMj_rohUaF5J66R++=KrL_qL2zpEU+Bycn0mnpUzOixjPw@mail.gmail.com' \
--to=pierwill@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).