From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: Move marked text into environment Date: Tue, 28 May 2013 17:56:11 +0200 Message-ID: <87obbvcd44.fsf@gmail.com> References: <1865341.6h0omvUCy0@linux-ik7b.site> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhMGF-00082O-SH for emacs-orgmode@gnu.org; Tue, 28 May 2013 11:56:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhMGC-0000md-TU for emacs-orgmode@gnu.org; Tue, 28 May 2013 11:56:31 -0400 Received: from plane.gmane.org ([80.91.229.3]:51034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhMGC-0000mK-MH for emacs-orgmode@gnu.org; Tue, 28 May 2013 11:56:28 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UhMG8-0001Oi-VY for emacs-orgmode@gnu.org; Tue, 28 May 2013 17:56:24 +0200 Received: from g231106097.adsl.alicedsl.de ([92.231.106.97]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 May 2013 17:56:24 +0200 Received: from tjolitz by g231106097.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 May 2013 17:56:24 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org AW writes: > Dear list, > > would someone help me, being not a programmer, to achieve this: > > I get Emails, copy them into an org-file and would like to write down comments > on single sentences or paragraphs of the text. > > I'd like to mark some text in the copied text of the Email inside the org-file > and get "#+BEGIN_QUOTE" and "END_QUOTE" around the marked region. > > I know that I can get the "environment" #+BEGIN / #+END_QUOTE with " that leaves it to me to transfer the text into this environment. > > Orgmode 8.0.1, Emacs 24.3 This ,----------------------------------------------------------- | (defun org-wrap-region-in-quote-block () | "Wrap region in quote block" | (interactive) | (save-excursion | (save-restriction | (and | (region-active-p) | (use-region-p) | (narrow-to-region (region-beginning) (region-end))) | (goto-char (point-min)) | (insert "#+BEGIN_QUOTE\n") | (goto-char (point-max)) | (insert "#+END_QUOTE\n")) | (deactivate-mark))) `----------------------------------------------------------- does the job - wrap text (marked as region) into a quote block. Not sure if there is such a function in Org-mode already, it might well be ... -- cheers, Thorsten